code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static int[] asIntegerArray(Collection collection) { int[] result = new int[collection.size()]; int i = 0; for (Object c : collection) { result[i++] = asInteger(c); } return result; }
class class_name[name] begin[{] method[asIntegerArray, return_type[type[int]], modifier[public static], parameter[collection]] begin[{] local_variable[type[int], result] local_variable[type[int], i] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=asInteger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=collection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[asIntegerArray] operator[SEP] identifier[Collection] identifier[collection] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[result] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[collection] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[c] operator[:] identifier[collection] operator[SEP] { identifier[result] operator[SEP] identifier[i] operator[++] operator[SEP] operator[=] identifier[asInteger] operator[SEP] identifier[c] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public static Distribution guessLambda1(DataSet d) { int N = d.size(); return new LogUniform(1e-7/N, 1e-3/N); }
class class_name[name] begin[{] method[guessLambda1, return_type[type[Distribution]], modifier[public static], parameter[d]] begin[{] local_variable[type[int], N] return[ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1e-7), operandr=MemberReference(member=N, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1e-3), operandr=MemberReference(member=N, 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=LogUniform, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Distribution] identifier[guessLambda1] operator[SEP] identifier[DataSet] identifier[d] operator[SEP] { Keyword[int] identifier[N] operator[=] identifier[d] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[LogUniform] operator[SEP] literal[Float] operator[/] identifier[N] , literal[Float] operator[/] identifier[N] operator[SEP] operator[SEP] }
private void buildPossibleExpressions(final CronDefinition cronDefinition) { final List<CronParserField> sortedExpression = cronDefinition.getFieldDefinitions().stream() .map(this::toCronParserField) .sorted(CronParserField.createFieldTypeComparator()) .collect(Collectors.toList()); List<CronParserField> tempExpression = sortedExpression; while(lastFieldIsOptional(tempExpression)) { int expressionLength = tempExpression.size() - 1; ArrayList<CronParserField> possibleExpression = new ArrayList<>(tempExpression.subList(0, expressionLength)); expressions.put(expressionLength, possibleExpression); tempExpression = possibleExpression; } expressions.put(sortedExpression.size(), sortedExpression); }
class class_name[name] begin[{] method[buildPossibleExpressions, return_type[void], modifier[private], parameter[cronDefinition]] begin[{] local_variable[type[List], sortedExpression] local_variable[type[List], tempExpression] while[call[.lastFieldIsOptional, parameter[member[.tempExpression]]]] begin[{] local_variable[type[int], expressionLength] local_variable[type[ArrayList], possibleExpression] call[expressions.put, parameter[member[.expressionLength], member[.possibleExpression]]] assign[member[.tempExpression], member[.possibleExpression]] end[}] call[expressions.put, parameter[call[sortedExpression.size, parameter[]], member[.sortedExpression]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[buildPossibleExpressions] operator[SEP] Keyword[final] identifier[CronDefinition] identifier[cronDefinition] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[CronParserField] operator[>] identifier[sortedExpression] operator[=] identifier[cronDefinition] operator[SEP] identifier[getFieldDefinitions] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[this] operator[::] identifier[toCronParserField] operator[SEP] operator[SEP] identifier[sorted] operator[SEP] identifier[CronParserField] operator[SEP] identifier[createFieldTypeComparator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[CronParserField] operator[>] identifier[tempExpression] operator[=] identifier[sortedExpression] operator[SEP] Keyword[while] operator[SEP] identifier[lastFieldIsOptional] operator[SEP] identifier[tempExpression] operator[SEP] operator[SEP] { Keyword[int] identifier[expressionLength] operator[=] identifier[tempExpression] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[ArrayList] operator[<] identifier[CronParserField] operator[>] identifier[possibleExpression] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[tempExpression] operator[SEP] identifier[subList] operator[SEP] Other[0] , identifier[expressionLength] operator[SEP] operator[SEP] operator[SEP] identifier[expressions] operator[SEP] identifier[put] operator[SEP] identifier[expressionLength] , identifier[possibleExpression] operator[SEP] operator[SEP] identifier[tempExpression] operator[=] identifier[possibleExpression] operator[SEP] } identifier[expressions] operator[SEP] identifier[put] operator[SEP] identifier[sortedExpression] operator[SEP] identifier[size] operator[SEP] operator[SEP] , identifier[sortedExpression] operator[SEP] operator[SEP] }
private void setupCSS(VisualizerContext context, SVGPlot svgp, XYPlot plot) { StyleLibrary style = context.getStyleLibrary(); for(XYPlot.Curve curve : plot) { CSSClass csscls = new CSSClass(this, SERIESID + curve.getColor()); // csscls.setStatement(SVGConstants.SVG_STROKE_WIDTH_ATTRIBUTE, "0.2%"); csscls.setStatement(SVGConstants.SVG_FILL_ATTRIBUTE, SVGConstants.SVG_NONE_VALUE); style.lines().formatCSSClass(csscls, curve.getColor(), style.getLineWidth(StyleLibrary.XYCURVE)); svgp.addCSSClassOrLogError(csscls); } // Axis label CSSClass label = new CSSClass(this, CSS_AXIS_LABEL); label.setStatement(SVGConstants.CSS_FILL_PROPERTY, style.getTextColor(StyleLibrary.XYCURVE)); label.setStatement(SVGConstants.CSS_FONT_FAMILY_PROPERTY, style.getFontFamily(StyleLibrary.XYCURVE)); label.setStatement(SVGConstants.CSS_FONT_SIZE_PROPERTY, style.getTextSize(StyleLibrary.XYCURVE)); label.setStatement(SVGConstants.CSS_TEXT_ANCHOR_PROPERTY, SVGConstants.CSS_MIDDLE_VALUE); svgp.addCSSClassOrLogError(label); svgp.updateStyleElement(); }
class class_name[name] begin[{] method[setupCSS, return_type[void], modifier[private], parameter[context, svgp, plot]] begin[{] local_variable[type[StyleLibrary], style] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), BinaryOperation(operandl=MemberReference(member=SERIESID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getColor, postfix_operators=[], prefix_operators=[], qualifier=curve, 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=CSSClass, sub_type=None)), name=csscls)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CSSClass, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SVG_FILL_ATTRIBUTE, postfix_operators=[], prefix_operators=[], qualifier=SVGConstants, selectors=[]), MemberReference(member=SVG_NONE_VALUE, postfix_operators=[], prefix_operators=[], qualifier=SVGConstants, selectors=[])], member=setStatement, postfix_operators=[], prefix_operators=[], qualifier=csscls, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=lines, postfix_operators=[], prefix_operators=[], qualifier=style, selectors=[MethodInvocation(arguments=[MemberReference(member=csscls, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getColor, postfix_operators=[], prefix_operators=[], qualifier=curve, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=XYCURVE, postfix_operators=[], prefix_operators=[], qualifier=StyleLibrary, selectors=[])], member=getLineWidth, postfix_operators=[], prefix_operators=[], qualifier=style, selectors=[], type_arguments=None)], member=formatCSSClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=csscls, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addCSSClassOrLogError, postfix_operators=[], prefix_operators=[], qualifier=svgp, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=plot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=curve)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XYPlot, sub_type=ReferenceType(arguments=None, dimensions=None, name=Curve, sub_type=None)))), label=None) local_variable[type[CSSClass], label] call[label.setStatement, parameter[member[SVGConstants.CSS_FILL_PROPERTY], call[style.getTextColor, parameter[member[StyleLibrary.XYCURVE]]]]] call[label.setStatement, parameter[member[SVGConstants.CSS_FONT_FAMILY_PROPERTY], call[style.getFontFamily, parameter[member[StyleLibrary.XYCURVE]]]]] call[label.setStatement, parameter[member[SVGConstants.CSS_FONT_SIZE_PROPERTY], call[style.getTextSize, parameter[member[StyleLibrary.XYCURVE]]]]] call[label.setStatement, parameter[member[SVGConstants.CSS_TEXT_ANCHOR_PROPERTY], member[SVGConstants.CSS_MIDDLE_VALUE]]] call[svgp.addCSSClassOrLogError, parameter[member[.label]]] call[svgp.updateStyleElement, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[setupCSS] operator[SEP] identifier[VisualizerContext] identifier[context] , identifier[SVGPlot] identifier[svgp] , identifier[XYPlot] identifier[plot] operator[SEP] { identifier[StyleLibrary] identifier[style] operator[=] identifier[context] operator[SEP] identifier[getStyleLibrary] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[XYPlot] operator[SEP] identifier[Curve] identifier[curve] operator[:] identifier[plot] operator[SEP] { identifier[CSSClass] identifier[csscls] operator[=] Keyword[new] identifier[CSSClass] operator[SEP] Keyword[this] , identifier[SERIESID] operator[+] identifier[curve] operator[SEP] identifier[getColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[csscls] operator[SEP] identifier[setStatement] operator[SEP] identifier[SVGConstants] operator[SEP] identifier[SVG_FILL_ATTRIBUTE] , identifier[SVGConstants] operator[SEP] identifier[SVG_NONE_VALUE] operator[SEP] operator[SEP] identifier[style] operator[SEP] identifier[lines] operator[SEP] operator[SEP] operator[SEP] identifier[formatCSSClass] operator[SEP] identifier[csscls] , identifier[curve] operator[SEP] identifier[getColor] operator[SEP] operator[SEP] , identifier[style] operator[SEP] identifier[getLineWidth] operator[SEP] identifier[StyleLibrary] operator[SEP] identifier[XYCURVE] operator[SEP] operator[SEP] operator[SEP] identifier[svgp] operator[SEP] identifier[addCSSClassOrLogError] operator[SEP] identifier[csscls] operator[SEP] operator[SEP] } identifier[CSSClass] identifier[label] operator[=] Keyword[new] identifier[CSSClass] operator[SEP] Keyword[this] , identifier[CSS_AXIS_LABEL] operator[SEP] operator[SEP] identifier[label] operator[SEP] identifier[setStatement] operator[SEP] identifier[SVGConstants] operator[SEP] identifier[CSS_FILL_PROPERTY] , identifier[style] operator[SEP] identifier[getTextColor] operator[SEP] identifier[StyleLibrary] operator[SEP] identifier[XYCURVE] operator[SEP] operator[SEP] operator[SEP] identifier[label] operator[SEP] identifier[setStatement] operator[SEP] identifier[SVGConstants] operator[SEP] identifier[CSS_FONT_FAMILY_PROPERTY] , identifier[style] operator[SEP] identifier[getFontFamily] operator[SEP] identifier[StyleLibrary] operator[SEP] identifier[XYCURVE] operator[SEP] operator[SEP] operator[SEP] identifier[label] operator[SEP] identifier[setStatement] operator[SEP] identifier[SVGConstants] operator[SEP] identifier[CSS_FONT_SIZE_PROPERTY] , identifier[style] operator[SEP] identifier[getTextSize] operator[SEP] identifier[StyleLibrary] operator[SEP] identifier[XYCURVE] operator[SEP] operator[SEP] operator[SEP] identifier[label] operator[SEP] identifier[setStatement] operator[SEP] identifier[SVGConstants] operator[SEP] identifier[CSS_TEXT_ANCHOR_PROPERTY] , identifier[SVGConstants] operator[SEP] identifier[CSS_MIDDLE_VALUE] operator[SEP] operator[SEP] identifier[svgp] operator[SEP] identifier[addCSSClassOrLogError] operator[SEP] identifier[label] operator[SEP] operator[SEP] identifier[svgp] operator[SEP] identifier[updateStyleElement] operator[SEP] operator[SEP] operator[SEP] }
public static double convertFromFarenheit (TemperatureScale to, double temperature) { switch(to) { case FARENHEIT: return temperature; case CELSIUS: return convertFarenheitToCelsius(temperature); case KELVIN: return convertFarenheitToKelvin(temperature); case RANKINE: return convertFarenheitToRankine(temperature); default: throw(new RuntimeException("Invalid termpature conversion")); } }
class class_name[name] begin[{] method[convertFromFarenheit, return_type[type[double]], modifier[public static], parameter[to, temperature]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['FARENHEIT'], statements=[ReturnStatement(expression=MemberReference(member=temperature, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), SwitchStatementCase(case=['CELSIUS'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=temperature, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertFarenheitToCelsius, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['KELVIN'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=temperature, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertFarenheitToKelvin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['RANKINE'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=temperature, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertFarenheitToRankine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid termpature conversion")], 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)])], expression=MemberReference(member=to, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[convertFromFarenheit] operator[SEP] identifier[TemperatureScale] identifier[to] , Keyword[double] identifier[temperature] operator[SEP] { Keyword[switch] operator[SEP] identifier[to] operator[SEP] { Keyword[case] identifier[FARENHEIT] operator[:] Keyword[return] identifier[temperature] operator[SEP] Keyword[case] identifier[CELSIUS] operator[:] Keyword[return] identifier[convertFarenheitToCelsius] operator[SEP] identifier[temperature] operator[SEP] operator[SEP] Keyword[case] identifier[KELVIN] operator[:] Keyword[return] identifier[convertFarenheitToKelvin] operator[SEP] identifier[temperature] operator[SEP] operator[SEP] Keyword[case] identifier[RANKINE] operator[:] Keyword[return] identifier[convertFarenheitToRankine] operator[SEP] identifier[temperature] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[throw] operator[SEP] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } }
public static ByteBuf toByteBuf(ChannelHandlerContext ctx, Throwable cause) { if (cause == null || cause.getMessage() == null) { return Unpooled.EMPTY_BUFFER; } return ByteBufUtil.writeUtf8(ctx.alloc(), cause.getMessage()); }
class class_name[name] begin[{] method[toByteBuf, return_type[type[ByteBuf]], modifier[public static], parameter[ctx, cause]] begin[{] if[binary_operation[binary_operation[member[.cause], ==, literal[null]], ||, binary_operation[call[cause.getMessage, parameter[]], ==, literal[null]]]] begin[{] return[member[Unpooled.EMPTY_BUFFER]] else begin[{] None end[}] return[call[ByteBufUtil.writeUtf8, parameter[call[ctx.alloc, parameter[]], call[cause.getMessage, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ByteBuf] identifier[toByteBuf] operator[SEP] identifier[ChannelHandlerContext] identifier[ctx] , identifier[Throwable] identifier[cause] operator[SEP] { Keyword[if] operator[SEP] identifier[cause] operator[==] Other[null] operator[||] identifier[cause] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[Unpooled] operator[SEP] identifier[EMPTY_BUFFER] operator[SEP] } Keyword[return] identifier[ByteBufUtil] operator[SEP] identifier[writeUtf8] operator[SEP] identifier[ctx] operator[SEP] identifier[alloc] operator[SEP] operator[SEP] , identifier[cause] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override protected void afterPaint(final RenderContext renderContext) { super.afterPaint(renderContext); if (this.isPressed() && renderContext instanceof WebXmlRenderContext) { PrintWriter writer = ((WebXmlRenderContext) renderContext).getWriter(); StringBuffer temp = dumpAll(); writer.println("<br/><br/>"); writer.println(temp); } }
class class_name[name] begin[{] method[afterPaint, return_type[void], modifier[protected], parameter[renderContext]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=renderContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=afterPaint, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) if[binary_operation[THIS[call[None.isPressed, parameter[]]], &&, binary_operation[member[.renderContext], instanceof, type[WebXmlRenderContext]]]] begin[{] local_variable[type[PrintWriter], writer] local_variable[type[StringBuffer], temp] call[writer.println, parameter[literal["<br/><br/>"]]] call[writer.println, parameter[member[.temp]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[afterPaint] operator[SEP] Keyword[final] identifier[RenderContext] identifier[renderContext] operator[SEP] { Keyword[super] operator[SEP] identifier[afterPaint] operator[SEP] identifier[renderContext] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[isPressed] operator[SEP] operator[SEP] operator[&&] identifier[renderContext] Keyword[instanceof] identifier[WebXmlRenderContext] operator[SEP] { identifier[PrintWriter] identifier[writer] operator[=] operator[SEP] operator[SEP] identifier[WebXmlRenderContext] operator[SEP] identifier[renderContext] operator[SEP] operator[SEP] identifier[getWriter] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuffer] identifier[temp] operator[=] identifier[dumpAll] operator[SEP] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[println] operator[SEP] identifier[temp] operator[SEP] operator[SEP] } }
public CampaignsResponse withItem(CampaignResponse... item) { if (this.item == null) { setItem(new java.util.ArrayList<CampaignResponse>(item.length)); } for (CampaignResponse ele : item) { this.item.add(ele); } return this; }
class class_name[name] begin[{] method[withItem, return_type[type[CampaignsResponse]], modifier[public], parameter[item]] begin[{] if[binary_operation[THIS[member[None.item]], ==, literal[null]]] begin[{] call[.setItem, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CampaignResponse, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=item, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CampaignResponse, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[CampaignsResponse] identifier[withItem] operator[SEP] identifier[CampaignResponse] operator[...] identifier[item] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[item] operator[==] Other[null] operator[SEP] { identifier[setItem] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[CampaignResponse] operator[>] operator[SEP] identifier[item] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[CampaignResponse] identifier[ele] operator[:] identifier[item] operator[SEP] { Keyword[this] operator[SEP] identifier[item] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public DirectionsApiRequest waypoints(LatLng... waypoints) { Waypoint[] objWaypoints = new Waypoint[waypoints.length]; for (int i = 0; i < waypoints.length; i++) { objWaypoints[i] = new Waypoint(waypoints[i]); } return waypoints(objWaypoints); }
class class_name[name] begin[{] method[waypoints, return_type[type[DirectionsApiRequest]], modifier[public], parameter[waypoints]] begin[{] local_variable[type[Waypoint], objWaypoints] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=objWaypoints, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[MemberReference(member=waypoints, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=Waypoint, sub_type=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=waypoints, 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[.waypoints, parameter[member[.objWaypoints]]]] end[}] END[}]
Keyword[public] identifier[DirectionsApiRequest] identifier[waypoints] operator[SEP] identifier[LatLng] operator[...] identifier[waypoints] operator[SEP] { identifier[Waypoint] operator[SEP] operator[SEP] identifier[objWaypoints] operator[=] Keyword[new] identifier[Waypoint] operator[SEP] identifier[waypoints] 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[waypoints] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[objWaypoints] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[new] identifier[Waypoint] operator[SEP] identifier[waypoints] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[waypoints] operator[SEP] identifier[objWaypoints] operator[SEP] operator[SEP] }
private String generateSQLStatementForDataInTable( Map<String, Set<Integer>> dataSourceToUse, String tableToWrite) { StringBuffer output = new StringBuffer(); for (Entry<String, Set<Integer>> e : dataSourceToUse.entrySet()) { String curTemplateName = e.getKey(); Set<Integer> curPageIds = e.getValue(); //FIXME Problem - we do reuse existing ids here, but we treat template names from the pages and from revisions separately - resulting in if (!curTemplateName.isEmpty() && !curPageIds.isEmpty()) { //if template name does not have an id in the tplname-id map String id = "LAST_INSERT_ID()"; if (!tplNameToTplId.containsKey(curTemplateName)) { output.append("INSERT INTO " + GeneratorConstants.TABLE_TPLID_TPLNAME + " (templateName) VALUES ('" + curTemplateName + "');"); output.append("\r\n"); } else { //if template name has an id in the tplname-id map id = tplNameToTplId.get(curTemplateName).toString(); } StringBuilder curValues = new StringBuilder(); for (Integer pId : curPageIds) { if (curValues.length() > 0) { curValues.append(","); } curValues.append("(" + id + ", "); curValues.append(pId); curValues.append(")"); } output.append("REPLACE INTO " + tableToWrite + " VALUES " + curValues + ";"); output.append("\r\n"); } } return output.toString(); }
class class_name[name] begin[{] method[generateSQLStatementForDataInTable, return_type[type[String]], modifier[private], parameter[dataSourceToUse, tableToWrite]] begin[{] local_variable[type[StringBuffer], output] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), name=curTemplateName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), name=curPageIds)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=[], name=Set, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=curTemplateName, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=curPageIds, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="LAST_INSERT_ID()"), name=id)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=curTemplateName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=['!'], qualifier=tplNameToTplId, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=curTemplateName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=tplNameToTplId, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="INSERT INTO "), operandr=MemberReference(member=TABLE_TPLID_TPLNAME, postfix_operators=[], prefix_operators=[], qualifier=GeneratorConstants, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" (templateName) VALUES ('"), operator=+), operandr=MemberReference(member=curTemplateName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="');"), operator=+)], member=append, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\r\n")], member=append, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None)), name=curValues)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=curValues, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=",")], member=append, postfix_operators=[], prefix_operators=[], qualifier=curValues, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="("), operandr=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+)], member=append, postfix_operators=[], prefix_operators=[], qualifier=curValues, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=curValues, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=")")], member=append, postfix_operators=[], prefix_operators=[], qualifier=curValues, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=curPageIds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="REPLACE INTO "), operandr=MemberReference(member=tableToWrite, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" VALUES "), operator=+), operandr=MemberReference(member=curValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=";"), operator=+)], member=append, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\r\n")], member=append, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=dataSourceToUse, 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=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=[], name=Set, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None) return[call[output.toString, parameter[]]] end[}] END[}]
Keyword[private] identifier[String] identifier[generateSQLStatementForDataInTable] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Set] operator[<] identifier[Integer] operator[>] operator[>] identifier[dataSourceToUse] , identifier[String] identifier[tableToWrite] operator[SEP] { identifier[StringBuffer] identifier[output] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[Set] operator[<] identifier[Integer] operator[>] operator[>] identifier[e] operator[:] identifier[dataSourceToUse] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[curTemplateName] operator[=] identifier[e] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Integer] operator[>] identifier[curPageIds] operator[=] identifier[e] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[curTemplateName] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[curPageIds] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[id] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[tplNameToTplId] operator[SEP] identifier[containsKey] operator[SEP] identifier[curTemplateName] operator[SEP] operator[SEP] { identifier[output] operator[SEP] identifier[append] operator[SEP] literal[String] operator[+] identifier[GeneratorConstants] operator[SEP] identifier[TABLE_TPLID_TPLNAME] operator[+] literal[String] operator[+] identifier[curTemplateName] operator[+] literal[String] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[id] operator[=] identifier[tplNameToTplId] operator[SEP] identifier[get] operator[SEP] identifier[curTemplateName] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } identifier[StringBuilder] identifier[curValues] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Integer] identifier[pId] operator[:] identifier[curPageIds] operator[SEP] { Keyword[if] operator[SEP] identifier[curValues] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[curValues] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[curValues] operator[SEP] identifier[append] operator[SEP] literal[String] operator[+] identifier[id] operator[+] literal[String] operator[SEP] operator[SEP] identifier[curValues] operator[SEP] identifier[append] operator[SEP] identifier[pId] operator[SEP] operator[SEP] identifier[curValues] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[output] operator[SEP] identifier[append] operator[SEP] literal[String] operator[+] identifier[tableToWrite] operator[+] literal[String] operator[+] identifier[curValues] operator[+] literal[String] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[return] identifier[output] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public double distance(Coordinate c) { Coordinate nearest = this.nearest(c); LineSegment ls = new LineSegment(c, nearest); return ls.getLength(); }
class class_name[name] begin[{] method[distance, return_type[type[double]], modifier[public], parameter[c]] begin[{] local_variable[type[Coordinate], nearest] local_variable[type[LineSegment], ls] return[call[ls.getLength, parameter[]]] end[}] END[}]
Keyword[public] Keyword[double] identifier[distance] operator[SEP] identifier[Coordinate] identifier[c] operator[SEP] { identifier[Coordinate] identifier[nearest] operator[=] Keyword[this] operator[SEP] identifier[nearest] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[LineSegment] identifier[ls] operator[=] Keyword[new] identifier[LineSegment] operator[SEP] identifier[c] , identifier[nearest] operator[SEP] operator[SEP] Keyword[return] identifier[ls] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] }
public void put( Object key, URLConnection conn ) { synchronized( this ) // ensure no ConcurrentModificationException can occur. { Entry entry = new Entry( conn ); m_hardStore.put( key, entry ); if( m_thread == null ) { m_thread = new Thread( this, "ConnectionCache-cleaner" ); m_thread.setDaemon( true ); m_thread.start(); } } }
class class_name[name] begin[{] method[put, return_type[void], modifier[public], parameter[key, conn]] begin[{] SYNCHRONIZED[THIS[]] BEGIN[{] local_variable[type[Entry], entry] call[m_hardStore.put, parameter[member[.key], member[.entry]]] if[binary_operation[member[.m_thread], ==, literal[null]]] begin[{] assign[member[.m_thread], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ConnectionCache-cleaner")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Thread, sub_type=None))] call[m_thread.setDaemon, parameter[literal[true]]] call[m_thread.start, parameter[]] else begin[{] None end[}] END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[Object] identifier[key] , identifier[URLConnection] identifier[conn] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { identifier[Entry] identifier[entry] operator[=] Keyword[new] identifier[Entry] operator[SEP] identifier[conn] operator[SEP] operator[SEP] identifier[m_hardStore] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[entry] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_thread] operator[==] Other[null] operator[SEP] { identifier[m_thread] operator[=] Keyword[new] identifier[Thread] operator[SEP] Keyword[this] , literal[String] operator[SEP] operator[SEP] identifier[m_thread] operator[SEP] identifier[setDaemon] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[m_thread] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] } } }
@SafeVarargs public static <T> Predicate<T> notIn(@Nonnull T first, @Nonnull T... rest) { return Predicates.not(in(first, rest)); }
class class_name[name] begin[{] method[notIn, return_type[type[Predicate]], modifier[public static], parameter[first, rest]] begin[{] return[call[Predicates.not, parameter[call[.in, parameter[member[.first], member[.rest]]]]]] end[}] END[}]
annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Predicate] operator[<] identifier[T] operator[>] identifier[notIn] operator[SEP] annotation[@] identifier[Nonnull] identifier[T] identifier[first] , annotation[@] identifier[Nonnull] identifier[T] operator[...] identifier[rest] operator[SEP] { Keyword[return] identifier[Predicates] operator[SEP] identifier[not] operator[SEP] identifier[in] operator[SEP] identifier[first] , identifier[rest] operator[SEP] operator[SEP] operator[SEP] }
public void free() { // Remove all the objects if this is the primary key if (this.getPTable().getPKeyArea(Constants.MAIN_KEY_AREA) == this) { for (int i = m_VectorObjects.size() - 1 ; i >= 0 ;i--) { BaseBuffer buffer = (BaseBuffer)m_VectorObjects.elementAt(i); buffer.free(); } } m_VectorObjects.removeAllElements(); m_VectorObjects = null; super.free(); }
class class_name[name] begin[{] method[free, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[THIS[call[None.getPTable, parameter[]]call[None.getPKeyArea, parameter[member[Constants.MAIN_KEY_AREA]]]], ==, THIS[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=elementAt, postfix_operators=[], prefix_operators=[], qualifier=m_VectorObjects, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=BaseBuffer, sub_type=None)), name=buffer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BaseBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=free, postfix_operators=[], prefix_operators=[], qualifier=buffer, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=m_VectorObjects, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] call[m_VectorObjects.removeAllElements, parameter[]] assign[member[.m_VectorObjects], literal[null]] SuperMethodInvocation(arguments=[], member=free, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[free] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getPTable] operator[SEP] operator[SEP] operator[SEP] identifier[getPKeyArea] operator[SEP] identifier[Constants] operator[SEP] identifier[MAIN_KEY_AREA] operator[SEP] operator[==] Keyword[this] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[m_VectorObjects] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] identifier[i] operator[--] operator[SEP] { identifier[BaseBuffer] identifier[buffer] operator[=] operator[SEP] identifier[BaseBuffer] operator[SEP] identifier[m_VectorObjects] operator[SEP] identifier[elementAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[free] operator[SEP] operator[SEP] operator[SEP] } } identifier[m_VectorObjects] operator[SEP] identifier[removeAllElements] operator[SEP] operator[SEP] operator[SEP] identifier[m_VectorObjects] operator[=] Other[null] operator[SEP] Keyword[super] operator[SEP] identifier[free] operator[SEP] operator[SEP] operator[SEP] }
private void setToRowStart(RowIndexEntry rowEntry, FileDataInput in) throws IOException { if (in == null) { this.file = sstable.getFileDataInput(rowEntry.position); } else { this.file = in; in.seek(rowEntry.position); } sstable.partitioner.decorateKey(ByteBufferUtil.readWithShortLength(file)); }
class class_name[name] begin[{] method[setToRowStart, return_type[void], modifier[private], parameter[rowEntry, in]] begin[{] if[binary_operation[member[.in], ==, literal[null]]] begin[{] assign[THIS[member[None.file]], call[sstable.getFileDataInput, parameter[member[rowEntry.position]]]] else begin[{] assign[THIS[member[None.file]], member[.in]] call[in.seek, parameter[member[rowEntry.position]]] end[}] call[sstable.partitioner.decorateKey, parameter[call[ByteBufferUtil.readWithShortLength, parameter[member[.file]]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[setToRowStart] operator[SEP] identifier[RowIndexEntry] identifier[rowEntry] , identifier[FileDataInput] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[in] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[file] operator[=] identifier[sstable] operator[SEP] identifier[getFileDataInput] operator[SEP] identifier[rowEntry] operator[SEP] identifier[position] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[file] operator[=] identifier[in] operator[SEP] identifier[in] operator[SEP] identifier[seek] operator[SEP] identifier[rowEntry] operator[SEP] identifier[position] operator[SEP] operator[SEP] } identifier[sstable] operator[SEP] identifier[partitioner] operator[SEP] identifier[decorateKey] operator[SEP] identifier[ByteBufferUtil] operator[SEP] identifier[readWithShortLength] operator[SEP] identifier[file] operator[SEP] operator[SEP] operator[SEP] }
public static void ensurePath(ZooKeeperClient zkClient, List<ACL> acl, String path) throws ZooKeeperConnectionException, InterruptedException, KeeperException { Objects.requireNonNull(zkClient); Objects.requireNonNull(path); if (!path.startsWith("/")) { throw new IllegalArgumentException(); } ensurePathInternal(zkClient, acl, path); }
class class_name[name] begin[{] method[ensurePath, return_type[void], modifier[public static], parameter[zkClient, acl, path]] begin[{] call[Objects.requireNonNull, parameter[member[.zkClient]]] call[Objects.requireNonNull, parameter[member[.path]]] if[call[path.startsWith, parameter[literal["/"]]]] 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=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[.ensurePathInternal, parameter[member[.zkClient], member[.acl], member[.path]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[ensurePath] operator[SEP] identifier[ZooKeeperClient] identifier[zkClient] , identifier[List] operator[<] identifier[ACL] operator[>] identifier[acl] , identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[ZooKeeperConnectionException] , identifier[InterruptedException] , identifier[KeeperException] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[zkClient] operator[SEP] operator[SEP] identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[path] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } identifier[ensurePathInternal] operator[SEP] identifier[zkClient] , identifier[acl] , identifier[path] operator[SEP] operator[SEP] }
public void sendForm(HttpServletRequest req, HttpServletResponse res, String strReceiveMessage, Properties properties) throws ServletException, IOException { res.setContentType("text/html"); PrintWriter out = res.getWriter(); out.write("<html>" + RETURN + "<head>" + RETURN + "<title>" + this.getTitle() + "</title>" + RETURN + "</head>" + RETURN + "<body>" + RETURN + "<center><b>" + this.getTitle() + "</b></center><p />" + RETURN); String strServletPath = null; try { strServletPath = req.getRequestURI(); //Path(); } catch (Exception ex) { strServletPath = null; } if (strServletPath == null) strServletPath = "servlet/" + UploadServlet.class.getName(); // Never //strServletPath = "http://localhost/jbackup/servlet/com.tourgeek.jbackup.Servlet"; out.write(strReceiveMessage); // Status of previous upload out.write("<p /><form action=\"" + strServletPath + "\""); out.write(" method=\"post\"" + RETURN); out.write(" enctype=\"multipart/form-data\">" + RETURN); // TARGET=_top // out.write(" ACTION="http://www45.visto.com/?uid=219979&service=fileaccess&method=upload&nextpage=fa%3Dafter_upload.html&errorpage=fa_upload@.html&overwritepage=fa=upload_replace_dialog.html"> // out.write("What is your name? <INPUT TYPE=TEXT NAME=submitter> <BR>" + RETURN); String strFormHTML = this.getFormHTML(); if ((strFormHTML != null) && (strFormHTML.length() > 0)) out.write(strFormHTML); out.write("Which file to upload? <input type=\"file\" name=\"file\" />" + RETURN); this.writeAfterHTML(out, req, properties); out.write("<input type=\"submit\" value=\"upload\" />" + RETURN); out.write("</form></p>" + RETURN); out.write("</body>" + RETURN + "</html>" + RETURN); }
class class_name[name] begin[{] method[sendForm, return_type[void], modifier[public], parameter[req, res, strReceiveMessage, properties]] begin[{] call[res.setContentType, parameter[literal["text/html"]]] local_variable[type[PrintWriter], out] call[out.write, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["<html>"], +, member[.RETURN]], +, literal["<head>"]], +, member[.RETURN]], +, literal["<title>"]], +, THIS[call[None.getTitle, parameter[]]]], +, literal["</title>"]], +, member[.RETURN]], +, literal["</head>"]], +, member[.RETURN]], +, literal["<body>"]], +, member[.RETURN]], +, literal["<center><b>"]], +, THIS[call[None.getTitle, parameter[]]]], +, literal["</b></center><p />"]], +, member[.RETURN]]]] local_variable[type[String], strServletPath] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=strServletPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getRequestURI, postfix_operators=[], prefix_operators=[], qualifier=req, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=strServletPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.strServletPath], ==, literal[null]]] begin[{] assign[member[.strServletPath], binary_operation[literal["servlet/"], +, 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=UploadServlet, sub_type=None))]] else begin[{] None end[}] call[out.write, parameter[member[.strReceiveMessage]]] call[out.write, parameter[binary_operation[binary_operation[literal["<p /><form action=\""], +, member[.strServletPath]], +, literal["\""]]]] call[out.write, parameter[binary_operation[literal[" method=\"post\""], +, member[.RETURN]]]] call[out.write, parameter[binary_operation[literal[" enctype=\"multipart/form-data\">"], +, member[.RETURN]]]] local_variable[type[String], strFormHTML] if[binary_operation[binary_operation[member[.strFormHTML], !=, literal[null]], &&, binary_operation[call[strFormHTML.length, parameter[]], >, literal[0]]]] begin[{] call[out.write, parameter[member[.strFormHTML]]] else begin[{] None end[}] call[out.write, parameter[binary_operation[literal["Which file to upload? <input type=\"file\" name=\"file\" />"], +, member[.RETURN]]]] THIS[call[None.writeAfterHTML, parameter[member[.out], member[.req], member[.properties]]]] call[out.write, parameter[binary_operation[literal["<input type=\"submit\" value=\"upload\" />"], +, member[.RETURN]]]] call[out.write, parameter[binary_operation[literal["</form></p>"], +, member[.RETURN]]]] call[out.write, parameter[binary_operation[binary_operation[binary_operation[literal["</body>"], +, member[.RETURN]], +, literal["</html>"]], +, member[.RETURN]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[sendForm] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[HttpServletResponse] identifier[res] , identifier[String] identifier[strReceiveMessage] , identifier[Properties] identifier[properties] operator[SEP] Keyword[throws] identifier[ServletException] , identifier[IOException] { identifier[res] operator[SEP] identifier[setContentType] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[PrintWriter] identifier[out] operator[=] identifier[res] operator[SEP] identifier[getWriter] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[RETURN] operator[+] literal[String] operator[+] identifier[RETURN] operator[+] literal[String] operator[+] Keyword[this] operator[SEP] identifier[getTitle] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[RETURN] operator[+] literal[String] operator[+] identifier[RETURN] operator[+] literal[String] operator[+] identifier[RETURN] operator[+] literal[String] operator[+] Keyword[this] operator[SEP] identifier[getTitle] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[RETURN] operator[SEP] operator[SEP] identifier[String] identifier[strServletPath] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[strServletPath] operator[=] identifier[req] operator[SEP] identifier[getRequestURI] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[strServletPath] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[strServletPath] operator[==] Other[null] operator[SEP] identifier[strServletPath] operator[=] literal[String] operator[+] identifier[UploadServlet] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[strReceiveMessage] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[strServletPath] operator[+] literal[String] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[RETURN] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[RETURN] operator[SEP] operator[SEP] identifier[String] identifier[strFormHTML] operator[=] Keyword[this] operator[SEP] identifier[getFormHTML] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[strFormHTML] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[strFormHTML] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[strFormHTML] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[RETURN] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[writeAfterHTML] operator[SEP] identifier[out] , identifier[req] , identifier[properties] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[RETURN] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[RETURN] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[RETURN] operator[+] literal[String] operator[+] identifier[RETURN] operator[SEP] operator[SEP] }
public long mint() { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); String formattedDate = dateFormat.format(new Date()); String versionStr = formattedDate + String.format("%03d", versionCounter.incrementAndGet() % 1000); return Long.parseLong(versionStr); }
class class_name[name] begin[{] method[mint, return_type[type[long]], modifier[public], parameter[]] begin[{] local_variable[type[SimpleDateFormat], dateFormat] call[dateFormat.setTimeZone, parameter[call[TimeZone.getTimeZone, parameter[literal["UTC"]]]]] local_variable[type[String], formattedDate] local_variable[type[String], versionStr] return[call[Long.parseLong, parameter[member[.versionStr]]]] end[}] END[}]
Keyword[public] Keyword[long] identifier[mint] operator[SEP] operator[SEP] { identifier[SimpleDateFormat] identifier[dateFormat] operator[=] Keyword[new] identifier[SimpleDateFormat] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[dateFormat] operator[SEP] identifier[setTimeZone] operator[SEP] identifier[TimeZone] operator[SEP] identifier[getTimeZone] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[formattedDate] operator[=] identifier[dateFormat] operator[SEP] identifier[format] operator[SEP] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[versionStr] operator[=] identifier[formattedDate] operator[+] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[versionCounter] operator[SEP] identifier[incrementAndGet] operator[SEP] operator[SEP] operator[%] Other[1000] operator[SEP] operator[SEP] Keyword[return] identifier[Long] operator[SEP] identifier[parseLong] operator[SEP] identifier[versionStr] operator[SEP] operator[SEP] }
private Entity innerRetrieveEntityFromRepository(Root root, Entity retEntDO, String uniqueId, boolean isAllowOperationIfReposDown, Set<String> failureRepositoryIds) throws WIMException { String METHODNAME = "retrieveEntityFromRepository"; List<String> reposIds = getRepositoryManager().getRepoIds(); for (int i = 0; (i < reposIds.size() && retEntDO == null); i++) { String reposId = reposIds.get(i); try { Root retRoot = getRepositoryManager().getRepository(reposId).get(root); if (retRoot != null) { List<Entity> entList = retRoot.getEntities(); if (entList.size() >= 1) { retEntDO = entList.get(0); } } } catch (EntityNotFoundException e) { if (tc.isDebugEnabled()) { Tr.debug(tc, METHODNAME + " EntityNotFoundException[reposId=" + reposId + "] - " + uniqueId); } } catch (WIMSystemException wse) { String message = wse.getMessage(); if (tc.isDebugEnabled()) { Tr.debug(tc, METHODNAME + " WSE message = " + message); } if (message != null && message.contains("CWIML4520E") && message.contains("javax.naming.InvalidNameException")) { if (tc.isDebugEnabled()) { Tr.debug(tc, METHODNAME + " WIMSystemException [reposId=" + reposId + "] - " + message); } } else throw wse; } catch (Exception e) { if (!isAllowOperationIfReposDown) { if (e instanceof WIMException) { throw (WIMException) e; } throw new WIMException(e); } else { if (tc.isDebugEnabled()) Tr.debug(tc, METHODNAME + " IGNORE: exception [" + e.getMessage() + "] when retrieve entity from repository [" + reposId + "]"); failureRepositoryIds.add(reposId); } } } return retEntDO; }
class class_name[name] begin[{] method[innerRetrieveEntityFromRepository, return_type[type[Entity]], modifier[private], parameter[root, retEntDO, uniqueId, isAllowOperationIfReposDown, failureRepositoryIds]] begin[{] local_variable[type[String], METHODNAME] local_variable[type[List], reposIds] 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=reposIds, selectors=[], type_arguments=None), name=reposId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getRepositoryManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=reposId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRepository, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=retRoot)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Root, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=retRoot, 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=MethodInvocation(arguments=[], member=getEntities, postfix_operators=[], prefix_operators=[], qualifier=retRoot, selectors=[], type_arguments=None), name=entList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Entity, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=entList, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=retEntDO, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=entList, selectors=[], type_arguments=None)), label=None)]))]))], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=METHODNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" EntityNotFoundException[reposId="), operator=+), operandr=MemberReference(member=reposId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] - "), operator=+), operandr=MemberReference(member=uniqueId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['EntityNotFoundException'])), CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=wse, selectors=[], type_arguments=None), name=message)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=METHODNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" WSE message = "), operator=+), operandr=MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CWIML4520E")], member=contains, postfix_operators=[], prefix_operators=[], qualifier=message, selectors=[], type_arguments=None), operator=&&), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="javax.naming.InvalidNameException")], member=contains, postfix_operators=[], prefix_operators=[], qualifier=message, selectors=[], type_arguments=None), operator=&&), else_statement=ThrowStatement(expression=MemberReference(member=wse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=METHODNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" WIMSystemException [reposId="), operator=+), operandr=MemberReference(member=reposId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] - "), operator=+), operandr=MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)]))]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=wse, types=['WIMSystemException'])), CatchClause(block=[IfStatement(condition=MemberReference(member=isAllowOperationIfReposDown, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=METHODNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" IGNORE: exception ["), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] when retrieve entity from repository ["), operator=+), operandr=MemberReference(member=reposId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reposId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=failureRepositoryIds, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=WIMException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=Cast(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=WIMException, sub_type=None)), label=None)])), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WIMException, sub_type=None)), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=reposIds, selectors=[], type_arguments=None), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=retEntDO, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.retEntDO]] end[}] END[}]
Keyword[private] identifier[Entity] identifier[innerRetrieveEntityFromRepository] operator[SEP] identifier[Root] identifier[root] , identifier[Entity] identifier[retEntDO] , identifier[String] identifier[uniqueId] , Keyword[boolean] identifier[isAllowOperationIfReposDown] , identifier[Set] operator[<] identifier[String] operator[>] identifier[failureRepositoryIds] operator[SEP] Keyword[throws] identifier[WIMException] { identifier[String] identifier[METHODNAME] operator[=] literal[String] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[reposIds] operator[=] identifier[getRepositoryManager] operator[SEP] operator[SEP] operator[SEP] identifier[getRepoIds] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[reposIds] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[&&] identifier[retEntDO] operator[==] Other[null] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[String] identifier[reposId] operator[=] identifier[reposIds] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[try] { identifier[Root] identifier[retRoot] operator[=] identifier[getRepositoryManager] operator[SEP] operator[SEP] operator[SEP] identifier[getRepository] operator[SEP] identifier[reposId] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[root] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[retRoot] operator[!=] Other[null] operator[SEP] { identifier[List] operator[<] identifier[Entity] operator[>] identifier[entList] operator[=] identifier[retRoot] operator[SEP] identifier[getEntities] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>=] Other[1] operator[SEP] { identifier[retEntDO] operator[=] identifier[entList] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[EntityNotFoundException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[METHODNAME] operator[+] literal[String] operator[+] identifier[reposId] operator[+] literal[String] operator[+] identifier[uniqueId] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[WIMSystemException] identifier[wse] operator[SEP] { identifier[String] identifier[message] operator[=] identifier[wse] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[METHODNAME] operator[+] literal[String] operator[+] identifier[message] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[message] operator[!=] Other[null] operator[&&] identifier[message] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[message] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[METHODNAME] operator[+] literal[String] operator[+] identifier[reposId] operator[+] literal[String] operator[+] identifier[message] operator[SEP] operator[SEP] } } Keyword[else] Keyword[throw] identifier[wse] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isAllowOperationIfReposDown] operator[SEP] { Keyword[if] operator[SEP] identifier[e] Keyword[instanceof] identifier[WIMException] operator[SEP] { Keyword[throw] operator[SEP] identifier[WIMException] operator[SEP] identifier[e] operator[SEP] } Keyword[throw] Keyword[new] identifier[WIMException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[METHODNAME] operator[+] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[reposId] operator[+] literal[String] operator[SEP] operator[SEP] identifier[failureRepositoryIds] operator[SEP] identifier[add] operator[SEP] identifier[reposId] operator[SEP] operator[SEP] } } } Keyword[return] identifier[retEntDO] operator[SEP] }
public static ConstructorRef create(TypeInfo type, Method init) { checkArgument( init.getName().equals("<init>") && init.getReturnType().equals(Type.VOID_TYPE), "'%s' is not a valid constructor", init); return new AutoValue_ConstructorRef(type, init, ImmutableList.copyOf(init.getArgumentTypes())); }
class class_name[name] begin[{] method[create, return_type[type[ConstructorRef]], modifier[public static], parameter[type, init]] begin[{] call[.checkArgument, parameter[binary_operation[call[init.getName, parameter[]], &&, call[init.getReturnType, parameter[]]], literal["'%s' is not a valid constructor"], member[.init]]] return[ClassCreator(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=init, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getArgumentTypes, postfix_operators=[], prefix_operators=[], qualifier=init, selectors=[], type_arguments=None)], member=copyOf, postfix_operators=[], prefix_operators=[], qualifier=ImmutableList, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AutoValue_ConstructorRef, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ConstructorRef] identifier[create] operator[SEP] identifier[TypeInfo] identifier[type] , identifier[Method] identifier[init] operator[SEP] { identifier[checkArgument] operator[SEP] identifier[init] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[init] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Type] operator[SEP] identifier[VOID_TYPE] operator[SEP] , literal[String] , identifier[init] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[AutoValue_ConstructorRef] operator[SEP] identifier[type] , identifier[init] , identifier[ImmutableList] operator[SEP] identifier[copyOf] operator[SEP] identifier[init] operator[SEP] identifier[getArgumentTypes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public FessMessages addConstraintsMinMessage(String property, String value) { assertPropertyNotNull(property); add(property, new UserMessage(CONSTRAINTS_Min_MESSAGE, value)); return this; }
class class_name[name] begin[{] method[addConstraintsMinMessage, return_type[type[FessMessages]], modifier[public], parameter[property, value]] begin[{] call[.assertPropertyNotNull, parameter[member[.property]]] call[.add, parameter[member[.property], ClassCreator(arguments=[MemberReference(member=CONSTRAINTS_Min_MESSAGE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=None, dimensions=None, name=UserMessage, sub_type=None))]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[FessMessages] identifier[addConstraintsMinMessage] operator[SEP] identifier[String] identifier[property] , identifier[String] identifier[value] 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[CONSTRAINTS_Min_MESSAGE] , identifier[value] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public FlexMessage decodeFlexMessage(IoBuffer in) { if (log.isDebugEnabled()) { log.debug("decodeFlexMessage"); } // TODO: Unknown byte, probably encoding as with Flex SOs? byte flexByte = in.get(); log.trace("Flex byte: {}", flexByte); // Encoding of message params can be mixed - some params may be in AMF0, others in AMF3, // but according to AMF3 spec, we should collect AMF3 references for the whole message body (through all params) org.red5.io.amf3.Input.RefStorage refStorage = new org.red5.io.amf3.Input.RefStorage(); Input input = new org.red5.io.amf.Input(in); String action = Deserializer.deserialize(input, String.class); FlexMessage msg = new FlexMessage(); msg.setTransactionId(readTransactionId(input)); Object[] params = new Object[] {}; if (in.hasRemaining()) { ArrayList<Object> paramList = new ArrayList<>(); final Object obj = Deserializer.deserialize(input, Object.class); if (obj != null) { paramList.add(obj); } while (in.hasRemaining()) { // Check for AMF3 encoding of parameters byte objectEncodingType = in.get(); log.debug("Object encoding: {}", objectEncodingType); in.position(in.position() - 1); switch (objectEncodingType) { case AMF.TYPE_AMF3_OBJECT: case AMF3.TYPE_VECTOR_NUMBER: case AMF3.TYPE_VECTOR_OBJECT: // The next parameter is encoded using AMF3 input = new org.red5.io.amf3.Input(in, refStorage); // Vectors with number and object have to have AMF3 forced ((org.red5.io.amf3.Input) input).enforceAMF3(); break; case AMF3.TYPE_VECTOR_INT: case AMF3.TYPE_VECTOR_UINT: // The next parameter is encoded using AMF3 input = new org.red5.io.amf3.Input(in, refStorage); break; default: // The next parameter is encoded using AMF0 input = new org.red5.io.amf.Input(in); } paramList.add(Deserializer.deserialize(input, Object.class)); } params = paramList.toArray(); if (log.isTraceEnabled()) { log.trace("Parameter count: {}", paramList.size()); for (int i = 0; i < params.length; i++) { log.trace(" > {}: {}", i, params[i]); } } } final int dotIndex = action.lastIndexOf('.'); String serviceName = (dotIndex == -1) ? null : action.substring(0, dotIndex); String serviceMethod = (dotIndex == -1) ? action : action.substring(dotIndex + 1, action.length()); log.debug("Service name: {} method: {}", serviceName, serviceMethod); PendingCall call = new PendingCall(serviceName, serviceMethod, params); msg.setCall(call); return msg; }
class class_name[name] begin[{] method[decodeFlexMessage, return_type[type[FlexMessage]], modifier[public], parameter[in]] begin[{] if[call[log.isDebugEnabled, parameter[]]] begin[{] call[log.debug, parameter[literal["decodeFlexMessage"]]] else begin[{] None end[}] local_variable[type[byte], flexByte] call[log.trace, parameter[literal["Flex byte: {}"], member[.flexByte]]] local_variable[type[org], refStorage] local_variable[type[Input], input] local_variable[type[String], action] local_variable[type[FlexMessage], msg] call[msg.setTransactionId, parameter[call[.readTransactionId, parameter[member[.input]]]]] local_variable[type[Object], params] if[call[in.hasRemaining, parameter[]]] begin[{] local_variable[type[ArrayList], paramList] local_variable[type[Object], obj] if[binary_operation[member[.obj], !=, literal[null]]] begin[{] call[paramList.add, parameter[member[.obj]]] else begin[{] None end[}] while[call[in.hasRemaining, parameter[]]] begin[{] local_variable[type[byte], objectEncodingType] call[log.debug, parameter[literal["Object encoding: {}"], member[.objectEncodingType]]] call[in.position, parameter[binary_operation[call[in.position, parameter[]], -, literal[1]]]] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=TYPE_AMF3_OBJECT, postfix_operators=[], prefix_operators=[], qualifier=AMF, selectors=[]), MemberReference(member=TYPE_VECTOR_NUMBER, postfix_operators=[], prefix_operators=[], qualifier=AMF3, selectors=[]), MemberReference(member=TYPE_VECTOR_OBJECT, postfix_operators=[], prefix_operators=[], qualifier=AMF3, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=refStorage, 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=org, sub_type=ReferenceType(arguments=None, dimensions=None, name=red5, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=amf3, sub_type=ReferenceType(arguments=None, dimensions=None, name=Input, sub_type=None))))))), label=None), StatementExpression(expression=Cast(expression=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=org, sub_type=ReferenceType(arguments=None, dimensions=None, name=red5, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=amf3, sub_type=ReferenceType(arguments=None, dimensions=None, name=Input, sub_type=None)))))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=TYPE_VECTOR_INT, postfix_operators=[], prefix_operators=[], qualifier=AMF3, selectors=[]), MemberReference(member=TYPE_VECTOR_UINT, postfix_operators=[], prefix_operators=[], qualifier=AMF3, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=refStorage, 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=org, sub_type=ReferenceType(arguments=None, dimensions=None, name=red5, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=amf3, sub_type=ReferenceType(arguments=None, dimensions=None, name=Input, sub_type=None))))))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=in, 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=org, sub_type=ReferenceType(arguments=None, dimensions=None, name=red5, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=amf, sub_type=ReferenceType(arguments=None, dimensions=None, name=Input, sub_type=None))))))), label=None)])], expression=MemberReference(member=objectEncodingType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) call[paramList.add, parameter[call[Deserializer.deserialize, parameter[member[.input], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]]]] end[}] assign[member[.params], call[paramList.toArray, parameter[]]] if[call[log.isTraceEnabled, parameter[]]] begin[{] call[log.trace, parameter[literal["Parameter count: {}"], call[paramList.size, parameter[]]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" > {}: {}"), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=trace, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=params, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] else begin[{] None end[}] local_variable[type[int], dotIndex] local_variable[type[String], serviceName] local_variable[type[String], serviceMethod] call[log.debug, parameter[literal["Service name: {} method: {}"], member[.serviceName], member[.serviceMethod]]] local_variable[type[PendingCall], call] call[msg.setCall, parameter[member[.call]]] return[member[.msg]] end[}] END[}]
Keyword[public] identifier[FlexMessage] identifier[decodeFlexMessage] operator[SEP] identifier[IoBuffer] identifier[in] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[byte] identifier[flexByte] operator[=] identifier[in] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[flexByte] operator[SEP] operator[SEP] identifier[org] operator[SEP] identifier[red5] operator[SEP] identifier[io] operator[SEP] identifier[amf3] operator[SEP] identifier[Input] operator[SEP] identifier[RefStorage] identifier[refStorage] operator[=] Keyword[new] identifier[org] operator[SEP] identifier[red5] operator[SEP] identifier[io] operator[SEP] identifier[amf3] operator[SEP] identifier[Input] operator[SEP] identifier[RefStorage] operator[SEP] operator[SEP] operator[SEP] identifier[Input] identifier[input] operator[=] Keyword[new] identifier[org] operator[SEP] identifier[red5] operator[SEP] identifier[io] operator[SEP] identifier[amf] operator[SEP] identifier[Input] operator[SEP] identifier[in] operator[SEP] operator[SEP] identifier[String] identifier[action] operator[=] identifier[Deserializer] operator[SEP] identifier[deserialize] operator[SEP] identifier[input] , identifier[String] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[FlexMessage] identifier[msg] operator[=] Keyword[new] identifier[FlexMessage] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[setTransactionId] operator[SEP] identifier[readTransactionId] operator[SEP] identifier[input] operator[SEP] operator[SEP] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[params] operator[=] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { } operator[SEP] Keyword[if] operator[SEP] identifier[in] operator[SEP] identifier[hasRemaining] operator[SEP] operator[SEP] operator[SEP] { identifier[ArrayList] operator[<] identifier[Object] operator[>] identifier[paramList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Object] identifier[obj] operator[=] identifier[Deserializer] operator[SEP] identifier[deserialize] operator[SEP] identifier[input] , identifier[Object] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[obj] operator[!=] Other[null] operator[SEP] { identifier[paramList] operator[SEP] identifier[add] operator[SEP] identifier[obj] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] identifier[in] operator[SEP] identifier[hasRemaining] operator[SEP] operator[SEP] operator[SEP] { Keyword[byte] identifier[objectEncodingType] operator[=] identifier[in] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[objectEncodingType] operator[SEP] operator[SEP] identifier[in] operator[SEP] identifier[position] operator[SEP] identifier[in] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[objectEncodingType] operator[SEP] { Keyword[case] identifier[AMF] operator[SEP] identifier[TYPE_AMF3_OBJECT] operator[:] Keyword[case] identifier[AMF3] operator[SEP] identifier[TYPE_VECTOR_NUMBER] operator[:] Keyword[case] identifier[AMF3] operator[SEP] identifier[TYPE_VECTOR_OBJECT] operator[:] identifier[input] operator[=] Keyword[new] identifier[org] operator[SEP] identifier[red5] operator[SEP] identifier[io] operator[SEP] identifier[amf3] operator[SEP] identifier[Input] operator[SEP] identifier[in] , identifier[refStorage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[org] operator[SEP] identifier[red5] operator[SEP] identifier[io] operator[SEP] identifier[amf3] operator[SEP] identifier[Input] operator[SEP] identifier[input] operator[SEP] operator[SEP] identifier[enforceAMF3] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[AMF3] operator[SEP] identifier[TYPE_VECTOR_INT] operator[:] Keyword[case] identifier[AMF3] operator[SEP] identifier[TYPE_VECTOR_UINT] operator[:] identifier[input] operator[=] Keyword[new] identifier[org] operator[SEP] identifier[red5] operator[SEP] identifier[io] operator[SEP] identifier[amf3] operator[SEP] identifier[Input] operator[SEP] identifier[in] , identifier[refStorage] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[input] operator[=] Keyword[new] identifier[org] operator[SEP] identifier[red5] operator[SEP] identifier[io] operator[SEP] identifier[amf] operator[SEP] identifier[Input] operator[SEP] identifier[in] operator[SEP] operator[SEP] } identifier[paramList] operator[SEP] identifier[add] operator[SEP] identifier[Deserializer] operator[SEP] identifier[deserialize] operator[SEP] identifier[input] , identifier[Object] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] } identifier[params] operator[=] identifier[paramList] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[paramList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[params] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[log] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[i] , identifier[params] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[final] Keyword[int] identifier[dotIndex] operator[=] identifier[action] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[serviceName] operator[=] operator[SEP] identifier[dotIndex] operator[==] operator[-] Other[1] operator[SEP] operator[?] Other[null] operator[:] identifier[action] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[dotIndex] operator[SEP] operator[SEP] identifier[String] identifier[serviceMethod] operator[=] operator[SEP] identifier[dotIndex] operator[==] operator[-] Other[1] operator[SEP] operator[?] identifier[action] operator[:] identifier[action] operator[SEP] identifier[substring] operator[SEP] identifier[dotIndex] operator[+] Other[1] , identifier[action] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[serviceName] , identifier[serviceMethod] operator[SEP] operator[SEP] identifier[PendingCall] identifier[call] operator[=] Keyword[new] identifier[PendingCall] operator[SEP] identifier[serviceName] , identifier[serviceMethod] , identifier[params] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[setCall] operator[SEP] identifier[call] operator[SEP] operator[SEP] Keyword[return] identifier[msg] operator[SEP] }
public List<CallbackMetadata> getCallbacks(CallbackType callbackType) { return callbacks == null ? null : callbacks.get(callbackType); }
class class_name[name] begin[{] method[getCallbacks, return_type[type[List]], modifier[public], parameter[callbackType]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=callbacks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=callbackType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=callbacks, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[CallbackMetadata] operator[>] identifier[getCallbacks] operator[SEP] identifier[CallbackType] identifier[callbackType] operator[SEP] { Keyword[return] identifier[callbacks] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[callbacks] operator[SEP] identifier[get] operator[SEP] identifier[callbackType] operator[SEP] operator[SEP] }
public JFreeChartRender setDomainAxis(double lowerBound, double upperBound) { ValueAxis valueAxis = getPlot().getDomainAxis(); valueAxis.setUpperBound(upperBound); valueAxis.setLowerBound(lowerBound); return this; }
class class_name[name] begin[{] method[setDomainAxis, return_type[type[JFreeChartRender]], modifier[public], parameter[lowerBound, upperBound]] begin[{] local_variable[type[ValueAxis], valueAxis] call[valueAxis.setUpperBound, parameter[member[.upperBound]]] call[valueAxis.setLowerBound, parameter[member[.lowerBound]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[JFreeChartRender] identifier[setDomainAxis] operator[SEP] Keyword[double] identifier[lowerBound] , Keyword[double] identifier[upperBound] operator[SEP] { identifier[ValueAxis] identifier[valueAxis] operator[=] identifier[getPlot] operator[SEP] operator[SEP] operator[SEP] identifier[getDomainAxis] operator[SEP] operator[SEP] operator[SEP] identifier[valueAxis] operator[SEP] identifier[setUpperBound] operator[SEP] identifier[upperBound] operator[SEP] operator[SEP] identifier[valueAxis] operator[SEP] identifier[setLowerBound] operator[SEP] identifier[lowerBound] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void setRawQuery(char[] escapedQuery) throws URIException { if (escapedQuery == null || escapedQuery.length == 0) { _query = escapedQuery; setURI(); return; } // remove the fragment identifier escapedQuery = removeFragmentIdentifier(escapedQuery); if (!validate(escapedQuery, query)) { throw new URIException(URIException.ESCAPING, "escaped query not valid"); } _query = escapedQuery; setURI(); }
class class_name[name] begin[{] method[setRawQuery, return_type[void], modifier[public], parameter[escapedQuery]] begin[{] if[binary_operation[binary_operation[member[.escapedQuery], ==, literal[null]], ||, binary_operation[member[escapedQuery.length], ==, literal[0]]]] begin[{] assign[member[._query], member[.escapedQuery]] call[.setURI, parameter[]] return[None] else begin[{] None end[}] assign[member[.escapedQuery], call[.removeFragmentIdentifier, parameter[member[.escapedQuery]]]] if[call[.validate, parameter[member[.escapedQuery], member[.query]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ESCAPING, postfix_operators=[], prefix_operators=[], qualifier=URIException, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="escaped query not valid")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=URIException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[._query], member[.escapedQuery]] call[.setURI, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setRawQuery] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[escapedQuery] operator[SEP] Keyword[throws] identifier[URIException] { Keyword[if] operator[SEP] identifier[escapedQuery] operator[==] Other[null] operator[||] identifier[escapedQuery] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { identifier[_query] operator[=] identifier[escapedQuery] operator[SEP] identifier[setURI] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[escapedQuery] operator[=] identifier[removeFragmentIdentifier] operator[SEP] identifier[escapedQuery] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[validate] operator[SEP] identifier[escapedQuery] , identifier[query] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[URIException] operator[SEP] identifier[URIException] operator[SEP] identifier[ESCAPING] , literal[String] operator[SEP] operator[SEP] } identifier[_query] operator[=] identifier[escapedQuery] operator[SEP] identifier[setURI] operator[SEP] operator[SEP] operator[SEP] }
public static GitRepositoryState get() { if (gitRepositoryState == null) { Properties properties = new Properties(); try { properties.load(GitRepositoryState.class.getClassLoader().getResourceAsStream("git.properties")); } catch (IOException e) { e.printStackTrace(); } gitRepositoryState = new GitRepositoryState(properties); } return gitRepositoryState; }
class class_name[name] begin[{] method[get, return_type[type[GitRepositoryState]], modifier[public static], parameter[]] begin[{] if[binary_operation[member[.gitRepositoryState], ==, literal[null]]] begin[{] local_variable[type[Properties], properties] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getClassLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="git.properties")], member=getResourceAsStream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=GitRepositoryState, sub_type=None))], member=load, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) assign[member[.gitRepositoryState], ClassCreator(arguments=[MemberReference(member=properties, 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=GitRepositoryState, sub_type=None))] else begin[{] None end[}] return[member[.gitRepositoryState]] end[}] END[}]
Keyword[public] Keyword[static] identifier[GitRepositoryState] identifier[get] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[gitRepositoryState] operator[==] Other[null] operator[SEP] { identifier[Properties] identifier[properties] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[properties] operator[SEP] identifier[load] operator[SEP] identifier[GitRepositoryState] operator[SEP] Keyword[class] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[getResourceAsStream] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } identifier[gitRepositoryState] operator[=] Keyword[new] identifier[GitRepositoryState] operator[SEP] identifier[properties] operator[SEP] operator[SEP] } Keyword[return] identifier[gitRepositoryState] operator[SEP] }
public QueryBuilder call(String method_name, Object ... items) throws Exception { return map(null, method_name, items); }
class class_name[name] begin[{] method[call, return_type[type[QueryBuilder]], modifier[public], parameter[method_name, items]] begin[{] return[call[.map, parameter[literal[null], member[.method_name], member[.items]]]] end[}] END[}]
Keyword[public] identifier[QueryBuilder] identifier[call] operator[SEP] identifier[String] identifier[method_name] , identifier[Object] operator[...] identifier[items] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[return] identifier[map] operator[SEP] Other[null] , identifier[method_name] , identifier[items] operator[SEP] operator[SEP] }
public HttpResponse invoke(String uri, String payload, HttpMethod method) { HttpResponse result = null; String url = directoryAddresses + uri; try { if (method == null || method == HttpMethod.GET) { result = HttpUtils.getJson(url); } else if (method == HttpMethod.POST) { result = HttpUtils.postJson(url, payload); } else if (method == HttpMethod.PUT) { result = HttpUtils.putJson(url, payload); } else if (method == HttpMethod.DELETE) { result = HttpUtils.deleteJson(url); } } catch (IOException e) { String errMsg = "Send HTTP Request to remote Directory Server failed"; LOGGER.error(errMsg); LOGGER.debug(errMsg, e); ServiceDirectoryError sde = new ServiceDirectoryError(ErrorCode.HTTP_CLIENT_ERROR); throw new ServiceException(sde, errMsg, e); } if (result.getHttpCode() < 200 || result.getHttpCode() >= 300) { String errorBody = result.getRetBody(); if(errorBody == null || errorBody.isEmpty()){ LOGGER.error("Invoke remote directory server failed, status=" + result.getHttpCode() + ", Error Message body is empty."); ServiceDirectoryError sde = new ServiceDirectoryError( ErrorCode.REMOTE_DIRECTORY_SERVER_ERROR); throw new ServiceException(sde, "Error Message body is empty."); } ServiceDirectoryError sde = null; try { sde = (ServiceDirectoryError) serializer .deserialize(errorBody.getBytes(), ServiceDirectoryError.class); } catch (IOException e) { String errMsg = "Deserialize error body message failed"; LOGGER.error(errMsg); LOGGER.debug(errMsg + ", messageBody=" + errorBody, e); ServiceDirectoryError sde1 = new ServiceDirectoryError(ErrorCode.REMOTE_DIRECTORY_SERVER_ERROR); throw new ServiceException(sde1, errMsg, e); } if (sde != null) { throw new ServiceException(sde); } } return result; }
class class_name[name] begin[{] method[invoke, return_type[type[HttpResponse]], modifier[public], parameter[uri, payload, method]] begin[{] local_variable[type[HttpResponse], result] local_variable[type[String], url] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=GET, postfix_operators=[], prefix_operators=[], qualifier=HttpMethod, selectors=[]), operator===), operator=||), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=POST, postfix_operators=[], prefix_operators=[], qualifier=HttpMethod, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=PUT, postfix_operators=[], prefix_operators=[], qualifier=HttpMethod, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DELETE, postfix_operators=[], prefix_operators=[], qualifier=HttpMethod, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deleteJson, postfix_operators=[], prefix_operators=[], qualifier=HttpUtils, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=payload, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=putJson, postfix_operators=[], prefix_operators=[], qualifier=HttpUtils, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=payload, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=postJson, postfix_operators=[], prefix_operators=[], qualifier=HttpUtils, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getJson, postfix_operators=[], prefix_operators=[], qualifier=HttpUtils, selectors=[], type_arguments=None)), label=None)]))], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Send HTTP Request to remote Directory Server failed"), name=errMsg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=errMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=errMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=HTTP_CLIENT_ERROR, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServiceDirectoryError, sub_type=None)), name=sde)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ServiceDirectoryError, sub_type=None)), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=sde, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=errMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServiceException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) if[binary_operation[binary_operation[call[result.getHttpCode, parameter[]], <, literal[200]], ||, binary_operation[call[result.getHttpCode, parameter[]], >=, literal[300]]]] begin[{] local_variable[type[String], errorBody] if[binary_operation[binary_operation[member[.errorBody], ==, literal[null]], ||, call[errorBody.isEmpty, parameter[]]]] begin[{] call[LOGGER.error, parameter[binary_operation[binary_operation[literal["Invoke remote directory server failed, status="], +, call[result.getHttpCode, parameter[]]], +, literal[", Error Message body is empty."]]]] local_variable[type[ServiceDirectoryError], sde] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=sde, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error Message body is empty.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServiceException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[ServiceDirectoryError], sde] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sde, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=errorBody, selectors=[], type_arguments=None), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServiceDirectoryError, sub_type=None))], member=deserialize, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ServiceDirectoryError, sub_type=None))), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Deserialize error body message failed"), name=errMsg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=errMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=errMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", messageBody="), operator=+), operandr=MemberReference(member=errorBody, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=REMOTE_DIRECTORY_SERVER_ERROR, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServiceDirectoryError, sub_type=None)), name=sde1)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ServiceDirectoryError, sub_type=None)), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=sde1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=errMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServiceException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.sde], !=, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=sde, 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=ServiceException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[HttpResponse] identifier[invoke] operator[SEP] identifier[String] identifier[uri] , identifier[String] identifier[payload] , identifier[HttpMethod] identifier[method] operator[SEP] { identifier[HttpResponse] identifier[result] operator[=] Other[null] operator[SEP] identifier[String] identifier[url] operator[=] identifier[directoryAddresses] operator[+] identifier[uri] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[method] operator[==] Other[null] operator[||] identifier[method] operator[==] identifier[HttpMethod] operator[SEP] identifier[GET] operator[SEP] { identifier[result] operator[=] identifier[HttpUtils] operator[SEP] identifier[getJson] operator[SEP] identifier[url] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[method] operator[==] identifier[HttpMethod] operator[SEP] identifier[POST] operator[SEP] { identifier[result] operator[=] identifier[HttpUtils] operator[SEP] identifier[postJson] operator[SEP] identifier[url] , identifier[payload] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[method] operator[==] identifier[HttpMethod] operator[SEP] identifier[PUT] operator[SEP] { identifier[result] operator[=] identifier[HttpUtils] operator[SEP] identifier[putJson] operator[SEP] identifier[url] , identifier[payload] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[method] operator[==] identifier[HttpMethod] operator[SEP] identifier[DELETE] operator[SEP] { identifier[result] operator[=] identifier[HttpUtils] operator[SEP] identifier[deleteJson] operator[SEP] identifier[url] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[String] identifier[errMsg] operator[=] literal[String] operator[SEP] identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] identifier[errMsg] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] identifier[errMsg] , identifier[e] operator[SEP] operator[SEP] identifier[ServiceDirectoryError] identifier[sde] operator[=] Keyword[new] identifier[ServiceDirectoryError] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[HTTP_CLIENT_ERROR] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ServiceException] operator[SEP] identifier[sde] , identifier[errMsg] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[getHttpCode] operator[SEP] operator[SEP] operator[<] Other[200] operator[||] identifier[result] operator[SEP] identifier[getHttpCode] operator[SEP] operator[SEP] operator[>=] Other[300] operator[SEP] { identifier[String] identifier[errorBody] operator[=] identifier[result] operator[SEP] identifier[getRetBody] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[errorBody] operator[==] Other[null] operator[||] identifier[errorBody] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[result] operator[SEP] identifier[getHttpCode] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[ServiceDirectoryError] identifier[sde] operator[=] Keyword[new] identifier[ServiceDirectoryError] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[REMOTE_DIRECTORY_SERVER_ERROR] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ServiceException] operator[SEP] identifier[sde] , literal[String] operator[SEP] operator[SEP] } identifier[ServiceDirectoryError] identifier[sde] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[sde] operator[=] operator[SEP] identifier[ServiceDirectoryError] operator[SEP] identifier[serializer] operator[SEP] identifier[deserialize] operator[SEP] identifier[errorBody] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] , identifier[ServiceDirectoryError] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[String] identifier[errMsg] operator[=] literal[String] operator[SEP] identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] identifier[errMsg] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] identifier[errMsg] operator[+] literal[String] operator[+] identifier[errorBody] , identifier[e] operator[SEP] operator[SEP] identifier[ServiceDirectoryError] identifier[sde1] operator[=] Keyword[new] identifier[ServiceDirectoryError] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[REMOTE_DIRECTORY_SERVER_ERROR] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ServiceException] operator[SEP] identifier[sde1] , identifier[errMsg] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[sde] operator[!=] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServiceException] operator[SEP] identifier[sde] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
public static String getString(String key) { if (RESOURCE_BUNDLE == null) throw new RuntimeException("Localized messages from resource bundle '" + BUNDLE_NAME + "' not loaded during initialization of driver."); try { if (key == null) throw new IllegalArgumentException("Message key can not be null"); String message = RESOURCE_BUNDLE.getString(key); if (message == null) message = "Missing error message for key '" + key + "'"; return message; } catch (MissingResourceException e) { return '!' + key + '!'; } }
class class_name[name] begin[{] method[getString, return_type[type[String]], modifier[public static], parameter[key]] begin[{] if[binary_operation[member[.RESOURCE_BUNDLE], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Localized messages from resource bundle '"), operandr=MemberReference(member=BUNDLE_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' not loaded during initialization of driver."), operator=+)], 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) else begin[{] None end[}] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Message key can not be null")], 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)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=RESOURCE_BUNDLE, selectors=[], type_arguments=None), name=message)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Missing error message for key '"), operandr=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)), label=None)), ReturnStatement(expression=MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='!'), operandr=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='!'), operator=+), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MissingResourceException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getString] operator[SEP] identifier[String] identifier[key] operator[SEP] { Keyword[if] operator[SEP] identifier[RESOURCE_BUNDLE] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[BUNDLE_NAME] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[message] operator[=] identifier[RESOURCE_BUNDLE] operator[SEP] identifier[getString] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[message] operator[==] Other[null] operator[SEP] identifier[message] operator[=] literal[String] operator[+] identifier[key] operator[+] literal[String] operator[SEP] Keyword[return] identifier[message] operator[SEP] } Keyword[catch] operator[SEP] identifier[MissingResourceException] identifier[e] operator[SEP] { Keyword[return] literal[String] operator[+] identifier[key] operator[+] literal[String] operator[SEP] } }
private void advance() { try { if (tok == null) tok = source.token(); } catch (LexerException e) { throw new IllegalStateException(e); } catch (IOException e) { throw new IllegalStateException(e); } }
class class_name[name] begin[{] method[advance, return_type[void], modifier[private], parameter[]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tok, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=tok, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=token, postfix_operators=[], prefix_operators=[], qualifier=source, selectors=[], type_arguments=None)), label=None))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['LexerException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[advance] operator[SEP] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[tok] operator[==] Other[null] operator[SEP] identifier[tok] operator[=] identifier[source] operator[SEP] identifier[token] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[LexerException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
private void addChannel(Channel chan) { if (channelList == null) { channelList = new Channel[1]; channelList[0] = chan; } else { Channel[] oldList = channelList; channelList = new Channel[oldList.length + 1]; System.arraycopy(oldList, 0, channelList, 0, oldList.length); channelList[oldList.length] = chan; } }
class class_name[name] begin[{] method[addChannel, return_type[void], modifier[private], parameter[chan]] begin[{] if[binary_operation[member[.channelList], ==, literal[null]]] begin[{] assign[member[.channelList], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Channel, sub_type=None))] assign[member[.channelList], member[.chan]] else begin[{] local_variable[type[Channel], oldList] assign[member[.channelList], ArrayCreator(dimensions=[BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=oldList, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Channel, sub_type=None))] call[System.arraycopy, parameter[member[.oldList], literal[0], member[.channelList], literal[0], member[oldList.length]]] assign[member[.channelList], member[.chan]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[addChannel] operator[SEP] identifier[Channel] identifier[chan] operator[SEP] { Keyword[if] operator[SEP] identifier[channelList] operator[==] Other[null] operator[SEP] { identifier[channelList] operator[=] Keyword[new] identifier[Channel] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[channelList] operator[SEP] Other[0] operator[SEP] operator[=] identifier[chan] operator[SEP] } Keyword[else] { identifier[Channel] operator[SEP] operator[SEP] identifier[oldList] operator[=] identifier[channelList] operator[SEP] identifier[channelList] operator[=] Keyword[new] identifier[Channel] operator[SEP] identifier[oldList] operator[SEP] identifier[length] operator[+] Other[1] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[oldList] , Other[0] , identifier[channelList] , Other[0] , identifier[oldList] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[channelList] operator[SEP] identifier[oldList] operator[SEP] identifier[length] operator[SEP] operator[=] identifier[chan] operator[SEP] } }
public int compareTo(DateValue dv) { long dvComparable = (((((long) dv.year()) << 4) + dv.month()) << 5) + dv.day(); long dtbComparable = ((((long) year << 4) + month << 5)) + day; if (dv instanceof TimeValue) { TimeValue tv = (TimeValue) dv; dvComparable = (((((dvComparable << 5) + tv.hour()) << 6) + tv.minute()) << 6) + tv.second(); dtbComparable = (((((dtbComparable << 5) + hour) << 6) + minute) << 6) + second; } long delta = dtbComparable - dvComparable; return delta < 0 ? -1 : delta == 0 ? 0 : 1; }
class class_name[name] begin[{] method[compareTo, return_type[type[int]], modifier[public], parameter[dv]] begin[{] local_variable[type[long], dvComparable] local_variable[type[long], dtbComparable] if[binary_operation[member[.dv], instanceof, type[TimeValue]]] begin[{] local_variable[type[TimeValue], tv] assign[member[.dvComparable], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[.dvComparable], <<, literal[5]], +, call[tv.hour, parameter[]]], <<, literal[6]], +, call[tv.minute, parameter[]]], <<, literal[6]], +, call[tv.second, parameter[]]]] assign[member[.dtbComparable], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[.dtbComparable], <<, literal[5]], +, member[.hour]], <<, literal[6]], +, member[.minute]], <<, literal[6]], +, member[.second]]] else begin[{] None end[}] local_variable[type[long], delta] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=delta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), if_false=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=delta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), if_true=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1))] end[}] END[}]
Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[DateValue] identifier[dv] operator[SEP] { Keyword[long] identifier[dvComparable] operator[=] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[long] operator[SEP] identifier[dv] operator[SEP] identifier[year] operator[SEP] operator[SEP] operator[SEP] operator[<<] Other[4] operator[SEP] operator[+] identifier[dv] operator[SEP] identifier[month] operator[SEP] operator[SEP] operator[SEP] operator[<<] Other[5] operator[SEP] operator[+] identifier[dv] operator[SEP] identifier[day] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[dtbComparable] operator[=] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[long] operator[SEP] identifier[year] operator[<<] Other[4] operator[SEP] operator[+] identifier[month] operator[<<] Other[5] operator[SEP] operator[SEP] operator[+] identifier[day] operator[SEP] Keyword[if] operator[SEP] identifier[dv] Keyword[instanceof] identifier[TimeValue] operator[SEP] { identifier[TimeValue] identifier[tv] operator[=] operator[SEP] identifier[TimeValue] operator[SEP] identifier[dv] operator[SEP] identifier[dvComparable] operator[=] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[dvComparable] operator[<<] Other[5] operator[SEP] operator[+] identifier[tv] operator[SEP] identifier[hour] operator[SEP] operator[SEP] operator[SEP] operator[<<] Other[6] operator[SEP] operator[+] identifier[tv] operator[SEP] identifier[minute] operator[SEP] operator[SEP] operator[SEP] operator[<<] Other[6] operator[SEP] operator[+] identifier[tv] operator[SEP] identifier[second] operator[SEP] operator[SEP] operator[SEP] identifier[dtbComparable] operator[=] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[dtbComparable] operator[<<] Other[5] operator[SEP] operator[+] identifier[hour] operator[SEP] operator[<<] Other[6] operator[SEP] operator[+] identifier[minute] operator[SEP] operator[<<] Other[6] operator[SEP] operator[+] identifier[second] operator[SEP] } Keyword[long] identifier[delta] operator[=] identifier[dtbComparable] operator[-] identifier[dvComparable] operator[SEP] Keyword[return] identifier[delta] operator[<] Other[0] operator[?] operator[-] Other[1] operator[:] identifier[delta] operator[==] Other[0] operator[?] Other[0] operator[:] Other[1] operator[SEP] }
public static int d(BitSet x, BitSet y) { if (x.size() != y.size()) throw new IllegalArgumentException(String.format("BitSets have different length: x[%d], y[%d]", x.size(), y.size())); int dist = 0; for (int i = 0; i < x.size(); i++) { if (x.get(i) != y.get(i)) dist++; } return dist; }
class class_name[name] begin[{] method[d, return_type[type[int]], modifier[public static], parameter[x, y]] begin[{] if[binary_operation[call[x.size, parameter[]], !=, call[y.size, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BitSets have different length: x[%d], y[%d]"), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=x, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=y, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], dist] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=x, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=y, selectors=[], type_arguments=None), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MemberReference(member=dist, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=x, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.dist]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[d] operator[SEP] identifier[BitSet] identifier[x] , identifier[BitSet] identifier[y] operator[SEP] { Keyword[if] operator[SEP] identifier[x] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[!=] identifier[y] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[x] operator[SEP] identifier[size] operator[SEP] operator[SEP] , identifier[y] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[dist] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[x] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[x] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[!=] identifier[y] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[dist] operator[++] operator[SEP] } Keyword[return] identifier[dist] operator[SEP] }
public final static Function<BigDecimal, BigDecimal> remainder(short divisor, MathContext mathContext) { return remainder(Short.valueOf(divisor), mathContext); }
class class_name[name] begin[{] method[remainder, return_type[type[Function]], modifier[final public static], parameter[divisor, mathContext]] begin[{] return[call[.remainder, parameter[call[Short.valueOf, parameter[member[.divisor]]], member[.mathContext]]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[static] identifier[Function] operator[<] identifier[BigDecimal] , identifier[BigDecimal] operator[>] identifier[remainder] operator[SEP] Keyword[short] identifier[divisor] , identifier[MathContext] identifier[mathContext] operator[SEP] { Keyword[return] identifier[remainder] operator[SEP] identifier[Short] operator[SEP] identifier[valueOf] operator[SEP] identifier[divisor] operator[SEP] , identifier[mathContext] operator[SEP] operator[SEP] }
@XmlElementDecl(namespace = "http://www.w3.org/1998/Math/MathML", name = "real") public JAXBElement<ArithType> createReal(ArithType value) { return new JAXBElement<ArithType>(_Real_QNAME, ArithType.class, null, value); }
class class_name[name] begin[{] method[createReal, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_Real_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArithType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ArithType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[ArithType] operator[>] identifier[createReal] operator[SEP] identifier[ArithType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[ArithType] operator[>] operator[SEP] identifier[_Real_QNAME] , identifier[ArithType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
public static location[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{ location obj = new location(); options option = new options(); option.set_filter(filter); location[] response = (location[]) obj.getfiltered(service, option); return response; }
class class_name[name] begin[{] method[get_filtered, return_type[type[location]], modifier[public static], parameter[service, filter]] begin[{] local_variable[type[location], obj] local_variable[type[options], option] call[option.set_filter, parameter[member[.filter]]] local_variable[type[location], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[location] operator[SEP] operator[SEP] identifier[get_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[filtervalue] operator[SEP] operator[SEP] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] { identifier[location] identifier[obj] operator[=] Keyword[new] identifier[location] operator[SEP] operator[SEP] operator[SEP] identifier[options] identifier[option] operator[=] Keyword[new] identifier[options] operator[SEP] operator[SEP] operator[SEP] identifier[option] operator[SEP] identifier[set_filter] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[location] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[location] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[getfiltered] operator[SEP] identifier[service] , identifier[option] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public static String emptyToNull(String str) { return (str != null && !str.isEmpty()) ? str : null; }
class class_name[name] begin[{] method[emptyToNull, return_type[type[String]], modifier[public static], parameter[str]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=str, 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=str, selectors=[], type_arguments=None), operator=&&), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[emptyToNull] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[return] operator[SEP] identifier[str] operator[!=] Other[null] operator[&&] operator[!] identifier[str] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[?] identifier[str] operator[:] Other[null] operator[SEP] }
void afterRead(Node<K, V> node) { final int bufferIndex = readBufferIndex(); final long writeCount = recordRead(bufferIndex, node); drainOnReadIfNeeded(bufferIndex, writeCount); notifyListener(); }
class class_name[name] begin[{] method[afterRead, return_type[void], modifier[default], parameter[node]] begin[{] local_variable[type[int], bufferIndex] local_variable[type[long], writeCount] call[.drainOnReadIfNeeded, parameter[member[.bufferIndex], member[.writeCount]]] call[.notifyListener, parameter[]] end[}] END[}]
Keyword[void] identifier[afterRead] operator[SEP] identifier[Node] operator[<] identifier[K] , identifier[V] operator[>] identifier[node] operator[SEP] { Keyword[final] Keyword[int] identifier[bufferIndex] operator[=] identifier[readBufferIndex] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[long] identifier[writeCount] operator[=] identifier[recordRead] operator[SEP] identifier[bufferIndex] , identifier[node] operator[SEP] operator[SEP] identifier[drainOnReadIfNeeded] operator[SEP] identifier[bufferIndex] , identifier[writeCount] operator[SEP] operator[SEP] identifier[notifyListener] operator[SEP] operator[SEP] operator[SEP] }
public com.squareup.okhttp.Call deleteNodeAsync(String path, String name, final ApiCallback<Void> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = deleteNodeValidateBeforeCall(path, name, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; }
class class_name[name] begin[{] method[deleteNodeAsync, return_type[type[com]], modifier[public], parameter[path, name, callback]] begin[{] local_variable[type[ProgressResponseBody], progressListener] local_variable[type[ProgressRequestBody], progressRequestListener] if[binary_operation[member[.callback], !=, literal[null]]] begin[{] assign[member[.progressListener], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bytesRead, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=contentLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=done, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onDownloadProgress, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=update, parameters=[FormalParameter(annotations=[], modifiers=set(), name=bytesRead, type=BasicType(dimensions=[], name=long), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=contentLength, type=BasicType(dimensions=[], name=long), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=done, type=BasicType(dimensions=[], name=boolean), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProgressResponseBody, sub_type=ReferenceType(arguments=None, dimensions=None, name=ProgressListener, sub_type=None)))] assign[member[.progressRequestListener], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bytesWritten, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=contentLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=done, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onUploadProgress, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onRequestProgress, parameters=[FormalParameter(annotations=[], modifiers=set(), name=bytesWritten, type=BasicType(dimensions=[], name=long), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=contentLength, type=BasicType(dimensions=[], name=long), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=done, type=BasicType(dimensions=[], name=boolean), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProgressRequestBody, sub_type=ReferenceType(arguments=None, dimensions=None, name=ProgressRequestListener, sub_type=None)))] else begin[{] None end[}] local_variable[type[com], call] call[apiClient.executeAsync, parameter[member[.call], member[.callback]]] return[member[.call]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[deleteNodeAsync] operator[SEP] identifier[String] identifier[path] , identifier[String] identifier[name] , Keyword[final] identifier[ApiCallback] operator[<] identifier[Void] operator[>] identifier[callback] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[ProgressResponseBody] operator[SEP] identifier[ProgressListener] identifier[progressListener] operator[=] Other[null] operator[SEP] identifier[ProgressRequestBody] operator[SEP] identifier[ProgressRequestListener] identifier[progressRequestListener] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[callback] operator[!=] Other[null] operator[SEP] { identifier[progressListener] operator[=] Keyword[new] identifier[ProgressResponseBody] operator[SEP] identifier[ProgressListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[update] operator[SEP] Keyword[long] identifier[bytesRead] , Keyword[long] identifier[contentLength] , Keyword[boolean] identifier[done] operator[SEP] { identifier[callback] operator[SEP] identifier[onDownloadProgress] operator[SEP] identifier[bytesRead] , identifier[contentLength] , identifier[done] operator[SEP] operator[SEP] } } operator[SEP] identifier[progressRequestListener] operator[=] Keyword[new] identifier[ProgressRequestBody] operator[SEP] identifier[ProgressRequestListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onRequestProgress] operator[SEP] Keyword[long] identifier[bytesWritten] , Keyword[long] identifier[contentLength] , Keyword[boolean] identifier[done] operator[SEP] { identifier[callback] operator[SEP] identifier[onUploadProgress] operator[SEP] identifier[bytesWritten] , identifier[contentLength] , identifier[done] operator[SEP] operator[SEP] } } operator[SEP] } identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[deleteNodeValidateBeforeCall] operator[SEP] identifier[path] , identifier[name] , identifier[progressListener] , identifier[progressRequestListener] operator[SEP] operator[SEP] identifier[apiClient] operator[SEP] identifier[executeAsync] operator[SEP] identifier[call] , identifier[callback] operator[SEP] operator[SEP] Keyword[return] identifier[call] operator[SEP] }
private Set<String> cleanUpResult(Set<String> s) { s.remove(null); return s; }
class class_name[name] begin[{] method[cleanUpResult, return_type[type[Set]], modifier[private], parameter[s]] begin[{] call[s.remove, parameter[literal[null]]] return[member[.s]] end[}] END[}]
Keyword[private] identifier[Set] operator[<] identifier[String] operator[>] identifier[cleanUpResult] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[s] operator[SEP] { identifier[s] operator[SEP] identifier[remove] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[s] operator[SEP] }
public OvhOfficeTask serviceName_configureDomain_POST(String serviceName, String domain, OvhSupportedServiceEnum[] supportedServices) throws IOException { String qPath = "/saas/csp2/{serviceName}/configureDomain"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "domain", domain); addBody(o, "supportedServices", supportedServices); String resp = exec(qPath, "POST", sb.toString(), o); return convertTo(resp, OvhOfficeTask.class); }
class class_name[name] begin[{] method[serviceName_configureDomain_POST, return_type[type[OvhOfficeTask]], modifier[public], parameter[serviceName, domain, supportedServices]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[HashMap], o] call[.addBody, parameter[member[.o], literal["domain"], member[.domain]]] call[.addBody, parameter[member[.o], literal["supportedServices"], member[.supportedServices]]] 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=OvhOfficeTask, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[OvhOfficeTask] identifier[serviceName_configureDomain_POST] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[domain] , identifier[OvhSupportedServiceEnum] operator[SEP] operator[SEP] identifier[supportedServices] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[serviceName] operator[SEP] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[o] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[domain] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[supportedServices] 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] , identifier[o] operator[SEP] operator[SEP] Keyword[return] identifier[convertTo] operator[SEP] identifier[resp] , identifier[OvhOfficeTask] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public static KDF hkdf(Algorithm<MAC> mac, byte[] info, int dkLen) { return new HKDF(mac, info, dkLen); }
class class_name[name] begin[{] method[hkdf, return_type[type[KDF]], modifier[public static], parameter[mac, info, dkLen]] begin[{] return[ClassCreator(arguments=[MemberReference(member=mac, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=info, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dkLen, 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=HKDF, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[KDF] identifier[hkdf] operator[SEP] identifier[Algorithm] operator[<] identifier[MAC] operator[>] identifier[mac] , Keyword[byte] operator[SEP] operator[SEP] identifier[info] , Keyword[int] identifier[dkLen] operator[SEP] { Keyword[return] Keyword[new] identifier[HKDF] operator[SEP] identifier[mac] , identifier[info] , identifier[dkLen] operator[SEP] operator[SEP] }
@SuppressWarnings({"unused", "WeakerAccess"}) public void pushEvent(String eventName, Map<String, Object> eventActions) { if (eventName == null || eventName.equals("")) return; ValidationResult validationResult = validator.isRestrictedEventName(eventName); // Check for a restricted event name if (validationResult.getErrorCode()>0) { pushValidationResult(validationResult); return; } if (eventActions == null) { eventActions = new HashMap<>(); } JSONObject event = new JSONObject(); try { // Validate ValidationResult vr = validator.cleanEventName(eventName); // Check for an error if (vr.getErrorCode() != 0) event.put(Constants.ERROR_KEY, getErrorObject(vr)); eventName = vr.getObject().toString(); JSONObject actions = new JSONObject(); for (String key : eventActions.keySet()) { Object value = eventActions.get(key); vr = validator.cleanObjectKey(key); key = vr.getObject().toString(); // Check for an error if (vr.getErrorCode() != 0) event.put(Constants.ERROR_KEY, getErrorObject(vr)); try { vr = validator.cleanObjectValue(value, Validator.ValidationContext.Event); } catch (IllegalArgumentException e) { // The object was neither a String, Boolean, or any number primitives ValidationResult error = new ValidationResult(); error.setErrorCode(512); final String err = "For event \"" + eventName + "\": Property value for property " + key + " wasn't a primitive (" + value + ")"; error.setErrorDesc(err); getConfigLogger().debug(getAccountId(), err); pushValidationResult(error); // Skip this record continue; } value = vr.getObject(); // Check for an error if (vr.getErrorCode() != 0) event.put(Constants.ERROR_KEY, getErrorObject(vr)); actions.put(key, value); } event.put("evtName", eventName); event.put("evtData", actions); queueEvent(context, event, Constants.RAISED_EVENT); } catch (Throwable t) { // We won't get here } }
class class_name[name] begin[{] method[pushEvent, return_type[void], modifier[public], parameter[eventName, eventActions]] begin[{] if[binary_operation[binary_operation[member[.eventName], ==, literal[null]], ||, call[eventName.equals, parameter[literal[""]]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[ValidationResult], validationResult] if[binary_operation[call[validationResult.getErrorCode, parameter[]], >, literal[0]]] begin[{] call[.pushValidationResult, parameter[member[.validationResult]]] return[None] else begin[{] None end[}] if[binary_operation[member[.eventActions], ==, literal[null]]] begin[{] assign[member[.eventActions], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=HashMap, sub_type=None))] else begin[{] None end[}] local_variable[type[JSONObject], event] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=eventName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cleanEventName, postfix_operators=[], prefix_operators=[], qualifier=validator, selectors=[], type_arguments=None), name=vr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ValidationResult, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getErrorCode, postfix_operators=[], prefix_operators=[], qualifier=vr, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ERROR_KEY, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), MethodInvocation(arguments=[MemberReference(member=vr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getErrorObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=eventName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getObject, postfix_operators=[], prefix_operators=[], qualifier=vr, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JSONObject, sub_type=None)), name=actions)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JSONObject, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=eventActions, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=vr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cleanObjectKey, postfix_operators=[], prefix_operators=[], qualifier=validator, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getObject, postfix_operators=[], prefix_operators=[], qualifier=vr, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getErrorCode, postfix_operators=[], prefix_operators=[], qualifier=vr, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ERROR_KEY, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), MethodInvocation(arguments=[MemberReference(member=vr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getErrorObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), label=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=vr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=Event, postfix_operators=[], prefix_operators=[], qualifier=Validator.ValidationContext, selectors=[])], member=cleanObjectValue, postfix_operators=[], prefix_operators=[], qualifier=validator, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ValidationResult, sub_type=None)), name=error)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ValidationResult, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=512)], member=setErrorCode, postfix_operators=[], prefix_operators=[], qualifier=error, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="For event \""), operandr=MemberReference(member=eventName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\": Property value for property "), operator=+), operandr=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" wasn't a primitive ("), operator=+), operandr=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=")"), operator=+), name=err)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setErrorDesc, postfix_operators=[], prefix_operators=[], qualifier=error, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getConfigLogger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAccountId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushValidationResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getObject, postfix_operators=[], prefix_operators=[], qualifier=vr, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getErrorCode, postfix_operators=[], prefix_operators=[], qualifier=vr, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ERROR_KEY, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), MethodInvocation(arguments=[MemberReference(member=vr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getErrorObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=actions, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=eventActions, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="evtName"), MemberReference(member=eventName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="evtData"), MemberReference(member=actions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=RAISED_EVENT, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=queueEvent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] Keyword[public] Keyword[void] identifier[pushEvent] operator[SEP] identifier[String] identifier[eventName] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[eventActions] operator[SEP] { Keyword[if] operator[SEP] identifier[eventName] operator[==] Other[null] operator[||] identifier[eventName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[ValidationResult] identifier[validationResult] operator[=] identifier[validator] operator[SEP] identifier[isRestrictedEventName] operator[SEP] identifier[eventName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[validationResult] operator[SEP] identifier[getErrorCode] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[pushValidationResult] operator[SEP] identifier[validationResult] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[eventActions] operator[==] Other[null] operator[SEP] { identifier[eventActions] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] } identifier[JSONObject] identifier[event] operator[=] Keyword[new] identifier[JSONObject] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[ValidationResult] identifier[vr] operator[=] identifier[validator] operator[SEP] identifier[cleanEventName] operator[SEP] identifier[eventName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[vr] operator[SEP] identifier[getErrorCode] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[event] operator[SEP] identifier[put] operator[SEP] identifier[Constants] operator[SEP] identifier[ERROR_KEY] , identifier[getErrorObject] operator[SEP] identifier[vr] operator[SEP] operator[SEP] operator[SEP] identifier[eventName] operator[=] identifier[vr] operator[SEP] identifier[getObject] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[JSONObject] identifier[actions] operator[=] Keyword[new] identifier[JSONObject] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[key] operator[:] identifier[eventActions] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[Object] identifier[value] operator[=] identifier[eventActions] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[vr] operator[=] identifier[validator] operator[SEP] identifier[cleanObjectKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[key] operator[=] identifier[vr] operator[SEP] identifier[getObject] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[vr] operator[SEP] identifier[getErrorCode] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[event] operator[SEP] identifier[put] operator[SEP] identifier[Constants] operator[SEP] identifier[ERROR_KEY] , identifier[getErrorObject] operator[SEP] identifier[vr] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[vr] operator[=] identifier[validator] operator[SEP] identifier[cleanObjectValue] operator[SEP] identifier[value] , identifier[Validator] operator[SEP] identifier[ValidationContext] operator[SEP] identifier[Event] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[e] operator[SEP] { identifier[ValidationResult] identifier[error] operator[=] Keyword[new] identifier[ValidationResult] operator[SEP] operator[SEP] operator[SEP] identifier[error] operator[SEP] identifier[setErrorCode] operator[SEP] Other[512] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[err] operator[=] literal[String] operator[+] identifier[eventName] operator[+] literal[String] operator[+] identifier[key] operator[+] literal[String] operator[+] identifier[value] operator[+] literal[String] operator[SEP] identifier[error] operator[SEP] identifier[setErrorDesc] operator[SEP] identifier[err] operator[SEP] operator[SEP] identifier[getConfigLogger] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] identifier[getAccountId] operator[SEP] operator[SEP] , identifier[err] operator[SEP] operator[SEP] identifier[pushValidationResult] operator[SEP] identifier[error] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } identifier[value] operator[=] identifier[vr] operator[SEP] identifier[getObject] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[vr] operator[SEP] identifier[getErrorCode] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[event] operator[SEP] identifier[put] operator[SEP] identifier[Constants] operator[SEP] identifier[ERROR_KEY] , identifier[getErrorObject] operator[SEP] identifier[vr] operator[SEP] operator[SEP] operator[SEP] identifier[actions] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] } identifier[event] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[eventName] operator[SEP] operator[SEP] identifier[event] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[actions] operator[SEP] operator[SEP] identifier[queueEvent] operator[SEP] identifier[context] , identifier[event] , identifier[Constants] operator[SEP] identifier[RAISED_EVENT] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { } }
private Object handleFailOver(SQLException qe, Method method, Object[] args, Protocol protocol) throws Throwable { HostAddress failHostAddress = null; boolean failIsMaster = true; if (protocol != null) { failHostAddress = protocol.getHostAddress(); failIsMaster = protocol.isMasterConnection(); } HandleErrorResult handleErrorResult = listener.handleFailover(qe, method, args, protocol); if (handleErrorResult.mustThrowError) { listener .throwFailoverMessage(failHostAddress, failIsMaster, qe, handleErrorResult.isReconnected); } return handleErrorResult.resultObject; }
class class_name[name] begin[{] method[handleFailOver, return_type[type[Object]], modifier[private], parameter[qe, method, args, protocol]] begin[{] local_variable[type[HostAddress], failHostAddress] local_variable[type[boolean], failIsMaster] if[binary_operation[member[.protocol], !=, literal[null]]] begin[{] assign[member[.failHostAddress], call[protocol.getHostAddress, parameter[]]] assign[member[.failIsMaster], call[protocol.isMasterConnection, parameter[]]] else begin[{] None end[}] local_variable[type[HandleErrorResult], handleErrorResult] if[member[handleErrorResult.mustThrowError]] begin[{] call[listener.throwFailoverMessage, parameter[member[.failHostAddress], member[.failIsMaster], member[.qe], member[handleErrorResult.isReconnected]]] else begin[{] None end[}] return[member[handleErrorResult.resultObject]] end[}] END[}]
Keyword[private] identifier[Object] identifier[handleFailOver] operator[SEP] identifier[SQLException] identifier[qe] , identifier[Method] identifier[method] , identifier[Object] operator[SEP] operator[SEP] identifier[args] , identifier[Protocol] identifier[protocol] operator[SEP] Keyword[throws] identifier[Throwable] { identifier[HostAddress] identifier[failHostAddress] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[failIsMaster] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[protocol] operator[!=] Other[null] operator[SEP] { identifier[failHostAddress] operator[=] identifier[protocol] operator[SEP] identifier[getHostAddress] operator[SEP] operator[SEP] operator[SEP] identifier[failIsMaster] operator[=] identifier[protocol] operator[SEP] identifier[isMasterConnection] operator[SEP] operator[SEP] operator[SEP] } identifier[HandleErrorResult] identifier[handleErrorResult] operator[=] identifier[listener] operator[SEP] identifier[handleFailover] operator[SEP] identifier[qe] , identifier[method] , identifier[args] , identifier[protocol] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[handleErrorResult] operator[SEP] identifier[mustThrowError] operator[SEP] { identifier[listener] operator[SEP] identifier[throwFailoverMessage] operator[SEP] identifier[failHostAddress] , identifier[failIsMaster] , identifier[qe] , identifier[handleErrorResult] operator[SEP] identifier[isReconnected] operator[SEP] operator[SEP] } Keyword[return] identifier[handleErrorResult] operator[SEP] identifier[resultObject] operator[SEP] }
private void loadZealotConfig(AbstractZealotConfig zealotConfig) { zealotConfig.configNormal(NormalConfig.getInstance()); zealotConfig.configXml(XmlContext.INSTANCE); zealotConfig.configTagHandler(); log.warn("Zealot的配置信息加载完成!"); }
class class_name[name] begin[{] method[loadZealotConfig, return_type[void], modifier[private], parameter[zealotConfig]] begin[{] call[zealotConfig.configNormal, parameter[call[NormalConfig.getInstance, parameter[]]]] call[zealotConfig.configXml, parameter[member[XmlContext.INSTANCE]]] call[zealotConfig.configTagHandler, parameter[]] call[log.warn, parameter[literal["Zealot的配置信息加载完成!"]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[loadZealotConfig] operator[SEP] identifier[AbstractZealotConfig] identifier[zealotConfig] operator[SEP] { identifier[zealotConfig] operator[SEP] identifier[configNormal] operator[SEP] identifier[NormalConfig] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[zealotConfig] operator[SEP] identifier[configXml] operator[SEP] identifier[XmlContext] operator[SEP] identifier[INSTANCE] operator[SEP] operator[SEP] identifier[zealotConfig] operator[SEP] identifier[configTagHandler] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public GrpcServer start() throws IOException { RetryUtils.retry("Starting gRPC server", () -> mServer.start(), new ExponentialBackoffRetry(100, 500, 5)); mStarted = true; return this; }
class class_name[name] begin[{] method[start, return_type[type[GrpcServer]], modifier[public], parameter[]] begin[{] call[RetryUtils.retry, parameter[literal["Starting gRPC server"], LambdaExpression(body=MethodInvocation(arguments=[], member=start, postfix_operators=[], prefix_operators=[], qualifier=mServer, selectors=[], type_arguments=None), parameters=[]), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=100), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=500), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ExponentialBackoffRetry, sub_type=None))]] assign[member[.mStarted], literal[true]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[GrpcServer] identifier[start] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[RetryUtils] operator[SEP] identifier[retry] operator[SEP] literal[String] , operator[SEP] operator[SEP] operator[->] identifier[mServer] operator[SEP] identifier[start] operator[SEP] operator[SEP] , Keyword[new] identifier[ExponentialBackoffRetry] operator[SEP] Other[100] , Other[500] , Other[5] operator[SEP] operator[SEP] operator[SEP] identifier[mStarted] operator[=] literal[boolean] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "cmisFault") public JAXBElement<CmisFaultType> createCmisFault(CmisFaultType value) { return new JAXBElement<CmisFaultType>(_CmisFault_QNAME, CmisFaultType.class, null, value); }
class class_name[name] begin[{] method[createCmisFault, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_CmisFault_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmisFaultType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CmisFaultType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[CmisFaultType] operator[>] identifier[createCmisFault] operator[SEP] identifier[CmisFaultType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[CmisFaultType] operator[>] operator[SEP] identifier[_CmisFault_QNAME] , identifier[CmisFaultType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
@Override public Cipher encrypt() { try { Cipher cipher = Cipher.getInstance(ALGORITHM); cipher.init(Cipher.ENCRYPT_MODE, getKey()); return cipher; } catch (GeneralSecurityException e) { throw new AssertionError(e); } }
class class_name[name] begin[{] method[encrypt, return_type[type[Cipher]], modifier[public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ALGORITHM, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=Cipher, selectors=[], type_arguments=None), name=cipher)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Cipher, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ENCRYPT_MODE, postfix_operators=[], prefix_operators=[], qualifier=Cipher, selectors=[]), MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=init, postfix_operators=[], prefix_operators=[], qualifier=cipher, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=cipher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=AssertionError, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['GeneralSecurityException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Cipher] identifier[encrypt] operator[SEP] operator[SEP] { Keyword[try] { identifier[Cipher] identifier[cipher] operator[=] identifier[Cipher] operator[SEP] identifier[getInstance] operator[SEP] identifier[ALGORITHM] operator[SEP] operator[SEP] identifier[cipher] operator[SEP] identifier[init] operator[SEP] identifier[Cipher] operator[SEP] identifier[ENCRYPT_MODE] , identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[cipher] operator[SEP] } Keyword[catch] operator[SEP] identifier[GeneralSecurityException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[AssertionError] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
@Nonnull public static SimpleURL getURLWithServerAndContext (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope, @Nonnull final String sHRef) { return new SimpleURL (getURIWithServerAndContext (aRequestScope, sHRef)); }
class class_name[name] begin[{] method[getURLWithServerAndContext, return_type[type[SimpleURL]], modifier[public static], parameter[aRequestScope, sHRef]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=aRequestScope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sHRef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getURIWithServerAndContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SimpleURL, sub_type=None))] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[SimpleURL] identifier[getURLWithServerAndContext] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IRequestWebScopeWithoutResponse] identifier[aRequestScope] , annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[sHRef] operator[SEP] { Keyword[return] Keyword[new] identifier[SimpleURL] operator[SEP] identifier[getURIWithServerAndContext] operator[SEP] identifier[aRequestScope] , identifier[sHRef] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public static <C,I> List<I> convertListToInterfaceList( List<C>internalResult, Class<I> interfaceType ) { List<I> result = new ArrayList<I>(internalResult.size()); for( C element : internalResult ) { result.add((I) element); } return result; }
class class_name[name] begin[{] method[convertListToInterfaceList, return_type[type[List]], modifier[public static], parameter[internalResult, interfaceType]] begin[{] local_variable[type[List], result] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=I, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=internalResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=element)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=C, sub_type=None))), label=None) return[member[.result]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[C] , identifier[I] operator[>] identifier[List] operator[<] identifier[I] operator[>] identifier[convertListToInterfaceList] operator[SEP] identifier[List] operator[<] identifier[C] operator[>] identifier[internalResult] , identifier[Class] operator[<] identifier[I] operator[>] identifier[interfaceType] operator[SEP] { identifier[List] operator[<] identifier[I] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[I] operator[>] operator[SEP] identifier[internalResult] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[C] identifier[element] operator[:] identifier[internalResult] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] operator[SEP] identifier[I] operator[SEP] identifier[element] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public boolean addWifiStateChangedListener( NetworkStateChangedListener listener) { synchronized (this) { if (listeners.contains(listener)) { return true; } return listeners.add(listener); } }
class class_name[name] begin[{] method[addWifiStateChangedListener, return_type[type[boolean]], modifier[public], parameter[listener]] begin[{] SYNCHRONIZED[THIS[]] BEGIN[{] if[call[listeners.contains, parameter[member[.listener]]]] begin[{] return[literal[true]] else begin[{] None end[}] return[call[listeners.add, parameter[member[.listener]]]] END[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[addWifiStateChangedListener] operator[SEP] identifier[NetworkStateChangedListener] identifier[listener] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] identifier[listeners] operator[SEP] identifier[contains] operator[SEP] identifier[listener] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] identifier[listeners] operator[SEP] identifier[add] operator[SEP] identifier[listener] operator[SEP] operator[SEP] } }
private void jCheckBoxPaintGradientActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jCheckBoxPaintGradientActionPerformed {//GEN-HEADEREND:event_jCheckBoxPaintGradientActionPerformed parent.getGraphPanelChart().getChartSettings().setDrawGradient(jCheckBoxPaintGradient.isSelected()); refreshGraphPreview(); }
class class_name[name] begin[{] method[jCheckBoxPaintGradientActionPerformed, return_type[void], modifier[private], parameter[evt]] begin[{] call[parent.getGraphPanelChart, parameter[]] call[.refreshGraphPreview, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[jCheckBoxPaintGradientActionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] { identifier[parent] operator[SEP] identifier[getGraphPanelChart] operator[SEP] operator[SEP] operator[SEP] identifier[getChartSettings] operator[SEP] operator[SEP] operator[SEP] identifier[setDrawGradient] operator[SEP] identifier[jCheckBoxPaintGradient] operator[SEP] identifier[isSelected] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[refreshGraphPreview] operator[SEP] operator[SEP] operator[SEP] }
public static void cublasZtpsv(char uplo, char trans, char diag, int n, Pointer AP, Pointer x, int incx) { cublasZtpsvNative(uplo, trans, diag, n, AP, x, incx); checkResultBLAS(); }
class class_name[name] begin[{] method[cublasZtpsv, return_type[void], modifier[public static], parameter[uplo, trans, diag, n, AP, x, incx]] begin[{] call[.cublasZtpsvNative, parameter[member[.uplo], member[.trans], member[.diag], member[.n], member[.AP], member[.x], member[.incx]]] call[.checkResultBLAS, parameter[]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[cublasZtpsv] operator[SEP] Keyword[char] identifier[uplo] , Keyword[char] identifier[trans] , Keyword[char] identifier[diag] , Keyword[int] identifier[n] , identifier[Pointer] identifier[AP] , identifier[Pointer] identifier[x] , Keyword[int] identifier[incx] operator[SEP] { identifier[cublasZtpsvNative] operator[SEP] identifier[uplo] , identifier[trans] , identifier[diag] , identifier[n] , identifier[AP] , identifier[x] , identifier[incx] operator[SEP] operator[SEP] identifier[checkResultBLAS] operator[SEP] operator[SEP] operator[SEP] }
public List<ServerGroup> tableServerGroups(int profileId) { ArrayList<ServerGroup> serverGroups = new ArrayList<>(); PreparedStatement queryStatement = null; ResultSet results = null; try (Connection sqlConnection = sqlService.getConnection()) { queryStatement = sqlConnection.prepareStatement( "SELECT * FROM " + Constants.DB_TABLE_SERVER_GROUPS + " WHERE " + Constants.GENERIC_PROFILE_ID + " = ? " + "ORDER BY " + Constants.GENERIC_NAME ); queryStatement.setInt(1, profileId); results = queryStatement.executeQuery(); while (results.next()) { ServerGroup curServerGroup = new ServerGroup(results.getInt(Constants.GENERIC_ID), results.getString(Constants.GENERIC_NAME), results.getInt(Constants.GENERIC_PROFILE_ID)); curServerGroup.setServers(tableServers(profileId, curServerGroup.getId())); serverGroups.add(curServerGroup); } } catch (SQLException e) { e.printStackTrace(); } finally { try { if (results != null) { results.close(); } } catch (Exception e) { } try { if (queryStatement != null) { queryStatement.close(); } } catch (Exception e) { } } return serverGroups; }
class class_name[name] begin[{] method[tableServerGroups, return_type[type[List]], modifier[public], parameter[profileId]] begin[{] local_variable[type[ArrayList], serverGroups] local_variable[type[PreparedStatement], queryStatement] local_variable[type[ResultSet], results] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=queryStatement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SELECT * FROM "), operandr=MemberReference(member=DB_TABLE_SERVER_GROUPS, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" WHERE "), operator=+), operandr=MemberReference(member=GENERIC_PROFILE_ID, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" = ? "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ORDER BY "), operator=+), operandr=MemberReference(member=GENERIC_NAME, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), operator=+)], member=prepareStatement, postfix_operators=[], prefix_operators=[], qualifier=sqlConnection, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MemberReference(member=profileId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setInt, postfix_operators=[], prefix_operators=[], qualifier=queryStatement, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=executeQuery, postfix_operators=[], prefix_operators=[], qualifier=queryStatement, selectors=[], type_arguments=None)), label=None), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=GENERIC_ID, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=GENERIC_NAME, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=GENERIC_PROFILE_ID, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerGroup, sub_type=None)), name=curServerGroup)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ServerGroup, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=profileId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=curServerGroup, selectors=[], type_arguments=None)], member=tableServers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setServers, postfix_operators=[], prefix_operators=[], qualifier=curServerGroup, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=curServerGroup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=serverGroups, selectors=[], type_arguments=None), label=None)]), condition=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=[TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=results, 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), TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=queryStatement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=queryStatement, 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)], label=None, resources=[TryResource(annotations=[], modifiers=set(), name=sqlConnection, type=ReferenceType(arguments=None, dimensions=[], name=Connection, sub_type=None), value=MethodInvocation(arguments=[], member=getConnection, postfix_operators=[], prefix_operators=[], qualifier=sqlService, selectors=[], type_arguments=None))]) return[member[.serverGroups]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[ServerGroup] operator[>] identifier[tableServerGroups] operator[SEP] Keyword[int] identifier[profileId] operator[SEP] { identifier[ArrayList] operator[<] identifier[ServerGroup] operator[>] identifier[serverGroups] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[PreparedStatement] identifier[queryStatement] operator[=] Other[null] operator[SEP] identifier[ResultSet] identifier[results] operator[=] Other[null] operator[SEP] Keyword[try] operator[SEP] identifier[Connection] identifier[sqlConnection] operator[=] identifier[sqlService] operator[SEP] identifier[getConnection] operator[SEP] operator[SEP] operator[SEP] { identifier[queryStatement] operator[=] identifier[sqlConnection] operator[SEP] identifier[prepareStatement] operator[SEP] literal[String] operator[+] identifier[Constants] operator[SEP] identifier[DB_TABLE_SERVER_GROUPS] operator[+] literal[String] operator[+] identifier[Constants] operator[SEP] identifier[GENERIC_PROFILE_ID] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[Constants] operator[SEP] identifier[GENERIC_NAME] operator[SEP] operator[SEP] identifier[queryStatement] operator[SEP] identifier[setInt] operator[SEP] Other[1] , identifier[profileId] operator[SEP] operator[SEP] identifier[results] operator[=] identifier[queryStatement] operator[SEP] identifier[executeQuery] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[results] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] { identifier[ServerGroup] identifier[curServerGroup] operator[=] Keyword[new] identifier[ServerGroup] operator[SEP] identifier[results] operator[SEP] identifier[getInt] operator[SEP] identifier[Constants] operator[SEP] identifier[GENERIC_ID] operator[SEP] , identifier[results] operator[SEP] identifier[getString] operator[SEP] identifier[Constants] operator[SEP] identifier[GENERIC_NAME] operator[SEP] , identifier[results] operator[SEP] identifier[getInt] operator[SEP] identifier[Constants] operator[SEP] identifier[GENERIC_PROFILE_ID] operator[SEP] operator[SEP] operator[SEP] identifier[curServerGroup] operator[SEP] identifier[setServers] operator[SEP] identifier[tableServers] operator[SEP] identifier[profileId] , identifier[curServerGroup] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[serverGroups] operator[SEP] identifier[add] operator[SEP] identifier[curServerGroup] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[try] { Keyword[if] operator[SEP] identifier[results] operator[!=] Other[null] operator[SEP] { identifier[results] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } Keyword[try] { Keyword[if] operator[SEP] identifier[queryStatement] operator[!=] Other[null] operator[SEP] { identifier[queryStatement] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } } Keyword[return] identifier[serverGroups] operator[SEP] }
@Override protected void onStartObject(String fieldName, JsonParser jp) { log.trace(fieldName); if ("result".equals(fieldName)) { resultStarted = true; } }
class class_name[name] begin[{] method[onStartObject, return_type[void], modifier[protected], parameter[fieldName, jp]] begin[{] call[log.trace, parameter[member[.fieldName]]] if[literal["result"]] begin[{] assign[member[.resultStarted], literal[true]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[onStartObject] operator[SEP] identifier[String] identifier[fieldName] , identifier[JsonParser] identifier[jp] operator[SEP] { identifier[log] operator[SEP] identifier[trace] operator[SEP] identifier[fieldName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[fieldName] operator[SEP] operator[SEP] { identifier[resultStarted] operator[=] literal[boolean] operator[SEP] } }
public boolean hasSearchPages() { try { return this.getClass().getMethod("createSearchPage", new Class<?>[] { String.class }).getDeclaringClass() != Application.class; } catch (NoSuchMethodException | SecurityException e) { throw new RuntimeException(e); } }
class class_name[name] begin[{] method[hasSearchPages, return_type[type[boolean]], modifier[public], parameter[]] begin[{] TryStatement(block=[ReturnStatement(expression=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="createSearchPage"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=None, name=Class, sub_type=None))], member=getMethod, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getDeclaringClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Application, sub_type=None)), operator=!=), 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=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoSuchMethodException', 'SecurityException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[boolean] identifier[hasSearchPages] operator[SEP] operator[SEP] { Keyword[try] { Keyword[return] Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getMethod] operator[SEP] literal[String] , Keyword[new] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] { identifier[String] operator[SEP] Keyword[class] } operator[SEP] operator[SEP] identifier[getDeclaringClass] operator[SEP] operator[SEP] operator[!=] identifier[Application] operator[SEP] Keyword[class] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchMethodException] operator[|] identifier[SecurityException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public void marshall(GetLifecyclePolicyRequest getLifecyclePolicyRequest, ProtocolMarshaller protocolMarshaller) { if (getLifecyclePolicyRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getLifecyclePolicyRequest.getRegistryId(), REGISTRYID_BINDING); protocolMarshaller.marshall(getLifecyclePolicyRequest.getRepositoryName(), REPOSITORYNAME_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[getLifecyclePolicyRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.getLifecyclePolicyRequest], ==, 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=getRegistryId, postfix_operators=[], prefix_operators=[], qualifier=getLifecyclePolicyRequest, selectors=[], type_arguments=None), MemberReference(member=REGISTRYID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRepositoryName, postfix_operators=[], prefix_operators=[], qualifier=getLifecyclePolicyRequest, selectors=[], type_arguments=None), MemberReference(member=REPOSITORYNAME_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[GetLifecyclePolicyRequest] identifier[getLifecyclePolicyRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[getLifecyclePolicyRequest] 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[getLifecyclePolicyRequest] operator[SEP] identifier[getRegistryId] operator[SEP] operator[SEP] , identifier[REGISTRYID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[getLifecyclePolicyRequest] operator[SEP] identifier[getRepositoryName] operator[SEP] operator[SEP] , identifier[REPOSITORYNAME_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] } }
protected void addExamplePair(IncorrectExample incorrectSentence, CorrectExample correctSentence) { String correctExample = correctSentence.getExample(); int markerStart= correctExample.indexOf("<marker>"); int markerEnd = correctExample.indexOf("</marker>"); if (markerStart != -1 && markerEnd != -1) { List<String> correction = Collections.singletonList(correctExample.substring(markerStart + "<marker>".length(), markerEnd)); incorrectExamples.add(new IncorrectExample(incorrectSentence.getExample(), correction)); } else { incorrectExamples.add(incorrectSentence); } correctExamples.add(correctSentence); }
class class_name[name] begin[{] method[addExamplePair, return_type[void], modifier[protected], parameter[incorrectSentence, correctSentence]] begin[{] local_variable[type[String], correctExample] local_variable[type[int], markerStart] local_variable[type[int], markerEnd] if[binary_operation[binary_operation[member[.markerStart], !=, literal[1]], &&, binary_operation[member[.markerEnd], !=, literal[1]]]] begin[{] local_variable[type[List], correction] call[incorrectExamples.add, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getExample, postfix_operators=[], prefix_operators=[], qualifier=incorrectSentence, selectors=[], type_arguments=None), MemberReference(member=correction, 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=IncorrectExample, sub_type=None))]] else begin[{] call[incorrectExamples.add, parameter[member[.incorrectSentence]]] end[}] call[correctExamples.add, parameter[member[.correctSentence]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[addExamplePair] operator[SEP] identifier[IncorrectExample] identifier[incorrectSentence] , identifier[CorrectExample] identifier[correctSentence] operator[SEP] { identifier[String] identifier[correctExample] operator[=] identifier[correctSentence] operator[SEP] identifier[getExample] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[markerStart] operator[=] identifier[correctExample] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[markerEnd] operator[=] identifier[correctExample] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[markerStart] operator[!=] operator[-] Other[1] operator[&&] identifier[markerEnd] operator[!=] operator[-] Other[1] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[correction] operator[=] identifier[Collections] operator[SEP] identifier[singletonList] operator[SEP] identifier[correctExample] operator[SEP] identifier[substring] operator[SEP] identifier[markerStart] operator[+] literal[String] operator[SEP] identifier[length] operator[SEP] operator[SEP] , identifier[markerEnd] operator[SEP] operator[SEP] operator[SEP] identifier[incorrectExamples] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[IncorrectExample] operator[SEP] identifier[incorrectSentence] operator[SEP] identifier[getExample] operator[SEP] operator[SEP] , identifier[correction] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[incorrectExamples] operator[SEP] identifier[add] operator[SEP] identifier[incorrectSentence] operator[SEP] operator[SEP] } identifier[correctExamples] operator[SEP] identifier[add] operator[SEP] identifier[correctSentence] operator[SEP] operator[SEP] }
public void loadFromResource(String resource, Candidate.CandidateType type) throws IOException { InputStream candidatesConfig = classloader.getResourceAsStream(resource); if(candidatesConfig == null) { throw new IOException("Resource '" + resource + "' not found"); } try { loadFrom(candidatesConfig, type); } finally { candidatesConfig.close(); } }
class class_name[name] begin[{] method[loadFromResource, return_type[void], modifier[public], parameter[resource, type]] begin[{] local_variable[type[InputStream], candidatesConfig] if[binary_operation[member[.candidatesConfig], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Resource '"), operandr=MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' not found"), 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[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=candidatesConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadFrom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=candidatesConfig, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[loadFromResource] operator[SEP] identifier[String] identifier[resource] , identifier[Candidate] operator[SEP] identifier[CandidateType] identifier[type] operator[SEP] Keyword[throws] identifier[IOException] { identifier[InputStream] identifier[candidatesConfig] operator[=] identifier[classloader] operator[SEP] identifier[getResourceAsStream] operator[SEP] identifier[resource] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[candidatesConfig] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[resource] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[loadFrom] operator[SEP] identifier[candidatesConfig] , identifier[type] operator[SEP] operator[SEP] } Keyword[finally] { identifier[candidatesConfig] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } }
private Runnable createRunnableLoggingTask(final Level level, final Object message, final Throwable t) { // While logging, the logger thread temporarily disguises itself as its caller. final String callerThreadName = Thread.currentThread().getName(); final Runnable runnableLoggingTask = new Runnable() { @Override public void run() { Thread loggerThread = Thread.currentThread(); loggerThread.setName(callerThreadName); try { m_logger.log(level, message, t); } catch (Throwable t) { System.err.println("Exception thrown in logging thread for " + callerThreadName + ":" + t); } finally { loggerThread.setName(ASYNCH_LOGGER_THREAD_NAME); } } }; return runnableLoggingTask; }
class class_name[name] begin[{] method[createRunnableLoggingTask, return_type[type[Runnable]], modifier[private], parameter[level, message, t]] begin[{] local_variable[type[String], callerThreadName] local_variable[type[Runnable], runnableLoggingTask] return[member[.runnableLoggingTask]] end[}] END[}]
Keyword[private] identifier[Runnable] identifier[createRunnableLoggingTask] operator[SEP] Keyword[final] identifier[Level] identifier[level] , Keyword[final] identifier[Object] identifier[message] , Keyword[final] identifier[Throwable] identifier[t] operator[SEP] { Keyword[final] identifier[String] identifier[callerThreadName] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Runnable] identifier[runnableLoggingTask] operator[=] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[Thread] identifier[loggerThread] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[loggerThread] operator[SEP] identifier[setName] operator[SEP] identifier[callerThreadName] operator[SEP] operator[SEP] Keyword[try] { identifier[m_logger] operator[SEP] identifier[log] operator[SEP] identifier[level] , identifier[message] , identifier[t] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[callerThreadName] operator[+] literal[String] operator[+] identifier[t] operator[SEP] operator[SEP] } Keyword[finally] { identifier[loggerThread] operator[SEP] identifier[setName] operator[SEP] identifier[ASYNCH_LOGGER_THREAD_NAME] operator[SEP] operator[SEP] } } } operator[SEP] Keyword[return] identifier[runnableLoggingTask] operator[SEP] }
@Override public void clearCache() { entityCache.clearCache(CommerceNotificationAttachmentImpl.class); finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); }
class class_name[name] begin[{] method[clearCache, return_type[void], modifier[public], parameter[]] begin[{] call[entityCache.clearCache, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CommerceNotificationAttachmentImpl, sub_type=None))]] call[finderCache.clearCache, parameter[member[.FINDER_CLASS_NAME_ENTITY]]] call[finderCache.clearCache, parameter[member[.FINDER_CLASS_NAME_LIST_WITH_PAGINATION]]] call[finderCache.clearCache, parameter[member[.FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[clearCache] operator[SEP] operator[SEP] { identifier[entityCache] operator[SEP] identifier[clearCache] operator[SEP] identifier[CommerceNotificationAttachmentImpl] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[finderCache] operator[SEP] identifier[clearCache] operator[SEP] identifier[FINDER_CLASS_NAME_ENTITY] operator[SEP] operator[SEP] identifier[finderCache] operator[SEP] identifier[clearCache] operator[SEP] identifier[FINDER_CLASS_NAME_LIST_WITH_PAGINATION] operator[SEP] operator[SEP] identifier[finderCache] operator[SEP] identifier[clearCache] operator[SEP] identifier[FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION] operator[SEP] operator[SEP] }
public InetAddress getAddress() { try { if (name == null) return InetAddress.getByAddress(toArray(addr)); else return InetAddress.getByAddress(name.toString(), toArray(addr)); } catch (UnknownHostException e) { return null; } }
class class_name[name] begin[{] method[getAddress, return_type[type[InetAddress]], modifier[public], parameter[]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=addr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=getByAddress, postfix_operators=[], prefix_operators=[], qualifier=InetAddress, selectors=[], type_arguments=None), label=None), label=None, then_statement=ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=addr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=getByAddress, postfix_operators=[], prefix_operators=[], qualifier=InetAddress, selectors=[], type_arguments=None), label=None))], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UnknownHostException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[InetAddress] identifier[getAddress] operator[SEP] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] Keyword[return] identifier[InetAddress] operator[SEP] identifier[getByAddress] operator[SEP] identifier[toArray] operator[SEP] identifier[addr] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[return] identifier[InetAddress] operator[SEP] identifier[getByAddress] operator[SEP] identifier[name] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[toArray] operator[SEP] identifier[addr] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[UnknownHostException] identifier[e] operator[SEP] { Keyword[return] Other[null] operator[SEP] } }
public void clearAllCaches() { logger.warn("beginning request to clear all caches"); for (final String cacheName : this.cacheManager.getCacheNames()) { clearCache(cacheName); } logger.warn("completed request to clear all caches"); }
class class_name[name] begin[{] method[clearAllCaches, return_type[void], modifier[public], parameter[]] begin[{] call[logger.warn, parameter[literal["beginning request to clear all caches"]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cacheName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=clearCache, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=cacheManager, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getCacheNames, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cacheName)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[logger.warn, parameter[literal["completed request to clear all caches"]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[clearAllCaches] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[cacheName] operator[:] Keyword[this] operator[SEP] identifier[cacheManager] operator[SEP] identifier[getCacheNames] operator[SEP] operator[SEP] operator[SEP] { identifier[clearCache] operator[SEP] identifier[cacheName] operator[SEP] operator[SEP] } identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public static double getAngleBetweenLinePlane( Coordinate a, Coordinate d, Coordinate b, Coordinate c ) { double[] rAD = {d.x - a.x, d.y - a.y, d.z - a.z}; double[] rDB = {b.x - d.x, b.y - d.y, b.z - d.z}; double[] rDC = {c.x - d.x, c.y - d.y, c.z - d.z}; double[] n = {// /* */rDB[1] * rDC[2] - rDC[1] * rDB[2], // -1 * (rDB[0] * rDC[2] - rDC[0] * rDB[2]), // rDB[0] * rDC[1] - rDC[0] * rDB[1]// }; double cosNum = n[0] * rAD[0] + n[1] * rAD[1] + n[2] * rAD[2]; double cosDen = sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]) * sqrt(rAD[0] * rAD[0] + rAD[1] * rAD[1] + rAD[2] * rAD[2]); double cos90MinAlpha = abs(cosNum / cosDen); double alpha = 90.0 - toDegrees(acos(cos90MinAlpha)); return alpha; }
class class_name[name] begin[{] method[getAngleBetweenLinePlane, return_type[type[double]], modifier[public static], parameter[a, d, b, c]] begin[{] local_variable[type[double], rAD] local_variable[type[double], rDB] local_variable[type[double], rDC] local_variable[type[double], n] local_variable[type[double], cosNum] local_variable[type[double], cosDen] local_variable[type[double], cos90MinAlpha] local_variable[type[double], alpha] return[member[.alpha]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[getAngleBetweenLinePlane] operator[SEP] identifier[Coordinate] identifier[a] , identifier[Coordinate] identifier[d] , identifier[Coordinate] identifier[b] , identifier[Coordinate] identifier[c] operator[SEP] { Keyword[double] operator[SEP] operator[SEP] identifier[rAD] operator[=] { identifier[d] operator[SEP] identifier[x] operator[-] identifier[a] operator[SEP] identifier[x] , identifier[d] operator[SEP] identifier[y] operator[-] identifier[a] operator[SEP] identifier[y] , identifier[d] operator[SEP] identifier[z] operator[-] identifier[a] operator[SEP] identifier[z] } operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[rDB] operator[=] { identifier[b] operator[SEP] identifier[x] operator[-] identifier[d] operator[SEP] identifier[x] , identifier[b] operator[SEP] identifier[y] operator[-] identifier[d] operator[SEP] identifier[y] , identifier[b] operator[SEP] identifier[z] operator[-] identifier[d] operator[SEP] identifier[z] } operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[rDC] operator[=] { identifier[c] operator[SEP] identifier[x] operator[-] identifier[d] operator[SEP] identifier[x] , identifier[c] operator[SEP] identifier[y] operator[-] identifier[d] operator[SEP] identifier[y] , identifier[c] operator[SEP] identifier[z] operator[-] identifier[d] operator[SEP] identifier[z] } operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[n] operator[=] { identifier[rDB] operator[SEP] Other[1] operator[SEP] operator[*] identifier[rDC] operator[SEP] Other[2] operator[SEP] operator[-] identifier[rDC] operator[SEP] Other[1] operator[SEP] operator[*] identifier[rDB] operator[SEP] Other[2] operator[SEP] , operator[-] Other[1] operator[*] operator[SEP] identifier[rDB] operator[SEP] Other[0] operator[SEP] operator[*] identifier[rDC] operator[SEP] Other[2] operator[SEP] operator[-] identifier[rDC] operator[SEP] Other[0] operator[SEP] operator[*] identifier[rDB] operator[SEP] Other[2] operator[SEP] operator[SEP] , identifier[rDB] operator[SEP] Other[0] operator[SEP] operator[*] identifier[rDC] operator[SEP] Other[1] operator[SEP] operator[-] identifier[rDC] operator[SEP] Other[0] operator[SEP] operator[*] identifier[rDB] operator[SEP] Other[1] operator[SEP] } operator[SEP] Keyword[double] identifier[cosNum] operator[=] identifier[n] operator[SEP] Other[0] operator[SEP] operator[*] identifier[rAD] operator[SEP] Other[0] operator[SEP] operator[+] identifier[n] operator[SEP] Other[1] operator[SEP] operator[*] identifier[rAD] operator[SEP] Other[1] operator[SEP] operator[+] identifier[n] operator[SEP] Other[2] operator[SEP] operator[*] identifier[rAD] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[double] identifier[cosDen] operator[=] identifier[sqrt] operator[SEP] identifier[n] operator[SEP] Other[0] operator[SEP] operator[*] identifier[n] operator[SEP] Other[0] operator[SEP] operator[+] identifier[n] operator[SEP] Other[1] operator[SEP] operator[*] identifier[n] operator[SEP] Other[1] operator[SEP] operator[+] identifier[n] operator[SEP] Other[2] operator[SEP] operator[*] identifier[n] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[*] identifier[sqrt] operator[SEP] identifier[rAD] operator[SEP] Other[0] operator[SEP] operator[*] identifier[rAD] operator[SEP] Other[0] operator[SEP] operator[+] identifier[rAD] operator[SEP] Other[1] operator[SEP] operator[*] identifier[rAD] operator[SEP] Other[1] operator[SEP] operator[+] identifier[rAD] operator[SEP] Other[2] operator[SEP] operator[*] identifier[rAD] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[cos90MinAlpha] operator[=] identifier[abs] operator[SEP] identifier[cosNum] operator[/] identifier[cosDen] operator[SEP] operator[SEP] Keyword[double] identifier[alpha] operator[=] literal[Float] operator[-] identifier[toDegrees] operator[SEP] identifier[acos] operator[SEP] identifier[cos90MinAlpha] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[alpha] operator[SEP] }
@PostConstruct public final void init() throws URISyntaxException { final String address = getConfig(ADDRESS, null); if (address != null) { final URI uri = new URI("udp://" + address); final String prefix = getConfig(PREFIX, "mapfish-print").replace("%h", getHostname()); final int period = Integer.parseInt(getConfig(PERIOD, "10")); LOGGER.info("Starting a StatsD reporter targeting {} with prefix {} and period {}s", uri, prefix, period); this.reporter = StatsDReporter.forRegistry(this.metricRegistry) .prefixedWith(prefix) .build(uri.getHost(), uri.getPort()); this.reporter.start(period, TimeUnit.SECONDS); } }
class class_name[name] begin[{] method[init, return_type[void], modifier[final public], parameter[]] begin[{] local_variable[type[String], address] if[binary_operation[member[.address], !=, literal[null]]] begin[{] local_variable[type[URI], uri] local_variable[type[String], prefix] local_variable[type[int], period] call[LOGGER.info, parameter[literal["Starting a StatsD reporter targeting {} with prefix {} and period {}s"], member[.uri], member[.prefix], member[.period]]] assign[THIS[member[None.reporter]], call[StatsDReporter.forRegistry, parameter[THIS[member[None.metricRegistry]]]]] THIS[member[None.reporter]call[None.start, parameter[member[.period], member[TimeUnit.SECONDS]]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[PostConstruct] Keyword[public] Keyword[final] Keyword[void] identifier[init] operator[SEP] operator[SEP] Keyword[throws] identifier[URISyntaxException] { Keyword[final] identifier[String] identifier[address] operator[=] identifier[getConfig] operator[SEP] identifier[ADDRESS] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[address] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[URI] identifier[uri] operator[=] Keyword[new] identifier[URI] operator[SEP] literal[String] operator[+] identifier[address] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[prefix] operator[=] identifier[getConfig] operator[SEP] identifier[PREFIX] , literal[String] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , identifier[getHostname] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[period] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[getConfig] operator[SEP] identifier[PERIOD] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[uri] , identifier[prefix] , identifier[period] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[reporter] operator[=] identifier[StatsDReporter] operator[SEP] identifier[forRegistry] operator[SEP] Keyword[this] operator[SEP] identifier[metricRegistry] operator[SEP] operator[SEP] identifier[prefixedWith] operator[SEP] identifier[prefix] operator[SEP] operator[SEP] identifier[build] operator[SEP] identifier[uri] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] , identifier[uri] operator[SEP] identifier[getPort] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[reporter] operator[SEP] identifier[start] operator[SEP] identifier[period] , identifier[TimeUnit] operator[SEP] identifier[SECONDS] operator[SEP] operator[SEP] } }
protected void mergeImmutableContainerTypesFrom(Configuration otherConfiguration) { Set<Dotted> union = Sets.union(hardcodedImmutableContainerClasses.build(), otherConfiguration.immutableContainerClasses()); hardcodedImmutableContainerClasses = ImmutableSet.<Dotted>builder().addAll(union); }
class class_name[name] begin[{] method[mergeImmutableContainerTypesFrom, return_type[void], modifier[protected], parameter[otherConfiguration]] begin[{] local_variable[type[Set], union] assign[member[.hardcodedImmutableContainerClasses], call[.ImmutableSet, parameter[]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[mergeImmutableContainerTypesFrom] operator[SEP] identifier[Configuration] identifier[otherConfiguration] operator[SEP] { identifier[Set] operator[<] identifier[Dotted] operator[>] identifier[union] operator[=] identifier[Sets] operator[SEP] identifier[union] operator[SEP] identifier[hardcodedImmutableContainerClasses] operator[SEP] identifier[build] operator[SEP] operator[SEP] , identifier[otherConfiguration] operator[SEP] identifier[immutableContainerClasses] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[hardcodedImmutableContainerClasses] operator[=] identifier[ImmutableSet] operator[SEP] operator[<] identifier[Dotted] operator[>] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[union] operator[SEP] operator[SEP] }
public static void logRuntimeException(Logger log, String exceptionMessage, String method, Object... params) { handleException(log, newRunTimeException(exceptionMessage), method, params); }
class class_name[name] begin[{] method[logRuntimeException, return_type[void], modifier[public static], parameter[log, exceptionMessage, method, params]] begin[{] call[.handleException, parameter[member[.log], call[.newRunTimeException, parameter[member[.exceptionMessage]]], member[.method], member[.params]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[logRuntimeException] operator[SEP] identifier[Logger] identifier[log] , identifier[String] identifier[exceptionMessage] , identifier[String] identifier[method] , identifier[Object] operator[...] identifier[params] operator[SEP] { identifier[handleException] operator[SEP] identifier[log] , identifier[newRunTimeException] operator[SEP] identifier[exceptionMessage] operator[SEP] , identifier[method] , identifier[params] operator[SEP] operator[SEP] }
public static int lookup(String text, int filter) { int type = UNKNOWN; if (LOOKUP.containsKey(text)) { type = LOOKUP.get(text); if (filter != UNKNOWN && !ofType(type, filter)) { type = UNKNOWN; } } return type; }
class class_name[name] begin[{] method[lookup, return_type[type[int]], modifier[public static], parameter[text, filter]] begin[{] local_variable[type[int], type] if[call[LOOKUP.containsKey, parameter[member[.text]]]] begin[{] assign[member[.type], call[LOOKUP.get, parameter[member[.text]]]] if[binary_operation[binary_operation[member[.filter], !=, member[.UNKNOWN]], &&, call[.ofType, parameter[member[.type], member[.filter]]]]] begin[{] assign[member[.type], member[.UNKNOWN]] else begin[{] None end[}] else begin[{] None end[}] return[member[.type]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[lookup] operator[SEP] identifier[String] identifier[text] , Keyword[int] identifier[filter] operator[SEP] { Keyword[int] identifier[type] operator[=] identifier[UNKNOWN] operator[SEP] Keyword[if] operator[SEP] identifier[LOOKUP] operator[SEP] identifier[containsKey] operator[SEP] identifier[text] operator[SEP] operator[SEP] { identifier[type] operator[=] identifier[LOOKUP] operator[SEP] identifier[get] operator[SEP] identifier[text] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[filter] operator[!=] identifier[UNKNOWN] operator[&&] operator[!] identifier[ofType] operator[SEP] identifier[type] , identifier[filter] operator[SEP] operator[SEP] { identifier[type] operator[=] identifier[UNKNOWN] operator[SEP] } } Keyword[return] identifier[type] operator[SEP] }
public Matrix3f scaling(float factor) { MemUtil.INSTANCE.zero(this); m00 = factor; m11 = factor; m22 = factor; return this; }
class class_name[name] begin[{] method[scaling, return_type[type[Matrix3f]], modifier[public], parameter[factor]] begin[{] call[MemUtil.INSTANCE.zero, parameter[THIS[]]] assign[member[.m00], member[.factor]] assign[member[.m11], member[.factor]] assign[member[.m22], member[.factor]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Matrix3f] identifier[scaling] operator[SEP] Keyword[float] identifier[factor] operator[SEP] { identifier[MemUtil] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[zero] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[m00] operator[=] identifier[factor] operator[SEP] identifier[m11] operator[=] identifier[factor] operator[SEP] identifier[m22] operator[=] identifier[factor] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
int getNextSentencePosition(int numberOfParagraph, int startOfSentencePosition) { for (CacheEntry anEntry : entries) { if (anEntry.numberOfParagraph == numberOfParagraph && anEntry.startOfSentencePosition == startOfSentencePosition) { return anEntry.nextSentencePosition; } } return -1; }
class class_name[name] begin[{] method[getNextSentencePosition, return_type[type[int]], modifier[default], parameter[numberOfParagraph, startOfSentencePosition]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=numberOfParagraph, postfix_operators=[], prefix_operators=[], qualifier=anEntry, selectors=[]), operandr=MemberReference(member=numberOfParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=startOfSentencePosition, postfix_operators=[], prefix_operators=[], qualifier=anEntry, selectors=[]), operandr=MemberReference(member=startOfSentencePosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=nextSentencePosition, postfix_operators=[], prefix_operators=[], qualifier=anEntry, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=entries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=anEntry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CacheEntry, sub_type=None))), label=None) return[literal[1]] end[}] END[}]
Keyword[int] identifier[getNextSentencePosition] operator[SEP] Keyword[int] identifier[numberOfParagraph] , Keyword[int] identifier[startOfSentencePosition] operator[SEP] { Keyword[for] operator[SEP] identifier[CacheEntry] identifier[anEntry] operator[:] identifier[entries] operator[SEP] { Keyword[if] operator[SEP] identifier[anEntry] operator[SEP] identifier[numberOfParagraph] operator[==] identifier[numberOfParagraph] operator[&&] identifier[anEntry] operator[SEP] identifier[startOfSentencePosition] operator[==] identifier[startOfSentencePosition] operator[SEP] { Keyword[return] identifier[anEntry] operator[SEP] identifier[nextSentencePosition] operator[SEP] } } Keyword[return] operator[-] Other[1] operator[SEP] }
public Data set(Iterable<Property> props) { return !Iterables.isEmpty(props) ? new Data(props) : this; }
class class_name[name] begin[{] method[set, return_type[type[Data]], modifier[public], parameter[props]] begin[{] return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=props, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=Iterables, selectors=[], type_arguments=None), if_false=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), if_true=ClassCreator(arguments=[MemberReference(member=props, 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=Data, sub_type=None)))] end[}] END[}]
Keyword[public] identifier[Data] identifier[set] operator[SEP] identifier[Iterable] operator[<] identifier[Property] operator[>] identifier[props] operator[SEP] { Keyword[return] operator[!] identifier[Iterables] operator[SEP] identifier[isEmpty] operator[SEP] identifier[props] operator[SEP] operator[?] Keyword[new] identifier[Data] operator[SEP] identifier[props] operator[SEP] operator[:] Keyword[this] operator[SEP] }
private double[][] wettedArea( double[] waterLevel, List<RiverPoint> riverPoints ) { /* right and left limits of the main channel */ double dx, sx; double area_b, base_dx, base_sx, altezza; double peri_b; double larghe_b; double gau_b; double alfa_num, alfa_den; /* *_loc refer to the local slice (trapezoidal) of the area of the section */ double area_loc, peri_loc, gau_loc; int imax = riverPoints.size(); double[][] tirase = new double[imax][6]; /* * Calculate: wetted area, wetted perimeter, width of the water surface, the roughness * and the alpha coefficient of Coriolis in the section i */ for( int i = 0; i < imax; i++ ) { RiverPoint section = riverPoints.get(i); area_b = 0; peri_b = 0; larghe_b = 0; gau_b = 0; gau_loc = 0; alfa_num = 0; alfa_den = 0; dx = section.getStartNodeIndex() + 1; sx = section.getEndNodeIndex() - 1; Coordinate[] sectionCoordinates = section.getSectionCoordinates(); List<Double> sectionProgressives = section.getSectionProgressive(); double sectionGauklerStrickler = section.getSectionGauklerStrickler(); for( int j = (int) dx - 1; j < sx - 1; j++ ) { /* Check the segments between the stations j and j+1 of the current section // if (section.getYAt(j) >= tirante[i] && section.getYAt(j + 1) >= tirante[i]) { // area_b = area_b + 0; // peri_b = peri_b + 0; // larghe_b = larghe_b + 0; // gau_b = gau_b + 0; // alfa_num = alfa_num + 0; // alfa_den = alfa_den + 0; // } /* * case 1: only partially wetted (right side dry) */ if (sectionCoordinates[j].z >= waterLevel[i] && sectionCoordinates[j + 1].z < waterLevel[i]) { /* the area of the triangle */ base_dx = 0; base_sx = waterLevel[i] - sectionCoordinates[j + 1].z; altezza = base_sx * (sectionProgressives.get(j + 1) - sectionProgressives.get(j)) / (sectionCoordinates[j].z - sectionCoordinates[j + 1].z); area_b = area_b + (base_dx + base_sx) * altezza / 2.0; /* the part of the bottom that is wetted */ peri_b = peri_b + Math.sqrt(Math.abs(base_dx - base_sx) * Math.abs(base_dx - base_sx) + altezza * altezza); /* the width of the water surface */ larghe_b = larghe_b + altezza; /* the roughness coefficient */ gau_b = gau_b + (sectionGauklerStrickler * Math.pow((base_dx + base_sx) / 2.0, (5.0 / 3.0)) * altezza); gau_loc = sectionGauklerStrickler; /* the alpha coefficient of Coriolis */ area_loc = (base_dx + base_sx) * altezza / 2.0; peri_loc = Math.sqrt((base_dx - base_sx) * (base_dx - base_sx) + altezza * altezza); if (area_loc != 0) { // use the method of Einstein-Horton? alfa_num = alfa_num + (gau_loc * gau_loc) * Math.pow(area_loc, (7.0 / 3.0)) / Math.pow(peri_loc, (4.0 / 3.0)); } alfa_den = alfa_den + gau_loc * area_loc * Math.pow(peri_loc, (2.0 / 3.0)); /* no one of these values can be null */ /* * if ( base_dx<0 || base_sx<0 || altezza<0 ) { print("POSIZIONE " + i " - * TIRANTE " + waterLevel[i] + "Error in the evaluation of the wetted area"}; */ } /* case 2: only partially wetted (left side dry) */ if (sectionCoordinates[j + 1].z >= waterLevel[i] && sectionCoordinates[j].z < waterLevel[i]) { /* the area of the triangle */ base_sx = 0; base_dx = waterLevel[i] - sectionCoordinates[j].z; altezza = base_dx * (sectionProgressives.get(j + 1) - sectionProgressives.get(j)) / (sectionCoordinates[j + 1].z - sectionCoordinates[j].z); area_b = area_b + (base_dx + base_sx) * altezza / 2.0; /* the part of the bottom that is wetted */ peri_b = peri_b + Math.sqrt(Math.abs(base_dx - base_sx) * Math.abs(base_dx - base_sx) + altezza * altezza); /* the width of the water surface */ larghe_b = larghe_b + altezza; /* the roughness coefficient */ gau_b = gau_b + (sectionGauklerStrickler * Math.pow((base_dx + base_sx) / 2.0, (5.0 / 3.0)) * altezza); gau_loc = sectionGauklerStrickler; /* the alpha coefficient of Coriolis */ area_loc = (base_dx + base_sx) * altezza / 2.0; peri_loc = Math.sqrt((base_dx - base_sx) * (base_dx - base_sx) + altezza * altezza); if (area_loc != 0) { alfa_num = alfa_num + (gau_loc * gau_loc) * Math.pow(area_loc, (7.0 / 3.0)) / Math.pow(peri_loc, (4.0 / 3.0)); } alfa_den = alfa_den + gau_loc * area_loc * Math.pow(peri_loc, (2.0 / 3.0)); /* no one of these values can be null */ /* * if ( base_dx<0 || base_sx<0 || altezza<0 ) { print("POSIZIONE " + i " - * TIRANTE " + waterLevel[i] + "Error in the evaluation of the wetted area"}; */ } /* case 3: completely wetted */ if (sectionCoordinates[j + 1].z < waterLevel[i] && sectionCoordinates[j].z < waterLevel[i]) { base_dx = waterLevel[i] - sectionCoordinates[j].z; base_sx = waterLevel[i] - sectionCoordinates[j + 1].z; altezza = sectionProgressives.get(j + 1) - sectionProgressives.get(j); area_b = area_b + (base_dx + base_sx) * altezza / 2.0; peri_b = peri_b + Math.sqrt(Math.abs(base_dx - base_sx) * Math.abs(base_dx - base_sx) + altezza * altezza); larghe_b = larghe_b + altezza; gau_b = gau_b + (sectionGauklerStrickler * Math.pow((base_dx + base_sx) / 2, (5.0 / 3.0)) * altezza); gau_loc = sectionGauklerStrickler; area_loc = (base_dx + base_sx) * altezza / 2; peri_loc = Math.sqrt((base_dx - base_sx) * (base_dx - base_sx) + altezza * altezza); if (area_loc != 0) { alfa_num = alfa_num + (gau_loc * gau_loc) * Math.pow(area_loc, (7.0 / 3.0)) / Math.pow(peri_loc, (4.0 / 3.0)); } else { alfa_num = alfa_num + 0; } alfa_den = alfa_den + gau_loc * area_loc * Math.pow(peri_loc, (2.0 / 3.0)); /* no one of these values can be null */ /* * if ( base_dx<0 || base_sx<0 || altezza<0 ) { print("POSIZIONE " + i " - * TIRANTE " + waterLevel[i] + "Error in the evaluation of the wetted area"}; */ } } /* * Fill the final matrix tirase */ /* wetted area */ tirase[i][0] = area_b; /* wetted perimeter */ tirase[i][1] = peri_b; /* hydraulic radius */ tirase[i][2] = area_b / peri_b; /* width of the water surface */ tirase[i][3] = larghe_b; /* roughness coefficient */ gau_b = gau_b / (area_b * Math.pow((area_b / peri_b), (2.0 / 3.0))); tirase[i][4] = gau_b; /* alpha coefficient of Coriolis */ tirase[i][5] = alfa_num / (area_b * Math.pow(gau_b, 2) * Math.pow((area_b / peri_b), (4.0 / 3.0))); /* tirase[i][6]=1; */ /* tirase[i][6]=area_b*alfa_num/(alfa_den*alfa_den); */ } return tirase; }
class class_name[name] begin[{] method[wettedArea, return_type[type[double]], modifier[private], parameter[waterLevel, riverPoints]] begin[{] local_variable[type[double], dx] local_variable[type[double], area_b] local_variable[type[double], peri_b] local_variable[type[double], larghe_b] local_variable[type[double], gau_b] local_variable[type[double], alfa_num] local_variable[type[double], area_loc] local_variable[type[int], imax] local_variable[type[double], tirase] 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=riverPoints, selectors=[], type_arguments=None), name=section)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RiverPoint, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=area_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=peri_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=larghe_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=gau_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=gau_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=alfa_num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=alfa_den, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStartNodeIndex, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEndNodeIndex, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), name=sectionCoordinates)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Coordinate, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSectionProgressive, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), name=sectionProgressives)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Double, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSectionGauklerStrickler, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), name=sectionGauklerStrickler)], modifiers=set(), type=BasicType(dimensions=[], name=double)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=sectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=z, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=waterLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=sectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), MemberReference(member=z, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=waterLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=<), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=waterLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=sectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), MemberReference(member=z, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=-)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=get, postfix_operators=[], prefix_operators=[], qualifier=sectionProgressives, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=sectionProgressives, selectors=[], type_arguments=None), operator=-), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=sectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=z, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=sectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), MemberReference(member=z, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=-), operator=/)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=area_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=area_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operator=/), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=peri_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=peri_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=abs, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=abs, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+)], member=sqrt, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=larghe_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=larghe_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=gau_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=gau_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=sectionGauklerStrickler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operator=/), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5.0), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.0), operator=/)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=gau_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=sectionGauklerStrickler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=area_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operator=/)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=peri_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+)], member=sqrt, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=area_loc, 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=Assignment(expressionl=MemberReference(member=alfa_num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=alfa_num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=gau_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=gau_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MethodInvocation(arguments=[MemberReference(member=area_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7.0), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.0), operator=/)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operandr=MethodInvocation(arguments=[MemberReference(member=peri_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4.0), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.0), operator=/)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=/), operator=+)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=alfa_den, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=alfa_den, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=gau_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=area_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MethodInvocation(arguments=[MemberReference(member=peri_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.0), operator=/)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operator=+)), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=sectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), MemberReference(member=z, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=waterLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=sectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=z, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=waterLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=<), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=waterLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=sectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=z, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=-)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=get, postfix_operators=[], prefix_operators=[], qualifier=sectionProgressives, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=sectionProgressives, selectors=[], type_arguments=None), operator=-), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=sectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), MemberReference(member=z, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=sectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=z, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=-), operator=/)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=area_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=area_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operator=/), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=peri_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=peri_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=abs, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=abs, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+)], member=sqrt, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=larghe_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=larghe_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=gau_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=gau_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=sectionGauklerStrickler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operator=/), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5.0), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.0), operator=/)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=gau_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=sectionGauklerStrickler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=area_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operator=/)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=peri_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+)], member=sqrt, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=area_loc, 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=Assignment(expressionl=MemberReference(member=alfa_num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=alfa_num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=gau_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=gau_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MethodInvocation(arguments=[MemberReference(member=area_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7.0), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.0), operator=/)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operandr=MethodInvocation(arguments=[MemberReference(member=peri_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4.0), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.0), operator=/)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=/), operator=+)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=alfa_den, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=alfa_den, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=gau_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=area_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MethodInvocation(arguments=[MemberReference(member=peri_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.0), operator=/)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operator=+)), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=sectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), MemberReference(member=z, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=waterLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=sectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=z, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=waterLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=<), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=waterLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=sectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=z, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=-)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=waterLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=sectionCoordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), MemberReference(member=z, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=-)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=get, postfix_operators=[], prefix_operators=[], qualifier=sectionProgressives, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=sectionProgressives, selectors=[], type_arguments=None), operator=-)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=area_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=area_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operator=/), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=peri_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=peri_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=abs, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=abs, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+)], member=sqrt, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=larghe_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=larghe_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=gau_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=gau_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=sectionGauklerStrickler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=/), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5.0), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.0), operator=/)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=gau_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=sectionGauklerStrickler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=area_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=/)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=peri_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=BinaryOperation(operandl=MemberReference(member=base_dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=base_sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=altezza, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+)], member=sqrt, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=area_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alfa_num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=alfa_num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=+)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alfa_num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=alfa_num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=gau_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=gau_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MethodInvocation(arguments=[MemberReference(member=area_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7.0), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.0), operator=/)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operandr=MethodInvocation(arguments=[MemberReference(member=peri_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4.0), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.0), operator=/)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=/), operator=+)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=alfa_den, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=alfa_den, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=gau_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=area_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MethodInvocation(arguments=[MemberReference(member=peri_loc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.0), operator=/)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operator=+)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=sx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=Cast(expression=MemberReference(member=dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tirase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=MemberReference(member=area_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tirase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), type==, value=MemberReference(member=peri_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tirase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), type==, value=BinaryOperation(operandl=MemberReference(member=area_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=peri_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tirase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3))]), type==, value=MemberReference(member=larghe_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=gau_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=gau_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=area_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=area_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=peri_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.0), operator=/)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operator=/)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tirase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4))]), type==, value=MemberReference(member=gau_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tirase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5))]), type==, value=BinaryOperation(operandl=MemberReference(member=alfa_num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=area_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=gau_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=area_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=peri_b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4.0), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.0), operator=/)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operator=/)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=imax, 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[member[.tirase]] end[}] END[}]
Keyword[private] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[wettedArea] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[waterLevel] , identifier[List] operator[<] identifier[RiverPoint] operator[>] identifier[riverPoints] operator[SEP] { Keyword[double] identifier[dx] , identifier[sx] operator[SEP] Keyword[double] identifier[area_b] , identifier[base_dx] , identifier[base_sx] , identifier[altezza] operator[SEP] Keyword[double] identifier[peri_b] operator[SEP] Keyword[double] identifier[larghe_b] operator[SEP] Keyword[double] identifier[gau_b] operator[SEP] Keyword[double] identifier[alfa_num] , identifier[alfa_den] operator[SEP] Keyword[double] identifier[area_loc] , identifier[peri_loc] , identifier[gau_loc] operator[SEP] Keyword[int] identifier[imax] operator[=] identifier[riverPoints] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[tirase] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[imax] operator[SEP] operator[SEP] Other[6] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[imax] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[RiverPoint] identifier[section] operator[=] identifier[riverPoints] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[area_b] operator[=] Other[0] operator[SEP] identifier[peri_b] operator[=] Other[0] operator[SEP] identifier[larghe_b] operator[=] Other[0] operator[SEP] identifier[gau_b] operator[=] Other[0] operator[SEP] identifier[gau_loc] operator[=] Other[0] operator[SEP] identifier[alfa_num] operator[=] Other[0] operator[SEP] identifier[alfa_den] operator[=] Other[0] operator[SEP] identifier[dx] operator[=] identifier[section] operator[SEP] identifier[getStartNodeIndex] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] identifier[sx] operator[=] identifier[section] operator[SEP] identifier[getEndNodeIndex] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[Coordinate] operator[SEP] operator[SEP] identifier[sectionCoordinates] operator[=] identifier[section] operator[SEP] identifier[getSectionCoordinates] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Double] operator[>] identifier[sectionProgressives] operator[=] identifier[section] operator[SEP] identifier[getSectionProgressive] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[sectionGauklerStrickler] operator[=] identifier[section] operator[SEP] identifier[getSectionGauklerStrickler] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[dx] operator[-] Other[1] operator[SEP] identifier[j] operator[<] identifier[sx] operator[-] Other[1] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[sectionCoordinates] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[z] operator[>=] identifier[waterLevel] operator[SEP] identifier[i] operator[SEP] operator[&&] identifier[sectionCoordinates] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[SEP] identifier[z] operator[<] identifier[waterLevel] operator[SEP] identifier[i] operator[SEP] operator[SEP] { identifier[base_dx] operator[=] Other[0] operator[SEP] identifier[base_sx] operator[=] identifier[waterLevel] operator[SEP] identifier[i] operator[SEP] operator[-] identifier[sectionCoordinates] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[SEP] identifier[z] operator[SEP] identifier[altezza] operator[=] identifier[base_sx] operator[*] operator[SEP] identifier[sectionProgressives] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[-] identifier[sectionProgressives] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[/] operator[SEP] identifier[sectionCoordinates] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[z] operator[-] identifier[sectionCoordinates] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[SEP] identifier[z] operator[SEP] operator[SEP] identifier[area_b] operator[=] identifier[area_b] operator[+] operator[SEP] identifier[base_dx] operator[+] identifier[base_sx] operator[SEP] operator[*] identifier[altezza] operator[/] literal[Float] operator[SEP] identifier[peri_b] operator[=] identifier[peri_b] operator[+] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[base_dx] operator[-] identifier[base_sx] operator[SEP] operator[*] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[base_dx] operator[-] identifier[base_sx] operator[SEP] operator[+] identifier[altezza] operator[*] identifier[altezza] operator[SEP] operator[SEP] identifier[larghe_b] operator[=] identifier[larghe_b] operator[+] identifier[altezza] operator[SEP] identifier[gau_b] operator[=] identifier[gau_b] operator[+] operator[SEP] identifier[sectionGauklerStrickler] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] operator[SEP] identifier[base_dx] operator[+] identifier[base_sx] operator[SEP] operator[/] literal[Float] , operator[SEP] literal[Float] operator[/] literal[Float] operator[SEP] operator[SEP] operator[*] identifier[altezza] operator[SEP] operator[SEP] identifier[gau_loc] operator[=] identifier[sectionGauklerStrickler] operator[SEP] identifier[area_loc] operator[=] operator[SEP] identifier[base_dx] operator[+] identifier[base_sx] operator[SEP] operator[*] identifier[altezza] operator[/] literal[Float] operator[SEP] identifier[peri_loc] operator[=] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] operator[SEP] identifier[base_dx] operator[-] identifier[base_sx] operator[SEP] operator[*] operator[SEP] identifier[base_dx] operator[-] identifier[base_sx] operator[SEP] operator[+] identifier[altezza] operator[*] identifier[altezza] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[area_loc] operator[!=] Other[0] operator[SEP] { identifier[alfa_num] operator[=] identifier[alfa_num] operator[+] operator[SEP] identifier[gau_loc] operator[*] identifier[gau_loc] operator[SEP] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] identifier[area_loc] , operator[SEP] literal[Float] operator[/] literal[Float] operator[SEP] operator[SEP] operator[/] identifier[Math] operator[SEP] identifier[pow] operator[SEP] identifier[peri_loc] , operator[SEP] literal[Float] operator[/] literal[Float] operator[SEP] operator[SEP] operator[SEP] } identifier[alfa_den] operator[=] identifier[alfa_den] operator[+] identifier[gau_loc] operator[*] identifier[area_loc] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] identifier[peri_loc] , operator[SEP] literal[Float] operator[/] literal[Float] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[sectionCoordinates] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[SEP] identifier[z] operator[>=] identifier[waterLevel] operator[SEP] identifier[i] operator[SEP] operator[&&] identifier[sectionCoordinates] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[z] operator[<] identifier[waterLevel] operator[SEP] identifier[i] operator[SEP] operator[SEP] { identifier[base_sx] operator[=] Other[0] operator[SEP] identifier[base_dx] operator[=] identifier[waterLevel] operator[SEP] identifier[i] operator[SEP] operator[-] identifier[sectionCoordinates] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[z] operator[SEP] identifier[altezza] operator[=] identifier[base_dx] operator[*] operator[SEP] identifier[sectionProgressives] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[-] identifier[sectionProgressives] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[/] operator[SEP] identifier[sectionCoordinates] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[SEP] identifier[z] operator[-] identifier[sectionCoordinates] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[z] operator[SEP] operator[SEP] identifier[area_b] operator[=] identifier[area_b] operator[+] operator[SEP] identifier[base_dx] operator[+] identifier[base_sx] operator[SEP] operator[*] identifier[altezza] operator[/] literal[Float] operator[SEP] identifier[peri_b] operator[=] identifier[peri_b] operator[+] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[base_dx] operator[-] identifier[base_sx] operator[SEP] operator[*] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[base_dx] operator[-] identifier[base_sx] operator[SEP] operator[+] identifier[altezza] operator[*] identifier[altezza] operator[SEP] operator[SEP] identifier[larghe_b] operator[=] identifier[larghe_b] operator[+] identifier[altezza] operator[SEP] identifier[gau_b] operator[=] identifier[gau_b] operator[+] operator[SEP] identifier[sectionGauklerStrickler] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] operator[SEP] identifier[base_dx] operator[+] identifier[base_sx] operator[SEP] operator[/] literal[Float] , operator[SEP] literal[Float] operator[/] literal[Float] operator[SEP] operator[SEP] operator[*] identifier[altezza] operator[SEP] operator[SEP] identifier[gau_loc] operator[=] identifier[sectionGauklerStrickler] operator[SEP] identifier[area_loc] operator[=] operator[SEP] identifier[base_dx] operator[+] identifier[base_sx] operator[SEP] operator[*] identifier[altezza] operator[/] literal[Float] operator[SEP] identifier[peri_loc] operator[=] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] operator[SEP] identifier[base_dx] operator[-] identifier[base_sx] operator[SEP] operator[*] operator[SEP] identifier[base_dx] operator[-] identifier[base_sx] operator[SEP] operator[+] identifier[altezza] operator[*] identifier[altezza] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[area_loc] operator[!=] Other[0] operator[SEP] { identifier[alfa_num] operator[=] identifier[alfa_num] operator[+] operator[SEP] identifier[gau_loc] operator[*] identifier[gau_loc] operator[SEP] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] identifier[area_loc] , operator[SEP] literal[Float] operator[/] literal[Float] operator[SEP] operator[SEP] operator[/] identifier[Math] operator[SEP] identifier[pow] operator[SEP] identifier[peri_loc] , operator[SEP] literal[Float] operator[/] literal[Float] operator[SEP] operator[SEP] operator[SEP] } identifier[alfa_den] operator[=] identifier[alfa_den] operator[+] identifier[gau_loc] operator[*] identifier[area_loc] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] identifier[peri_loc] , operator[SEP] literal[Float] operator[/] literal[Float] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[sectionCoordinates] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[SEP] identifier[z] operator[<] identifier[waterLevel] operator[SEP] identifier[i] operator[SEP] operator[&&] identifier[sectionCoordinates] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[z] operator[<] identifier[waterLevel] operator[SEP] identifier[i] operator[SEP] operator[SEP] { identifier[base_dx] operator[=] identifier[waterLevel] operator[SEP] identifier[i] operator[SEP] operator[-] identifier[sectionCoordinates] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[z] operator[SEP] identifier[base_sx] operator[=] identifier[waterLevel] operator[SEP] identifier[i] operator[SEP] operator[-] identifier[sectionCoordinates] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[SEP] identifier[z] operator[SEP] identifier[altezza] operator[=] identifier[sectionProgressives] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[-] identifier[sectionProgressives] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[area_b] operator[=] identifier[area_b] operator[+] operator[SEP] identifier[base_dx] operator[+] identifier[base_sx] operator[SEP] operator[*] identifier[altezza] operator[/] literal[Float] operator[SEP] identifier[peri_b] operator[=] identifier[peri_b] operator[+] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[base_dx] operator[-] identifier[base_sx] operator[SEP] operator[*] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[base_dx] operator[-] identifier[base_sx] operator[SEP] operator[+] identifier[altezza] operator[*] identifier[altezza] operator[SEP] operator[SEP] identifier[larghe_b] operator[=] identifier[larghe_b] operator[+] identifier[altezza] operator[SEP] identifier[gau_b] operator[=] identifier[gau_b] operator[+] operator[SEP] identifier[sectionGauklerStrickler] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] operator[SEP] identifier[base_dx] operator[+] identifier[base_sx] operator[SEP] operator[/] Other[2] , operator[SEP] literal[Float] operator[/] literal[Float] operator[SEP] operator[SEP] operator[*] identifier[altezza] operator[SEP] operator[SEP] identifier[gau_loc] operator[=] identifier[sectionGauklerStrickler] operator[SEP] identifier[area_loc] operator[=] operator[SEP] identifier[base_dx] operator[+] identifier[base_sx] operator[SEP] operator[*] identifier[altezza] operator[/] Other[2] operator[SEP] identifier[peri_loc] operator[=] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] operator[SEP] identifier[base_dx] operator[-] identifier[base_sx] operator[SEP] operator[*] operator[SEP] identifier[base_dx] operator[-] identifier[base_sx] operator[SEP] operator[+] identifier[altezza] operator[*] identifier[altezza] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[area_loc] operator[!=] Other[0] operator[SEP] { identifier[alfa_num] operator[=] identifier[alfa_num] operator[+] operator[SEP] identifier[gau_loc] operator[*] identifier[gau_loc] operator[SEP] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] identifier[area_loc] , operator[SEP] literal[Float] operator[/] literal[Float] operator[SEP] operator[SEP] operator[/] identifier[Math] operator[SEP] identifier[pow] operator[SEP] identifier[peri_loc] , operator[SEP] literal[Float] operator[/] literal[Float] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[alfa_num] operator[=] identifier[alfa_num] operator[+] Other[0] operator[SEP] } identifier[alfa_den] operator[=] identifier[alfa_den] operator[+] identifier[gau_loc] operator[*] identifier[area_loc] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] identifier[peri_loc] , operator[SEP] literal[Float] operator[/] literal[Float] operator[SEP] operator[SEP] operator[SEP] } } identifier[tirase] operator[SEP] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[=] identifier[area_b] operator[SEP] identifier[tirase] operator[SEP] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[=] identifier[peri_b] operator[SEP] identifier[tirase] operator[SEP] identifier[i] operator[SEP] operator[SEP] Other[2] operator[SEP] operator[=] identifier[area_b] operator[/] identifier[peri_b] operator[SEP] identifier[tirase] operator[SEP] identifier[i] operator[SEP] operator[SEP] Other[3] operator[SEP] operator[=] identifier[larghe_b] operator[SEP] identifier[gau_b] operator[=] identifier[gau_b] operator[/] operator[SEP] identifier[area_b] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] operator[SEP] identifier[area_b] operator[/] identifier[peri_b] operator[SEP] , operator[SEP] literal[Float] operator[/] literal[Float] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[tirase] operator[SEP] identifier[i] operator[SEP] operator[SEP] Other[4] operator[SEP] operator[=] identifier[gau_b] operator[SEP] identifier[tirase] operator[SEP] identifier[i] operator[SEP] operator[SEP] Other[5] operator[SEP] operator[=] identifier[alfa_num] operator[/] operator[SEP] identifier[area_b] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] identifier[gau_b] , Other[2] operator[SEP] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] operator[SEP] identifier[area_b] operator[/] identifier[peri_b] operator[SEP] , operator[SEP] literal[Float] operator[/] literal[Float] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[tirase] operator[SEP] }
private String replaceXYZ(String url, int z, long x, long y) { url = url.replaceAll(Z_VARIABLE, String.valueOf(z)); url = url.replaceAll(X_VARIABLE, String.valueOf(x)); url = url.replaceAll(Y_VARIABLE, String.valueOf(y)); return url; }
class class_name[name] begin[{] method[replaceXYZ, return_type[type[String]], modifier[private], parameter[url, z, x, y]] begin[{] assign[member[.url], call[url.replaceAll, parameter[member[.Z_VARIABLE], call[String.valueOf, parameter[member[.z]]]]]] assign[member[.url], call[url.replaceAll, parameter[member[.X_VARIABLE], call[String.valueOf, parameter[member[.x]]]]]] assign[member[.url], call[url.replaceAll, parameter[member[.Y_VARIABLE], call[String.valueOf, parameter[member[.y]]]]]] return[member[.url]] end[}] END[}]
Keyword[private] identifier[String] identifier[replaceXYZ] operator[SEP] identifier[String] identifier[url] , Keyword[int] identifier[z] , Keyword[long] identifier[x] , Keyword[long] identifier[y] operator[SEP] { identifier[url] operator[=] identifier[url] operator[SEP] identifier[replaceAll] operator[SEP] identifier[Z_VARIABLE] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[url] operator[=] identifier[url] operator[SEP] identifier[replaceAll] operator[SEP] identifier[X_VARIABLE] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] identifier[url] operator[=] identifier[url] operator[SEP] identifier[replaceAll] operator[SEP] identifier[Y_VARIABLE] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[y] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[url] operator[SEP] }
public String info() { ProfileHelper helper = new ProfileHelper(entityDao, securityHelper.getProfileService()); Long id = getLong("user.id"); List<Profile> profiles = entityDao.get(User.class, id).getProfiles(); helper.populateInfo(profiles); return forward(); }
class class_name[name] begin[{] method[info, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[ProfileHelper], helper] local_variable[type[Long], id] local_variable[type[List], profiles] call[helper.populateInfo, parameter[member[.profiles]]] return[call[.forward, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[info] operator[SEP] operator[SEP] { identifier[ProfileHelper] identifier[helper] operator[=] Keyword[new] identifier[ProfileHelper] operator[SEP] identifier[entityDao] , identifier[securityHelper] operator[SEP] identifier[getProfileService] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Long] identifier[id] operator[=] identifier[getLong] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Profile] operator[>] identifier[profiles] operator[=] identifier[entityDao] operator[SEP] identifier[get] operator[SEP] identifier[User] operator[SEP] Keyword[class] , identifier[id] operator[SEP] operator[SEP] identifier[getProfiles] operator[SEP] operator[SEP] operator[SEP] identifier[helper] operator[SEP] identifier[populateInfo] operator[SEP] identifier[profiles] operator[SEP] operator[SEP] Keyword[return] identifier[forward] operator[SEP] operator[SEP] operator[SEP] }
public EClass getObjectContainerPresentationSpaceSize() { if (objectContainerPresentationSpaceSizeEClass == null) { objectContainerPresentationSpaceSizeEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(519); } return objectContainerPresentationSpaceSizeEClass; }
class class_name[name] begin[{] method[getObjectContainerPresentationSpaceSize, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.objectContainerPresentationSpaceSizeEClass], ==, literal[null]]] begin[{] assign[member[.objectContainerPresentationSpaceSizeEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=519)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.objectContainerPresentationSpaceSizeEClass]] end[}] END[}]
Keyword[public] identifier[EClass] identifier[getObjectContainerPresentationSpaceSize] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[objectContainerPresentationSpaceSizeEClass] operator[==] Other[null] operator[SEP] { identifier[objectContainerPresentationSpaceSizeEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[AfplibPackage] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[519] operator[SEP] operator[SEP] } Keyword[return] identifier[objectContainerPresentationSpaceSizeEClass] operator[SEP] }
public void buildClassSummary(XMLNode node, Content summaryContentTree) { String classTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Class_Summary"), configuration.getText("doclet.classes")); String[] classTableHeader = new String[] { configuration.getText("doclet.Class"), configuration.getText("doclet.Description") }; ClassDoc[] classes = packageDoc.isIncluded() ? packageDoc.ordinaryClasses() : configuration.classDocCatalog.ordinaryClasses( Util.getPackageName(packageDoc)); if (classes.length > 0) { profilePackageWriter.addClassesSummary( classes, configuration.getText("doclet.Class_Summary"), classTableSummary, classTableHeader, summaryContentTree); } }
class class_name[name] begin[{] method[buildClassSummary, return_type[void], modifier[public], parameter[node, summaryContentTree]] begin[{] local_variable[type[String], classTableSummary] local_variable[type[String], classTableHeader] local_variable[type[ClassDoc], classes] if[binary_operation[member[classes.length], >, literal[0]]] begin[{] call[profilePackageWriter.addClassesSummary, parameter[member[.classes], call[configuration.getText, parameter[literal["doclet.Class_Summary"]]], member[.classTableSummary], member[.classTableHeader], member[.summaryContentTree]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[buildClassSummary] operator[SEP] identifier[XMLNode] identifier[node] , identifier[Content] identifier[summaryContentTree] operator[SEP] { identifier[String] identifier[classTableSummary] operator[=] identifier[configuration] operator[SEP] identifier[getText] operator[SEP] literal[String] , identifier[configuration] operator[SEP] identifier[getText] operator[SEP] literal[String] operator[SEP] , identifier[configuration] operator[SEP] identifier[getText] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[classTableHeader] operator[=] Keyword[new] identifier[String] operator[SEP] operator[SEP] { identifier[configuration] operator[SEP] identifier[getText] operator[SEP] literal[String] operator[SEP] , identifier[configuration] operator[SEP] identifier[getText] operator[SEP] literal[String] operator[SEP] } operator[SEP] identifier[ClassDoc] operator[SEP] operator[SEP] identifier[classes] operator[=] identifier[packageDoc] operator[SEP] identifier[isIncluded] operator[SEP] operator[SEP] operator[?] identifier[packageDoc] operator[SEP] identifier[ordinaryClasses] operator[SEP] operator[SEP] operator[:] identifier[configuration] operator[SEP] identifier[classDocCatalog] operator[SEP] identifier[ordinaryClasses] operator[SEP] identifier[Util] operator[SEP] identifier[getPackageName] operator[SEP] identifier[packageDoc] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[classes] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[profilePackageWriter] operator[SEP] identifier[addClassesSummary] operator[SEP] identifier[classes] , identifier[configuration] operator[SEP] identifier[getText] operator[SEP] literal[String] operator[SEP] , identifier[classTableSummary] , identifier[classTableHeader] , identifier[summaryContentTree] operator[SEP] operator[SEP] } }
public void setSourceEncryptionContext(java.util.Map<String, String> sourceEncryptionContext) { this.sourceEncryptionContext = sourceEncryptionContext == null ? null : new com.amazonaws.internal.SdkInternalMap<String, String>( sourceEncryptionContext); }
class class_name[name] begin[{] method[setSourceEncryptionContext, return_type[void], modifier[public], parameter[sourceEncryptionContext]] begin[{] assign[THIS[member[None.sourceEncryptionContext]], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=sourceEncryptionContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=ClassCreator(arguments=[MemberReference(member=sourceEncryptionContext, 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=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=SdkInternalMap, sub_type=None))))), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setSourceEncryptionContext] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[sourceEncryptionContext] operator[SEP] { Keyword[this] operator[SEP] identifier[sourceEncryptionContext] operator[=] identifier[sourceEncryptionContext] operator[==] Other[null] operator[?] Other[null] operator[:] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] identifier[sourceEncryptionContext] operator[SEP] operator[SEP] }
private int merge(String[] dst, String[] srcA, int lengthA, Tag[] srcB, int lengthB) { int i = 0; int ai = 0; int bi = 0; while (ai < lengthA && bi < lengthB) { final String ak = srcA[ai]; final String av = srcA[ai + 1]; Tag b = srcB[bi]; int cmp = ak.compareTo(b.key()); if (cmp < 0) { dst[i++] = ak; dst[i++] = av; ai += 2; } else if (cmp > 0) { dst[i++] = b.key(); dst[i++] = b.value(); ++bi; } else { // Newer tags should override, use source B if there are duplicate keys. // If source B has duplicates, then use the last value for the given key. int j = bi + 1; for (; j < lengthB && ak.equals(srcB[j].key()); ++j) { b = srcB[j]; } dst[i++] = b.key(); dst[i++] = b.value(); bi = j; ai += 2; // Ignore } } if (ai < lengthA) { System.arraycopy(srcA, ai, dst, i, lengthA - ai); i += lengthA - ai; } else if (bi < lengthB) { i = dedup(srcB, bi, dst, i, lengthB - bi); } return i; }
class class_name[name] begin[{] method[merge, return_type[type[int]], modifier[private], parameter[dst, srcA, lengthA, srcB, lengthB]] begin[{] local_variable[type[int], i] local_variable[type[int], ai] local_variable[type[int], bi] while[binary_operation[binary_operation[member[.ai], <, member[.lengthA]], &&, binary_operation[member[.bi], <, member[.lengthB]]]] begin[{] local_variable[type[String], ak] local_variable[type[String], av] local_variable[type[Tag], b] local_variable[type[int], cmp] if[binary_operation[member[.cmp], <, literal[0]]] begin[{] assign[member[.dst], member[.ak]] assign[member[.dst], member[.av]] assign[member[.ai], literal[2]] else begin[{] if[binary_operation[member[.cmp], >, literal[0]]] begin[{] assign[member[.dst], call[b.key, parameter[]]] assign[member[.dst], call[b.value, parameter[]]] member[.bi] else begin[{] local_variable[type[int], j] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=srcB, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=lengthB, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=MethodInvocation(arguments=[MemberReference(member=srcB, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=ak, selectors=[], type_arguments=None), operator=&&), init=None, update=[MemberReference(member=j, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) assign[member[.dst], call[b.key, parameter[]]] assign[member[.dst], call[b.value, parameter[]]] assign[member[.bi], member[.j]] assign[member[.ai], literal[2]] end[}] end[}] end[}] if[binary_operation[member[.ai], <, member[.lengthA]]] begin[{] call[System.arraycopy, parameter[member[.srcA], member[.ai], member[.dst], member[.i], binary_operation[member[.lengthA], -, member[.ai]]]] assign[member[.i], binary_operation[member[.lengthA], -, member[.ai]]] else begin[{] if[binary_operation[member[.bi], <, member[.lengthB]]] begin[{] assign[member[.i], call[.dedup, parameter[member[.srcB], member[.bi], member[.dst], member[.i], binary_operation[member[.lengthB], -, member[.bi]]]]] else begin[{] None end[}] end[}] return[member[.i]] end[}] END[}]
Keyword[private] Keyword[int] identifier[merge] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[dst] , identifier[String] operator[SEP] operator[SEP] identifier[srcA] , Keyword[int] identifier[lengthA] , identifier[Tag] operator[SEP] operator[SEP] identifier[srcB] , Keyword[int] identifier[lengthB] operator[SEP] { Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[int] identifier[ai] operator[=] Other[0] operator[SEP] Keyword[int] identifier[bi] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[ai] operator[<] identifier[lengthA] operator[&&] identifier[bi] operator[<] identifier[lengthB] operator[SEP] { Keyword[final] identifier[String] identifier[ak] operator[=] identifier[srcA] operator[SEP] identifier[ai] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[av] operator[=] identifier[srcA] operator[SEP] identifier[ai] operator[+] Other[1] operator[SEP] operator[SEP] identifier[Tag] identifier[b] operator[=] identifier[srcB] operator[SEP] identifier[bi] operator[SEP] operator[SEP] Keyword[int] identifier[cmp] operator[=] identifier[ak] operator[SEP] identifier[compareTo] operator[SEP] identifier[b] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cmp] operator[<] Other[0] operator[SEP] { identifier[dst] operator[SEP] identifier[i] operator[++] operator[SEP] operator[=] identifier[ak] operator[SEP] identifier[dst] operator[SEP] identifier[i] operator[++] operator[SEP] operator[=] identifier[av] operator[SEP] identifier[ai] operator[+=] Other[2] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cmp] operator[>] Other[0] operator[SEP] { identifier[dst] operator[SEP] identifier[i] operator[++] operator[SEP] operator[=] identifier[b] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] identifier[dst] operator[SEP] identifier[i] operator[++] operator[SEP] operator[=] identifier[b] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[bi] operator[SEP] } Keyword[else] { Keyword[int] identifier[j] operator[=] identifier[bi] operator[+] Other[1] operator[SEP] Keyword[for] operator[SEP] operator[SEP] identifier[j] operator[<] identifier[lengthB] operator[&&] identifier[ak] operator[SEP] identifier[equals] operator[SEP] identifier[srcB] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[j] operator[SEP] { identifier[b] operator[=] identifier[srcB] operator[SEP] identifier[j] operator[SEP] operator[SEP] } identifier[dst] operator[SEP] identifier[i] operator[++] operator[SEP] operator[=] identifier[b] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] identifier[dst] operator[SEP] identifier[i] operator[++] operator[SEP] operator[=] identifier[b] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] identifier[bi] operator[=] identifier[j] operator[SEP] identifier[ai] operator[+=] Other[2] operator[SEP] } } Keyword[if] operator[SEP] identifier[ai] operator[<] identifier[lengthA] operator[SEP] { identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[srcA] , identifier[ai] , identifier[dst] , identifier[i] , identifier[lengthA] operator[-] identifier[ai] operator[SEP] operator[SEP] identifier[i] operator[+=] identifier[lengthA] operator[-] identifier[ai] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[bi] operator[<] identifier[lengthB] operator[SEP] { identifier[i] operator[=] identifier[dedup] operator[SEP] identifier[srcB] , identifier[bi] , identifier[dst] , identifier[i] , identifier[lengthB] operator[-] identifier[bi] operator[SEP] operator[SEP] } Keyword[return] identifier[i] operator[SEP] }
public AbstractDoubleList times(int times) { AbstractDoubleList newList = new DoubleArrayList(times*size()); for (int i=times; --i >= 0; ) { newList.addAllOfFromTo(this,0,size()-1); } return newList; }
class class_name[name] begin[{] method[times, return_type[type[AbstractDoubleList]], modifier[public], parameter[times]] begin[{] local_variable[type[AbstractDoubleList], newList] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=addAllOfFromTo, postfix_operators=[], prefix_operators=[], qualifier=newList, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=times, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=None), label=None) return[member[.newList]] end[}] END[}]
Keyword[public] identifier[AbstractDoubleList] identifier[times] operator[SEP] Keyword[int] identifier[times] operator[SEP] { identifier[AbstractDoubleList] identifier[newList] operator[=] Keyword[new] identifier[DoubleArrayList] operator[SEP] identifier[times] operator[*] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[times] operator[SEP] operator[--] identifier[i] operator[>=] Other[0] operator[SEP] operator[SEP] { identifier[newList] operator[SEP] identifier[addAllOfFromTo] operator[SEP] Keyword[this] , Other[0] , identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } Keyword[return] identifier[newList] operator[SEP] }
public static boolean isUpperCase(final String txt) { boolean upper = true; for (final char c : txt.toCharArray()) { if (Character.isLowerCase(c)) { upper = false; break; } } return upper; }
class class_name[name] begin[{] method[isUpperCase, return_type[type[boolean]], modifier[public static], parameter[txt]] begin[{] local_variable[type[boolean], upper] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isLowerCase, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=upper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=toCharArray, postfix_operators=[], prefix_operators=[], qualifier=txt, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers={'final'}, type=BasicType(dimensions=[], name=char))), label=None) return[member[.upper]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isUpperCase] operator[SEP] Keyword[final] identifier[String] identifier[txt] operator[SEP] { Keyword[boolean] identifier[upper] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[final] Keyword[char] identifier[c] operator[:] identifier[txt] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[Character] operator[SEP] identifier[isLowerCase] operator[SEP] identifier[c] operator[SEP] operator[SEP] { identifier[upper] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[return] identifier[upper] operator[SEP] }
public RadialMenuItem addMenuItem (String command, String label, Image icon, Predicate predicate) { RadialMenuItem item = new RadialMenuItem(command, label, new ImageIcon(icon), predicate); addMenuItem(item); return item; }
class class_name[name] begin[{] method[addMenuItem, return_type[type[RadialMenuItem]], modifier[public], parameter[command, label, icon, predicate]] begin[{] local_variable[type[RadialMenuItem], item] call[.addMenuItem, parameter[member[.item]]] return[member[.item]] end[}] END[}]
Keyword[public] identifier[RadialMenuItem] identifier[addMenuItem] operator[SEP] identifier[String] identifier[command] , identifier[String] identifier[label] , identifier[Image] identifier[icon] , identifier[Predicate] identifier[predicate] operator[SEP] { identifier[RadialMenuItem] identifier[item] operator[=] Keyword[new] identifier[RadialMenuItem] operator[SEP] identifier[command] , identifier[label] , Keyword[new] identifier[ImageIcon] operator[SEP] identifier[icon] operator[SEP] , identifier[predicate] operator[SEP] operator[SEP] identifier[addMenuItem] operator[SEP] identifier[item] operator[SEP] operator[SEP] Keyword[return] identifier[item] operator[SEP] }
@Override public ByteBuffer getByteBuffer() throws IOException { ByteBuf byteBuf = fileUpload.getByteBuf(); try { return byteBuf.nioBuffer(); } finally { byteBuf.release(); } }
class class_name[name] begin[{] method[getByteBuffer, return_type[type[ByteBuffer]], modifier[public], parameter[]] begin[{] local_variable[type[ByteBuf], byteBuf] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=nioBuffer, postfix_operators=[], prefix_operators=[], qualifier=byteBuf, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=release, postfix_operators=[], prefix_operators=[], qualifier=byteBuf, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ByteBuffer] identifier[getByteBuffer] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ByteBuf] identifier[byteBuf] operator[=] identifier[fileUpload] operator[SEP] identifier[getByteBuf] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[byteBuf] operator[SEP] identifier[nioBuffer] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[byteBuf] operator[SEP] identifier[release] operator[SEP] operator[SEP] operator[SEP] } }
private SelectQuery incrementQueryPagination(SelectQuery query, SelectResultValue prevResult) { Map<String, Integer> pagingIdentifiers = prevResult.getPagingIdentifiers(); Map<String, Integer> newPagingIdentifers = new HashMap<>(); for (String segmentId : pagingIdentifiers.keySet()) { int newOffset = pagingIdentifiers.get(segmentId) + 1; newPagingIdentifers.put(segmentId, newOffset); } return query.withPagingSpec(new PagingSpec(newPagingIdentifers, pagingThreshold)); }
class class_name[name] begin[{] method[incrementQueryPagination, return_type[type[SelectQuery]], modifier[private], parameter[query, prevResult]] begin[{] local_variable[type[Map], pagingIdentifiers] local_variable[type[Map], newPagingIdentifers] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=segmentId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=pagingIdentifiers, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), name=newOffset)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=segmentId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=newPagingIdentifers, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=pagingIdentifiers, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=segmentId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[call[query.withPagingSpec, parameter[ClassCreator(arguments=[MemberReference(member=newPagingIdentifers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pagingThreshold, 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=PagingSpec, sub_type=None))]]] end[}] END[}]
Keyword[private] identifier[SelectQuery] identifier[incrementQueryPagination] operator[SEP] identifier[SelectQuery] identifier[query] , identifier[SelectResultValue] identifier[prevResult] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Integer] operator[>] identifier[pagingIdentifiers] operator[=] identifier[prevResult] operator[SEP] identifier[getPagingIdentifiers] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Integer] operator[>] identifier[newPagingIdentifers] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[segmentId] operator[:] identifier[pagingIdentifiers] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[newOffset] operator[=] identifier[pagingIdentifiers] operator[SEP] identifier[get] operator[SEP] identifier[segmentId] operator[SEP] operator[+] Other[1] operator[SEP] identifier[newPagingIdentifers] operator[SEP] identifier[put] operator[SEP] identifier[segmentId] , identifier[newOffset] operator[SEP] operator[SEP] } Keyword[return] identifier[query] operator[SEP] identifier[withPagingSpec] operator[SEP] Keyword[new] identifier[PagingSpec] operator[SEP] identifier[newPagingIdentifers] , identifier[pagingThreshold] operator[SEP] operator[SEP] operator[SEP] }
protected void generateIndexFile(Character unicode) throws IOException { String title = configuration.getText("doclet.Window_Split_Index", unicode.toString()); Content body = getBody(true, getWindowTitle(title)); addTop(body); addNavLinks(true, body); HtmlTree divTree = new HtmlTree(HtmlTag.DIV); divTree.addStyle(HtmlStyle.contentContainer); addLinksForIndexes(divTree); addContents(unicode, indexbuilder.getMemberList(unicode), divTree); addLinksForIndexes(divTree); body.addContent(divTree); addNavLinks(false, body); addBottom(body); printHtmlDocument(null, true, body); }
class class_name[name] begin[{] method[generateIndexFile, return_type[void], modifier[protected], parameter[unicode]] begin[{] local_variable[type[String], title] local_variable[type[Content], body] call[.addTop, parameter[member[.body]]] call[.addNavLinks, parameter[literal[true], member[.body]]] local_variable[type[HtmlTree], divTree] call[divTree.addStyle, parameter[member[HtmlStyle.contentContainer]]] call[.addLinksForIndexes, parameter[member[.divTree]]] call[.addContents, parameter[member[.unicode], call[indexbuilder.getMemberList, parameter[member[.unicode]]], member[.divTree]]] call[.addLinksForIndexes, parameter[member[.divTree]]] call[body.addContent, parameter[member[.divTree]]] call[.addNavLinks, parameter[literal[false], member[.body]]] call[.addBottom, parameter[member[.body]]] call[.printHtmlDocument, parameter[literal[null], literal[true], member[.body]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[generateIndexFile] operator[SEP] identifier[Character] identifier[unicode] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[title] operator[=] identifier[configuration] operator[SEP] identifier[getText] operator[SEP] literal[String] , identifier[unicode] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Content] identifier[body] operator[=] identifier[getBody] operator[SEP] literal[boolean] , identifier[getWindowTitle] operator[SEP] identifier[title] operator[SEP] operator[SEP] operator[SEP] identifier[addTop] operator[SEP] identifier[body] operator[SEP] operator[SEP] identifier[addNavLinks] operator[SEP] literal[boolean] , identifier[body] operator[SEP] operator[SEP] identifier[HtmlTree] identifier[divTree] operator[=] Keyword[new] identifier[HtmlTree] operator[SEP] identifier[HtmlTag] operator[SEP] identifier[DIV] operator[SEP] operator[SEP] identifier[divTree] operator[SEP] identifier[addStyle] operator[SEP] identifier[HtmlStyle] operator[SEP] identifier[contentContainer] operator[SEP] operator[SEP] identifier[addLinksForIndexes] operator[SEP] identifier[divTree] operator[SEP] operator[SEP] identifier[addContents] operator[SEP] identifier[unicode] , identifier[indexbuilder] operator[SEP] identifier[getMemberList] operator[SEP] identifier[unicode] operator[SEP] , identifier[divTree] operator[SEP] operator[SEP] identifier[addLinksForIndexes] operator[SEP] identifier[divTree] operator[SEP] operator[SEP] identifier[body] operator[SEP] identifier[addContent] operator[SEP] identifier[divTree] operator[SEP] operator[SEP] identifier[addNavLinks] operator[SEP] literal[boolean] , identifier[body] operator[SEP] operator[SEP] identifier[addBottom] operator[SEP] identifier[body] operator[SEP] operator[SEP] identifier[printHtmlDocument] operator[SEP] Other[null] , literal[boolean] , identifier[body] operator[SEP] operator[SEP] }
public static boolean comparePaths(String path1, String path2) { return addLeadingAndTrailingSlash(path1).equals(addLeadingAndTrailingSlash(path2)); }
class class_name[name] begin[{] method[comparePaths, return_type[type[boolean]], modifier[public static], parameter[path1, path2]] begin[{] return[call[.addLeadingAndTrailingSlash, parameter[member[.path1]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[comparePaths] operator[SEP] identifier[String] identifier[path1] , identifier[String] identifier[path2] operator[SEP] { Keyword[return] identifier[addLeadingAndTrailingSlash] operator[SEP] identifier[path1] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[addLeadingAndTrailingSlash] operator[SEP] identifier[path2] operator[SEP] operator[SEP] operator[SEP] }
public RelationalDatabase withPendingMaintenanceActions(PendingMaintenanceAction... pendingMaintenanceActions) { if (this.pendingMaintenanceActions == null) { setPendingMaintenanceActions(new java.util.ArrayList<PendingMaintenanceAction>(pendingMaintenanceActions.length)); } for (PendingMaintenanceAction ele : pendingMaintenanceActions) { this.pendingMaintenanceActions.add(ele); } return this; }
class class_name[name] begin[{] method[withPendingMaintenanceActions, return_type[type[RelationalDatabase]], modifier[public], parameter[pendingMaintenanceActions]] begin[{] if[binary_operation[THIS[member[None.pendingMaintenanceActions]], ==, literal[null]]] begin[{] call[.setPendingMaintenanceActions, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=pendingMaintenanceActions, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=PendingMaintenanceAction, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=pendingMaintenanceActions, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=pendingMaintenanceActions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PendingMaintenanceAction, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[RelationalDatabase] identifier[withPendingMaintenanceActions] operator[SEP] identifier[PendingMaintenanceAction] operator[...] identifier[pendingMaintenanceActions] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[pendingMaintenanceActions] operator[==] Other[null] operator[SEP] { identifier[setPendingMaintenanceActions] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[PendingMaintenanceAction] operator[>] operator[SEP] identifier[pendingMaintenanceActions] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[PendingMaintenanceAction] identifier[ele] operator[:] identifier[pendingMaintenanceActions] operator[SEP] { Keyword[this] operator[SEP] identifier[pendingMaintenanceActions] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public BigComplex round(MathContext mathContext) { return valueOf(re.round(mathContext), im.round(mathContext)); }
class class_name[name] begin[{] method[round, return_type[type[BigComplex]], modifier[public], parameter[mathContext]] begin[{] return[call[.valueOf, parameter[call[re.round, parameter[member[.mathContext]]], call[im.round, parameter[member[.mathContext]]]]]] end[}] END[}]
Keyword[public] identifier[BigComplex] identifier[round] operator[SEP] identifier[MathContext] identifier[mathContext] operator[SEP] { Keyword[return] identifier[valueOf] operator[SEP] identifier[re] operator[SEP] identifier[round] operator[SEP] identifier[mathContext] operator[SEP] , identifier[im] operator[SEP] identifier[round] operator[SEP] identifier[mathContext] operator[SEP] operator[SEP] operator[SEP] }
public GraphQLInputObjectField transform(Consumer<Builder> builderConsumer) { Builder builder = newInputObjectField(this); builderConsumer.accept(builder); return builder.build(); }
class class_name[name] begin[{] method[transform, return_type[type[GraphQLInputObjectField]], modifier[public], parameter[builderConsumer]] begin[{] local_variable[type[Builder], builder] call[builderConsumer.accept, parameter[member[.builder]]] return[call[builder.build, parameter[]]] end[}] END[}]
Keyword[public] identifier[GraphQLInputObjectField] identifier[transform] operator[SEP] identifier[Consumer] operator[<] identifier[Builder] operator[>] identifier[builderConsumer] operator[SEP] { identifier[Builder] identifier[builder] operator[=] identifier[newInputObjectField] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[builderConsumer] operator[SEP] identifier[accept] operator[SEP] identifier[builder] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public int getTotalTriples() throws Exception { int total = 0; for (HashMap<String, Integer> mappingStat : statistics.values()) { for (Integer triplesCount : mappingStat.values()) { int triples = triplesCount.intValue(); if (triples == -1) { throw new Exception("An error was occurred in the counting process."); } total = total + triples; } } return total; }
class class_name[name] begin[{] method[getTotalTriples, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[int], total] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=intValue, postfix_operators=[], prefix_operators=[], qualifier=triplesCount, selectors=[], type_arguments=None), name=triples)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=triples, 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=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="An error was occurred in the counting process.")], 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)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=total, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=total, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=triples, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=mappingStat, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=triplesCount)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=statistics, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=mappingStat)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=[], name=HashMap, sub_type=None))), label=None) return[member[.total]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getTotalTriples] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[int] identifier[total] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[Integer] operator[>] identifier[mappingStat] operator[:] identifier[statistics] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Integer] identifier[triplesCount] operator[:] identifier[mappingStat] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[triples] operator[=] identifier[triplesCount] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[triples] operator[==] operator[-] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[total] operator[=] identifier[total] operator[+] identifier[triples] operator[SEP] } } Keyword[return] identifier[total] operator[SEP] }
int pcode_radial( ByteBuffer bos, int hoff, int hedsiz, boolean isZ, byte[] data, short[] threshold ) throws IOException { byte[] b2 = new byte[2]; int soff; ArrayList dims = new ArrayList(); int iscale = 1; /* data scale */ int ival; ival = convertShort2unsignedInt(threshold[0]); if ( (ival & ( 1 << 13 )) != 0 ) iscale = 20; if ( (ival & ( 1 << 12 )) != 0 ) iscale = 10; bos.get(b2, 0, 2); short first_bin = (short)getInt(b2, 2); bos.get(b2, 0, 2); short num_bin = (short)(getUInt(b2, 2)); if(this.pcode == 94 || this.pcode == 99) num_bin = addBinSize(num_bin); bos.get(b2, 0, 2); // short radp_i = (short)getInt(b2, 2); bos.get(b2, 0, 2); // short radp_j = (short)getInt(b2, 2); bos.get(b2, 0, 2); short radp_scale = (short)getInt(b2, 2); if(this.pcode == 134 || this.pcode == 135) radp_scale = (short)(radp_scale * 1000); bos.get(b2, 0, 2); short num_radials = (short)getInt(b2, 2); soff = 12; hedsiz = hedsiz + soff; numY0 = 0; numY = num_radials; numX0 = first_bin; numX = num_bin; int nlevel = code_levelslookup( pcode ); int [] levels; //prod_info_size = 2 * (int) (num_bin * scale + 0.5); //dimensions: radial, bin ncfile.addAttribute(null, new Attribute("cdm_data_type", FeatureType.RADIAL.toString())); Dimension radialDim = new Dimension("azimuth", num_radials); ncfile.addDimension( null, radialDim); Dimension binDim = new Dimension("gate", num_bin); ncfile.addDimension( null, binDim); dims.add( radialDim); dims.add( binDim); ArrayList dims1 = new ArrayList(); ArrayList dims2 = new ArrayList(); dims1.add(radialDim); dims2.add(binDim); // Variable aziVar = new Variable(ncfile, null, null, "azimuth"); // aziVar.setDataType(DataType.FLOAT); // aziVar.setDimensions(dims1); // ncfile.addVariable(null, aziVar); // aziVar.addAttribute( new Attribute(CDM.LONG_NAME, "azimuth angle in degrees: 0 = true north, 90 = east")); // aziVar.addAttribute( new Attribute(CDM.UNITS, "degrees")); // aziVar.setSPobject( new Vinfo (numX, numX0, numY, numY0, hoff, hedsiz, isR, isZ, null, null, 0)); // dims1 = new ArrayList(); // dims1.add(binDim); //Variable gateV = new Variable(ncfile, null, null, "gate1"); //gateV.setDataType(DataType.FLOAT); //gateV.setDimensions(dims2); //ncfile.addVariable(null, gateV); //gateV.addAttribute( new Attribute(CDM.LONG_NAME, "radial distance to start of gate")); //gateV.addAttribute( new Attribute(CDM.UNITS, "m")); //gateV.setSPobject( new Vinfo (numX, numX0, numY, radp_scale, hoff, hedsiz, isR, isZ, null, null, 0, 0)); isR = true; // add elevation coordinate variable String vName = "elevation"; String lName = "elevation angle in degres: 0 = parallel to pedestal base, 90 = perpendicular"; Attribute att = new Attribute(_Coordinate.AxisType, AxisType.RadialElevation.toString()); addParameter(vName, lName, ncfile, dims1, att, DataType.FLOAT, "degrees",hoff, hedsiz, isZ, p3); // add azimuth coordinate variable vName = "azimuth"; lName = "azimuth angle in degrees: 0 = true north, 90 = east"; att = new Attribute(_Coordinate.AxisType, AxisType.RadialAzimuth.toString()); addParameter(vName, lName, ncfile, dims1, att, DataType.FLOAT, "degrees",hoff, hedsiz, isZ, 0); // add gate coordinate variable vName = "gate"; lName = "Radial distance to the start of gate"; att = new Attribute(_Coordinate.AxisType, AxisType.RadialDistance.toString()); addParameter(vName, lName, ncfile, dims2, att, DataType.FLOAT, "meters",hoff, hedsiz, isZ, radp_scale); // add radial coordinate variable vName = "latitude"; lName = "Latitude of the instrument"; att = new Attribute(_Coordinate.AxisType, AxisType.Lat.toString()); addParameter(vName, lName, ncfile, dims1, att, DataType.FLOAT, "degrees",hoff, hedsiz, isZ, 0); vName = "longitude"; lName = "Longitude of the instrument"; att = new Attribute(_Coordinate.AxisType, AxisType.Lon.toString()); addParameter(vName, lName, ncfile, dims1, att, DataType.FLOAT, "degrees",hoff, hedsiz, isZ, 0); vName = "altitude"; lName = "Altitude in meters (asl) of the instrument"; att = new Attribute(_Coordinate.AxisType, AxisType.Height.toString()); addParameter(vName, lName, ncfile, dims1, att, DataType.FLOAT, "meters",hoff, hedsiz, isZ, 0); vName = "rays_time"; lName = "rays time"; att = new Attribute(_Coordinate.AxisType, AxisType.Time.toString()); addParameter(vName, lName, ncfile, dims1, att, DataType.DOUBLE, "milliseconds since 1970-01-01 00:00 UTC" ,hoff, hedsiz, isZ, 0); //add RAW, BRIT variables for all radial variable if(pcode == 182 || pcode == 99 ) { levels = getTDWRLevels(nlevel, threshold); iscale = 10; } else if (pcode == 186 || pcode == 94) { threshold[0] = -320; threshold[1] = 5; threshold[2] = 254; levels = getTDWRLevels(nlevel, threshold); iscale = 10; } else if (pcode == 32 ) { levels = getTDWRLevels1(nlevel, threshold); iscale = 10; } else if (pcode == 138) { levels = getTDWRLevels1(nlevel, threshold); iscale = 100; } else if (pcode == 134 || pcode == 135) { levels = getTDWRLevels2(nlevel, threshold); iscale = 1; } else if (pcode ==159 || pcode ==161 || pcode == 163 || pcode == 170 || pcode == 172 || pcode == 173 || pcode == 174 || pcode == 175 || pcode == 165 || pcode == 177) { levels = getDualpolLevels(threshold); iscale = 100; } else { levels = getLevels(nlevel, threshold); } Variable v = new Variable(ncfile, null, null, cname + "_RAW"); v.setDataType(DataType.UBYTE); v.setDimensions(dims); ncfile.addVariable(null, v); v.addAttribute( new Attribute(CDM.UNITS, cunit)); String coordinates = "elevation azimuth gate rays_time latitude longitude altitude"; v.addAttribute( new Attribute(_Coordinate.Axes, coordinates)); // v.addAttribute( new Attribute(CDM.UNSIGNED, "true")); v.setSPobject( new Vinfo (numX, numX0, numY, numY0, hoff, hedsiz, isR, isZ, null, levels, 0, nlevel)); // addVariable(cname + "_Brightness", ctitle + " Brightness", ncfile, dims, coordinates, DataType.FLOAT, // cunit, hoff, hedsiz, isZ, nlevel, levels, iscale); if (cname.startsWith("CorrelationCoefficient") || cname.startsWith("HydrometeorClassification") || cname.startsWith("DifferentialReflectivity") || cname.startsWith("DifferentialPhase") || cname.startsWith("HypridHydrometeorClassification") ) { addVariable(cname, ctitle, ncfile, dims, coordinates, DataType.FLOAT, cunit, hoff, hedsiz, isZ, nlevel, levels, iscale); } else if (cname.startsWith("OneHourAccumulation") || cname.startsWith("DigitalAccumulationArray") || cname.startsWith("StormTotalAccumulation") || cname.startsWith("DigitalStormTotalAccumulation") || cname.startsWith("Accumulation3Hour") || cname.startsWith("Accumulation24Hour") || cname.startsWith("Digital1HourDifferenceAccumulation") || cname.startsWith("DigitalInstantaneousPrecipitationRate") || cname.startsWith("DigitalInstantaneousPrecipitationRate") || cname.startsWith("DigitalTotalDifferenceAccumulation") ) { addVariable(cname, ctitle, ncfile, dims, coordinates, DataType.FLOAT, cunit, hoff, hedsiz, isZ, nlevel, levels, iscale); } else if( cname.startsWith("BaseReflectivity") || cname.endsWith("Reflectivity") || cname.startsWith("SpectrumWidth")){ //addVariable(cname + "_VIP", ctitle + " VIP Level", ncfile, dims, coordinates, DataType.FLOAT, // cunit, hoff, hedsiz, isZ, nlevel, levels, iscale); addVariable(cname, ctitle, ncfile, dims, coordinates, DataType.FLOAT, cunit, hoff, hedsiz, isZ, nlevel, levels, iscale); } else if (cname.startsWith("RadialVelocity") || cname.startsWith("StormMeanVelocity") || cname.startsWith("BaseVelocity")) { addVariable(cname, ctitle, ncfile, dims, coordinates, DataType.FLOAT, cunit, hoff, hedsiz, isZ, nlevel, levels, iscale); } else if (cname.startsWith("Precip") || cname.endsWith("Precip") || cname.startsWith("EnhancedEchoTop") || cname.startsWith("DigitalIntegLiquid")){ addVariable(cname, ctitle, ncfile, dims, coordinates, DataType.FLOAT, cunit, hoff, hedsiz, isZ, nlevel, levels, iscale); } return soff; }
class class_name[name] begin[{] method[pcode_radial, return_type[type[int]], modifier[default], parameter[bos, hoff, hedsiz, isZ, data, threshold]] begin[{] local_variable[type[byte], b2] local_variable[type[int], soff] local_variable[type[ArrayList], dims] local_variable[type[int], iscale] local_variable[type[int], ival] assign[member[.ival], call[.convertShort2unsignedInt, parameter[member[.threshold]]]] if[binary_operation[binary_operation[member[.ival], &, binary_operation[literal[1], <<, literal[13]]], !=, literal[0]]] begin[{] assign[member[.iscale], literal[20]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.ival], &, binary_operation[literal[1], <<, literal[12]]], !=, literal[0]]] begin[{] assign[member[.iscale], literal[10]] else begin[{] None end[}] call[bos.get, parameter[member[.b2], literal[0], literal[2]]] local_variable[type[short], first_bin] call[bos.get, parameter[member[.b2], literal[0], literal[2]]] local_variable[type[short], num_bin] if[binary_operation[binary_operation[THIS[member[None.pcode]], ==, literal[94]], ||, binary_operation[THIS[member[None.pcode]], ==, literal[99]]]] begin[{] assign[member[.num_bin], call[.addBinSize, parameter[member[.num_bin]]]] else begin[{] None end[}] call[bos.get, parameter[member[.b2], literal[0], literal[2]]] call[bos.get, parameter[member[.b2], literal[0], literal[2]]] call[bos.get, parameter[member[.b2], literal[0], literal[2]]] local_variable[type[short], radp_scale] if[binary_operation[binary_operation[THIS[member[None.pcode]], ==, literal[134]], ||, binary_operation[THIS[member[None.pcode]], ==, literal[135]]]] begin[{] assign[member[.radp_scale], Cast(expression=BinaryOperation(operandl=MemberReference(member=radp_scale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1000), operator=*), type=BasicType(dimensions=[], name=short))] else begin[{] None end[}] call[bos.get, parameter[member[.b2], literal[0], literal[2]]] local_variable[type[short], num_radials] assign[member[.soff], literal[12]] assign[member[.hedsiz], binary_operation[member[.hedsiz], +, member[.soff]]] assign[member[.numY0], literal[0]] assign[member[.numY], member[.num_radials]] assign[member[.numX0], member[.first_bin]] assign[member[.numX], member[.num_bin]] local_variable[type[int], nlevel] local_variable[type[int], levels] call[ncfile.addAttribute, parameter[literal[null], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="cdm_data_type"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=FeatureType.RADIAL, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Attribute, sub_type=None))]] local_variable[type[Dimension], radialDim] call[ncfile.addDimension, parameter[literal[null], member[.radialDim]]] local_variable[type[Dimension], binDim] call[ncfile.addDimension, parameter[literal[null], member[.binDim]]] call[dims.add, parameter[member[.radialDim]]] call[dims.add, parameter[member[.binDim]]] local_variable[type[ArrayList], dims1] local_variable[type[ArrayList], dims2] call[dims1.add, parameter[member[.radialDim]]] call[dims2.add, parameter[member[.binDim]]] assign[member[.isR], literal[true]] local_variable[type[String], vName] local_variable[type[String], lName] local_variable[type[Attribute], att] call[.addParameter, parameter[member[.vName], member[.lName], member[.ncfile], member[.dims1], member[.att], member[DataType.FLOAT], literal["degrees"], member[.hoff], member[.hedsiz], member[.isZ], member[.p3]]] assign[member[.vName], literal["azimuth"]] assign[member[.lName], literal["azimuth angle in degrees: 0 = true north, 90 = east"]] assign[member[.att], ClassCreator(arguments=[MemberReference(member=AxisType, postfix_operators=[], prefix_operators=[], qualifier=_Coordinate, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=AxisType.RadialAzimuth, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Attribute, sub_type=None))] call[.addParameter, parameter[member[.vName], member[.lName], member[.ncfile], member[.dims1], member[.att], member[DataType.FLOAT], literal["degrees"], member[.hoff], member[.hedsiz], member[.isZ], literal[0]]] assign[member[.vName], literal["gate"]] assign[member[.lName], literal["Radial distance to the start of gate"]] assign[member[.att], ClassCreator(arguments=[MemberReference(member=AxisType, postfix_operators=[], prefix_operators=[], qualifier=_Coordinate, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=AxisType.RadialDistance, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Attribute, sub_type=None))] call[.addParameter, parameter[member[.vName], member[.lName], member[.ncfile], member[.dims2], member[.att], member[DataType.FLOAT], literal["meters"], member[.hoff], member[.hedsiz], member[.isZ], member[.radp_scale]]] assign[member[.vName], literal["latitude"]] assign[member[.lName], literal["Latitude of the instrument"]] assign[member[.att], ClassCreator(arguments=[MemberReference(member=AxisType, postfix_operators=[], prefix_operators=[], qualifier=_Coordinate, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=AxisType.Lat, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Attribute, sub_type=None))] call[.addParameter, parameter[member[.vName], member[.lName], member[.ncfile], member[.dims1], member[.att], member[DataType.FLOAT], literal["degrees"], member[.hoff], member[.hedsiz], member[.isZ], literal[0]]] assign[member[.vName], literal["longitude"]] assign[member[.lName], literal["Longitude of the instrument"]] assign[member[.att], ClassCreator(arguments=[MemberReference(member=AxisType, postfix_operators=[], prefix_operators=[], qualifier=_Coordinate, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=AxisType.Lon, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Attribute, sub_type=None))] call[.addParameter, parameter[member[.vName], member[.lName], member[.ncfile], member[.dims1], member[.att], member[DataType.FLOAT], literal["degrees"], member[.hoff], member[.hedsiz], member[.isZ], literal[0]]] assign[member[.vName], literal["altitude"]] assign[member[.lName], literal["Altitude in meters (asl) of the instrument"]] assign[member[.att], ClassCreator(arguments=[MemberReference(member=AxisType, postfix_operators=[], prefix_operators=[], qualifier=_Coordinate, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=AxisType.Height, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Attribute, sub_type=None))] call[.addParameter, parameter[member[.vName], member[.lName], member[.ncfile], member[.dims1], member[.att], member[DataType.FLOAT], literal["meters"], member[.hoff], member[.hedsiz], member[.isZ], literal[0]]] assign[member[.vName], literal["rays_time"]] assign[member[.lName], literal["rays time"]] assign[member[.att], ClassCreator(arguments=[MemberReference(member=AxisType, postfix_operators=[], prefix_operators=[], qualifier=_Coordinate, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=AxisType.Time, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Attribute, sub_type=None))] call[.addParameter, parameter[member[.vName], member[.lName], member[.ncfile], member[.dims1], member[.att], member[DataType.DOUBLE], literal["milliseconds since 1970-01-01 00:00 UTC"], member[.hoff], member[.hedsiz], member[.isZ], literal[0]]] if[binary_operation[binary_operation[member[.pcode], ==, literal[182]], ||, binary_operation[member[.pcode], ==, literal[99]]]] begin[{] assign[member[.levels], call[.getTDWRLevels, parameter[member[.nlevel], member[.threshold]]]] assign[member[.iscale], literal[10]] else begin[{] if[binary_operation[binary_operation[member[.pcode], ==, literal[186]], ||, binary_operation[member[.pcode], ==, literal[94]]]] begin[{] assign[member[.threshold], literal[320]] assign[member[.threshold], literal[5]] assign[member[.threshold], literal[254]] assign[member[.levels], call[.getTDWRLevels, parameter[member[.nlevel], member[.threshold]]]] assign[member[.iscale], literal[10]] else begin[{] if[binary_operation[member[.pcode], ==, literal[32]]] begin[{] assign[member[.levels], call[.getTDWRLevels1, parameter[member[.nlevel], member[.threshold]]]] assign[member[.iscale], literal[10]] else begin[{] if[binary_operation[member[.pcode], ==, literal[138]]] begin[{] assign[member[.levels], call[.getTDWRLevels1, parameter[member[.nlevel], member[.threshold]]]] assign[member[.iscale], literal[100]] else begin[{] if[binary_operation[binary_operation[member[.pcode], ==, literal[134]], ||, binary_operation[member[.pcode], ==, literal[135]]]] begin[{] assign[member[.levels], call[.getTDWRLevels2, parameter[member[.nlevel], member[.threshold]]]] assign[member[.iscale], literal[1]] else begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[.pcode], ==, literal[159]], ||, binary_operation[member[.pcode], ==, literal[161]]], ||, binary_operation[member[.pcode], ==, literal[163]]], ||, binary_operation[member[.pcode], ==, literal[170]]], ||, binary_operation[member[.pcode], ==, literal[172]]], ||, binary_operation[member[.pcode], ==, literal[173]]], ||, binary_operation[member[.pcode], ==, literal[174]]], ||, binary_operation[member[.pcode], ==, literal[175]]], ||, binary_operation[member[.pcode], ==, literal[165]]], ||, binary_operation[member[.pcode], ==, literal[177]]]] begin[{] assign[member[.levels], call[.getDualpolLevels, parameter[member[.threshold]]]] assign[member[.iscale], literal[100]] else begin[{] assign[member[.levels], call[.getLevels, parameter[member[.nlevel], member[.threshold]]]] end[}] end[}] end[}] end[}] end[}] end[}] local_variable[type[Variable], v] call[v.setDataType, parameter[member[DataType.UBYTE]]] call[v.setDimensions, parameter[member[.dims]]] call[ncfile.addVariable, parameter[literal[null], member[.v]]] call[v.addAttribute, parameter[ClassCreator(arguments=[MemberReference(member=UNITS, postfix_operators=[], prefix_operators=[], qualifier=CDM, selectors=[]), MemberReference(member=cunit, 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=Attribute, sub_type=None))]] local_variable[type[String], coordinates] call[v.addAttribute, parameter[ClassCreator(arguments=[MemberReference(member=Axes, postfix_operators=[], prefix_operators=[], qualifier=_Coordinate, selectors=[]), MemberReference(member=coordinates, 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=Attribute, sub_type=None))]] call[v.setSPobject, parameter[ClassCreator(arguments=[MemberReference(member=numX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=numX0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=numY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=numY0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=hoff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=hedsiz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isZ, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=levels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=nlevel, 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=Vinfo, sub_type=None))]] if[binary_operation[binary_operation[binary_operation[binary_operation[call[cname.startsWith, parameter[literal["CorrelationCoefficient"]]], ||, call[cname.startsWith, parameter[literal["HydrometeorClassification"]]]], ||, call[cname.startsWith, parameter[literal["DifferentialReflectivity"]]]], ||, call[cname.startsWith, parameter[literal["DifferentialPhase"]]]], ||, call[cname.startsWith, parameter[literal["HypridHydrometeorClassification"]]]]] begin[{] call[.addVariable, parameter[member[.cname], member[.ctitle], member[.ncfile], member[.dims], member[.coordinates], member[DataType.FLOAT], member[.cunit], member[.hoff], member[.hedsiz], member[.isZ], member[.nlevel], member[.levels], member[.iscale]]] else begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[call[cname.startsWith, parameter[literal["OneHourAccumulation"]]], ||, call[cname.startsWith, parameter[literal["DigitalAccumulationArray"]]]], ||, call[cname.startsWith, parameter[literal["StormTotalAccumulation"]]]], ||, call[cname.startsWith, parameter[literal["DigitalStormTotalAccumulation"]]]], ||, call[cname.startsWith, parameter[literal["Accumulation3Hour"]]]], ||, call[cname.startsWith, parameter[literal["Accumulation24Hour"]]]], ||, call[cname.startsWith, parameter[literal["Digital1HourDifferenceAccumulation"]]]], ||, call[cname.startsWith, parameter[literal["DigitalInstantaneousPrecipitationRate"]]]], ||, call[cname.startsWith, parameter[literal["DigitalInstantaneousPrecipitationRate"]]]], ||, call[cname.startsWith, parameter[literal["DigitalTotalDifferenceAccumulation"]]]]] begin[{] call[.addVariable, parameter[member[.cname], member[.ctitle], member[.ncfile], member[.dims], member[.coordinates], member[DataType.FLOAT], member[.cunit], member[.hoff], member[.hedsiz], member[.isZ], member[.nlevel], member[.levels], member[.iscale]]] else begin[{] if[binary_operation[binary_operation[call[cname.startsWith, parameter[literal["BaseReflectivity"]]], ||, call[cname.endsWith, parameter[literal["Reflectivity"]]]], ||, call[cname.startsWith, parameter[literal["SpectrumWidth"]]]]] begin[{] call[.addVariable, parameter[member[.cname], member[.ctitle], member[.ncfile], member[.dims], member[.coordinates], member[DataType.FLOAT], member[.cunit], member[.hoff], member[.hedsiz], member[.isZ], member[.nlevel], member[.levels], member[.iscale]]] else begin[{] if[binary_operation[binary_operation[call[cname.startsWith, parameter[literal["RadialVelocity"]]], ||, call[cname.startsWith, parameter[literal["StormMeanVelocity"]]]], ||, call[cname.startsWith, parameter[literal["BaseVelocity"]]]]] begin[{] call[.addVariable, parameter[member[.cname], member[.ctitle], member[.ncfile], member[.dims], member[.coordinates], member[DataType.FLOAT], member[.cunit], member[.hoff], member[.hedsiz], member[.isZ], member[.nlevel], member[.levels], member[.iscale]]] else begin[{] if[binary_operation[binary_operation[binary_operation[call[cname.startsWith, parameter[literal["Precip"]]], ||, call[cname.endsWith, parameter[literal["Precip"]]]], ||, call[cname.startsWith, parameter[literal["EnhancedEchoTop"]]]], ||, call[cname.startsWith, parameter[literal["DigitalIntegLiquid"]]]]] begin[{] call[.addVariable, parameter[member[.cname], member[.ctitle], member[.ncfile], member[.dims], member[.coordinates], member[DataType.FLOAT], member[.cunit], member[.hoff], member[.hedsiz], member[.isZ], member[.nlevel], member[.levels], member[.iscale]]] else begin[{] None end[}] end[}] end[}] end[}] end[}] return[member[.soff]] end[}] END[}]
Keyword[int] identifier[pcode_radial] operator[SEP] identifier[ByteBuffer] identifier[bos] , Keyword[int] identifier[hoff] , Keyword[int] identifier[hedsiz] , Keyword[boolean] identifier[isZ] , Keyword[byte] operator[SEP] operator[SEP] identifier[data] , Keyword[short] operator[SEP] operator[SEP] identifier[threshold] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[byte] operator[SEP] operator[SEP] identifier[b2] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[int] identifier[soff] operator[SEP] identifier[ArrayList] identifier[dims] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[iscale] operator[=] Other[1] operator[SEP] Keyword[int] identifier[ival] operator[SEP] identifier[ival] operator[=] identifier[convertShort2unsignedInt] operator[SEP] identifier[threshold] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[ival] operator[&] operator[SEP] Other[1] operator[<<] Other[13] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[iscale] operator[=] Other[20] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[ival] operator[&] operator[SEP] Other[1] operator[<<] Other[12] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[iscale] operator[=] Other[10] operator[SEP] identifier[bos] operator[SEP] identifier[get] operator[SEP] identifier[b2] , Other[0] , Other[2] operator[SEP] operator[SEP] Keyword[short] identifier[first_bin] operator[=] operator[SEP] Keyword[short] operator[SEP] identifier[getInt] operator[SEP] identifier[b2] , Other[2] operator[SEP] operator[SEP] identifier[bos] operator[SEP] identifier[get] operator[SEP] identifier[b2] , Other[0] , Other[2] operator[SEP] operator[SEP] Keyword[short] identifier[num_bin] operator[=] operator[SEP] Keyword[short] operator[SEP] operator[SEP] identifier[getUInt] operator[SEP] identifier[b2] , Other[2] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[pcode] operator[==] Other[94] operator[||] Keyword[this] operator[SEP] identifier[pcode] operator[==] Other[99] operator[SEP] identifier[num_bin] operator[=] identifier[addBinSize] operator[SEP] identifier[num_bin] operator[SEP] operator[SEP] identifier[bos] operator[SEP] identifier[get] operator[SEP] identifier[b2] , Other[0] , Other[2] operator[SEP] operator[SEP] identifier[bos] operator[SEP] identifier[get] operator[SEP] identifier[b2] , Other[0] , Other[2] operator[SEP] operator[SEP] identifier[bos] operator[SEP] identifier[get] operator[SEP] identifier[b2] , Other[0] , Other[2] operator[SEP] operator[SEP] Keyword[short] identifier[radp_scale] operator[=] operator[SEP] Keyword[short] operator[SEP] identifier[getInt] operator[SEP] identifier[b2] , Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[pcode] operator[==] Other[134] operator[||] Keyword[this] operator[SEP] identifier[pcode] operator[==] Other[135] operator[SEP] identifier[radp_scale] operator[=] operator[SEP] Keyword[short] operator[SEP] operator[SEP] identifier[radp_scale] operator[*] Other[1000] operator[SEP] operator[SEP] identifier[bos] operator[SEP] identifier[get] operator[SEP] identifier[b2] , Other[0] , Other[2] operator[SEP] operator[SEP] Keyword[short] identifier[num_radials] operator[=] operator[SEP] Keyword[short] operator[SEP] identifier[getInt] operator[SEP] identifier[b2] , Other[2] operator[SEP] operator[SEP] identifier[soff] operator[=] Other[12] operator[SEP] identifier[hedsiz] operator[=] identifier[hedsiz] operator[+] identifier[soff] operator[SEP] identifier[numY0] operator[=] Other[0] operator[SEP] identifier[numY] operator[=] identifier[num_radials] operator[SEP] identifier[numX0] operator[=] identifier[first_bin] operator[SEP] identifier[numX] operator[=] identifier[num_bin] operator[SEP] Keyword[int] identifier[nlevel] operator[=] identifier[code_levelslookup] operator[SEP] identifier[pcode] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[levels] operator[SEP] identifier[ncfile] operator[SEP] identifier[addAttribute] operator[SEP] Other[null] , Keyword[new] identifier[Attribute] operator[SEP] literal[String] , identifier[FeatureType] operator[SEP] identifier[RADIAL] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Dimension] identifier[radialDim] operator[=] Keyword[new] identifier[Dimension] operator[SEP] literal[String] , identifier[num_radials] operator[SEP] operator[SEP] identifier[ncfile] operator[SEP] identifier[addDimension] operator[SEP] Other[null] , identifier[radialDim] operator[SEP] operator[SEP] identifier[Dimension] identifier[binDim] operator[=] Keyword[new] identifier[Dimension] operator[SEP] literal[String] , identifier[num_bin] operator[SEP] operator[SEP] identifier[ncfile] operator[SEP] identifier[addDimension] operator[SEP] Other[null] , identifier[binDim] operator[SEP] operator[SEP] identifier[dims] operator[SEP] identifier[add] operator[SEP] identifier[radialDim] operator[SEP] operator[SEP] identifier[dims] operator[SEP] identifier[add] operator[SEP] identifier[binDim] operator[SEP] operator[SEP] identifier[ArrayList] identifier[dims1] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] identifier[dims2] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[dims1] operator[SEP] identifier[add] operator[SEP] identifier[radialDim] operator[SEP] operator[SEP] identifier[dims2] operator[SEP] identifier[add] operator[SEP] identifier[binDim] operator[SEP] operator[SEP] identifier[isR] operator[=] literal[boolean] operator[SEP] identifier[String] identifier[vName] operator[=] literal[String] operator[SEP] identifier[String] identifier[lName] operator[=] literal[String] operator[SEP] identifier[Attribute] identifier[att] operator[=] Keyword[new] identifier[Attribute] operator[SEP] identifier[_Coordinate] operator[SEP] identifier[AxisType] , identifier[AxisType] operator[SEP] identifier[RadialElevation] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] identifier[vName] , identifier[lName] , identifier[ncfile] , identifier[dims1] , identifier[att] , identifier[DataType] operator[SEP] identifier[FLOAT] , literal[String] , identifier[hoff] , identifier[hedsiz] , identifier[isZ] , identifier[p3] operator[SEP] operator[SEP] identifier[vName] operator[=] literal[String] operator[SEP] identifier[lName] operator[=] literal[String] operator[SEP] identifier[att] operator[=] Keyword[new] identifier[Attribute] operator[SEP] identifier[_Coordinate] operator[SEP] identifier[AxisType] , identifier[AxisType] operator[SEP] identifier[RadialAzimuth] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] identifier[vName] , identifier[lName] , identifier[ncfile] , identifier[dims1] , identifier[att] , identifier[DataType] operator[SEP] identifier[FLOAT] , literal[String] , identifier[hoff] , identifier[hedsiz] , identifier[isZ] , Other[0] operator[SEP] operator[SEP] identifier[vName] operator[=] literal[String] operator[SEP] identifier[lName] operator[=] literal[String] operator[SEP] identifier[att] operator[=] Keyword[new] identifier[Attribute] operator[SEP] identifier[_Coordinate] operator[SEP] identifier[AxisType] , identifier[AxisType] operator[SEP] identifier[RadialDistance] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] identifier[vName] , identifier[lName] , identifier[ncfile] , identifier[dims2] , identifier[att] , identifier[DataType] operator[SEP] identifier[FLOAT] , literal[String] , identifier[hoff] , identifier[hedsiz] , identifier[isZ] , identifier[radp_scale] operator[SEP] operator[SEP] identifier[vName] operator[=] literal[String] operator[SEP] identifier[lName] operator[=] literal[String] operator[SEP] identifier[att] operator[=] Keyword[new] identifier[Attribute] operator[SEP] identifier[_Coordinate] operator[SEP] identifier[AxisType] , identifier[AxisType] operator[SEP] identifier[Lat] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] identifier[vName] , identifier[lName] , identifier[ncfile] , identifier[dims1] , identifier[att] , identifier[DataType] operator[SEP] identifier[FLOAT] , literal[String] , identifier[hoff] , identifier[hedsiz] , identifier[isZ] , Other[0] operator[SEP] operator[SEP] identifier[vName] operator[=] literal[String] operator[SEP] identifier[lName] operator[=] literal[String] operator[SEP] identifier[att] operator[=] Keyword[new] identifier[Attribute] operator[SEP] identifier[_Coordinate] operator[SEP] identifier[AxisType] , identifier[AxisType] operator[SEP] identifier[Lon] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] identifier[vName] , identifier[lName] , identifier[ncfile] , identifier[dims1] , identifier[att] , identifier[DataType] operator[SEP] identifier[FLOAT] , literal[String] , identifier[hoff] , identifier[hedsiz] , identifier[isZ] , Other[0] operator[SEP] operator[SEP] identifier[vName] operator[=] literal[String] operator[SEP] identifier[lName] operator[=] literal[String] operator[SEP] identifier[att] operator[=] Keyword[new] identifier[Attribute] operator[SEP] identifier[_Coordinate] operator[SEP] identifier[AxisType] , identifier[AxisType] operator[SEP] identifier[Height] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] identifier[vName] , identifier[lName] , identifier[ncfile] , identifier[dims1] , identifier[att] , identifier[DataType] operator[SEP] identifier[FLOAT] , literal[String] , identifier[hoff] , identifier[hedsiz] , identifier[isZ] , Other[0] operator[SEP] operator[SEP] identifier[vName] operator[=] literal[String] operator[SEP] identifier[lName] operator[=] literal[String] operator[SEP] identifier[att] operator[=] Keyword[new] identifier[Attribute] operator[SEP] identifier[_Coordinate] operator[SEP] identifier[AxisType] , identifier[AxisType] operator[SEP] identifier[Time] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] identifier[vName] , identifier[lName] , identifier[ncfile] , identifier[dims1] , identifier[att] , identifier[DataType] operator[SEP] identifier[DOUBLE] , literal[String] , identifier[hoff] , identifier[hedsiz] , identifier[isZ] , Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pcode] operator[==] Other[182] operator[||] identifier[pcode] operator[==] Other[99] operator[SEP] { identifier[levels] operator[=] identifier[getTDWRLevels] operator[SEP] identifier[nlevel] , identifier[threshold] operator[SEP] operator[SEP] identifier[iscale] operator[=] Other[10] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[pcode] operator[==] Other[186] operator[||] identifier[pcode] operator[==] Other[94] operator[SEP] { identifier[threshold] operator[SEP] Other[0] operator[SEP] operator[=] operator[-] Other[320] operator[SEP] identifier[threshold] operator[SEP] Other[1] operator[SEP] operator[=] Other[5] operator[SEP] identifier[threshold] operator[SEP] Other[2] operator[SEP] operator[=] Other[254] operator[SEP] identifier[levels] operator[=] identifier[getTDWRLevels] operator[SEP] identifier[nlevel] , identifier[threshold] operator[SEP] operator[SEP] identifier[iscale] operator[=] Other[10] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[pcode] operator[==] Other[32] operator[SEP] { identifier[levels] operator[=] identifier[getTDWRLevels1] operator[SEP] identifier[nlevel] , identifier[threshold] operator[SEP] operator[SEP] identifier[iscale] operator[=] Other[10] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[pcode] operator[==] Other[138] operator[SEP] { identifier[levels] operator[=] identifier[getTDWRLevels1] operator[SEP] identifier[nlevel] , identifier[threshold] operator[SEP] operator[SEP] identifier[iscale] operator[=] Other[100] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[pcode] operator[==] Other[134] operator[||] identifier[pcode] operator[==] Other[135] operator[SEP] { identifier[levels] operator[=] identifier[getTDWRLevels2] operator[SEP] identifier[nlevel] , identifier[threshold] operator[SEP] operator[SEP] identifier[iscale] operator[=] Other[1] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[pcode] operator[==] Other[159] operator[||] identifier[pcode] operator[==] Other[161] operator[||] identifier[pcode] operator[==] Other[163] operator[||] identifier[pcode] operator[==] Other[170] operator[||] identifier[pcode] operator[==] Other[172] operator[||] identifier[pcode] operator[==] Other[173] operator[||] identifier[pcode] operator[==] Other[174] operator[||] identifier[pcode] operator[==] Other[175] operator[||] identifier[pcode] operator[==] Other[165] operator[||] identifier[pcode] operator[==] Other[177] operator[SEP] { identifier[levels] operator[=] identifier[getDualpolLevels] operator[SEP] identifier[threshold] operator[SEP] operator[SEP] identifier[iscale] operator[=] Other[100] operator[SEP] } Keyword[else] { identifier[levels] operator[=] identifier[getLevels] operator[SEP] identifier[nlevel] , identifier[threshold] operator[SEP] operator[SEP] } identifier[Variable] identifier[v] operator[=] Keyword[new] identifier[Variable] operator[SEP] identifier[ncfile] , Other[null] , Other[null] , identifier[cname] operator[+] literal[String] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[setDataType] operator[SEP] identifier[DataType] operator[SEP] identifier[UBYTE] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[setDimensions] operator[SEP] identifier[dims] operator[SEP] operator[SEP] identifier[ncfile] operator[SEP] identifier[addVariable] operator[SEP] Other[null] , identifier[v] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[addAttribute] operator[SEP] Keyword[new] identifier[Attribute] operator[SEP] identifier[CDM] operator[SEP] identifier[UNITS] , identifier[cunit] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[coordinates] operator[=] literal[String] operator[SEP] identifier[v] operator[SEP] identifier[addAttribute] operator[SEP] Keyword[new] identifier[Attribute] operator[SEP] identifier[_Coordinate] operator[SEP] identifier[Axes] , identifier[coordinates] operator[SEP] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[setSPobject] operator[SEP] Keyword[new] identifier[Vinfo] operator[SEP] identifier[numX] , identifier[numX0] , identifier[numY] , identifier[numY0] , identifier[hoff] , identifier[hedsiz] , identifier[isR] , identifier[isZ] , Other[null] , identifier[levels] , Other[0] , identifier[nlevel] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[addVariable] operator[SEP] identifier[cname] , identifier[ctitle] , identifier[ncfile] , identifier[dims] , identifier[coordinates] , identifier[DataType] operator[SEP] identifier[FLOAT] , identifier[cunit] , identifier[hoff] , identifier[hedsiz] , identifier[isZ] , identifier[nlevel] , identifier[levels] , identifier[iscale] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[addVariable] operator[SEP] identifier[cname] , identifier[ctitle] , identifier[ncfile] , identifier[dims] , identifier[coordinates] , identifier[DataType] operator[SEP] identifier[FLOAT] , identifier[cunit] , identifier[hoff] , identifier[hedsiz] , identifier[isZ] , identifier[nlevel] , identifier[levels] , identifier[iscale] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[addVariable] operator[SEP] identifier[cname] , identifier[ctitle] , identifier[ncfile] , identifier[dims] , identifier[coordinates] , identifier[DataType] operator[SEP] identifier[FLOAT] , identifier[cunit] , identifier[hoff] , identifier[hedsiz] , identifier[isZ] , identifier[nlevel] , identifier[levels] , identifier[iscale] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[addVariable] operator[SEP] identifier[cname] , identifier[ctitle] , identifier[ncfile] , identifier[dims] , identifier[coordinates] , identifier[DataType] operator[SEP] identifier[FLOAT] , identifier[cunit] , identifier[hoff] , identifier[hedsiz] , identifier[isZ] , identifier[nlevel] , identifier[levels] , identifier[iscale] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[cname] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[addVariable] operator[SEP] identifier[cname] , identifier[ctitle] , identifier[ncfile] , identifier[dims] , identifier[coordinates] , identifier[DataType] operator[SEP] identifier[FLOAT] , identifier[cunit] , identifier[hoff] , identifier[hedsiz] , identifier[isZ] , identifier[nlevel] , identifier[levels] , identifier[iscale] operator[SEP] operator[SEP] } Keyword[return] identifier[soff] operator[SEP] }
protected static Set<String> newHashSet(String... strings) { final Set<String> set = new HashSet<>(strings.length); Collections.addAll(set, strings); return set; }
class class_name[name] begin[{] method[newHashSet, return_type[type[Set]], modifier[static protected], parameter[strings]] begin[{] local_variable[type[Set], set] call[Collections.addAll, parameter[member[.set], member[.strings]]] return[member[.set]] end[}] END[}]
Keyword[protected] Keyword[static] identifier[Set] operator[<] identifier[String] operator[>] identifier[newHashSet] operator[SEP] identifier[String] operator[...] identifier[strings] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[set] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] identifier[strings] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[addAll] operator[SEP] identifier[set] , identifier[strings] operator[SEP] operator[SEP] Keyword[return] identifier[set] operator[SEP] }
public void append(byte[] data, int len) { if (data == null || len <= 0 || len > data.length) { throw new IllegalArgumentException("Invalid combination of parameters data and length to append()"); } int oldLimit = buffer.limit(); // grow buffer if necessary grow(len); // set positing to begin writing immediately after the last byte of the current buffer buffer.position(oldLimit); // set the buffer limit to exactly the old size plus the new appendix length buffer.limit(oldLimit + len); // append data buffer.put(data, 0, len); }
class class_name[name] begin[{] method[append, return_type[void], modifier[public], parameter[data, len]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.data], ==, literal[null]], ||, binary_operation[member[.len], <=, literal[0]]], ||, binary_operation[member[.len], >, member[data.length]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid combination of parameters data and length to append()")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], oldLimit] call[.grow, parameter[member[.len]]] call[buffer.position, parameter[member[.oldLimit]]] call[buffer.limit, parameter[binary_operation[member[.oldLimit], +, member[.len]]]] call[buffer.put, parameter[member[.data], literal[0], member[.len]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[append] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[len] operator[SEP] { Keyword[if] operator[SEP] identifier[data] operator[==] Other[null] operator[||] identifier[len] operator[<=] Other[0] operator[||] identifier[len] operator[>] identifier[data] operator[SEP] identifier[length] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[int] identifier[oldLimit] operator[=] identifier[buffer] operator[SEP] identifier[limit] operator[SEP] operator[SEP] operator[SEP] identifier[grow] operator[SEP] identifier[len] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[position] operator[SEP] identifier[oldLimit] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[limit] operator[SEP] identifier[oldLimit] operator[+] identifier[len] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[data] , Other[0] , identifier[len] operator[SEP] operator[SEP] }
public void open(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask) throws IOException { super.open(raf, ncfile, cancelTask); mySweep = new DoradeSweep(raf.getRandomAccessFile()); headerParser = new Doradeheader(); headerParser.read(mySweep, ncfile, null); ncfile.finish(); }
class class_name[name] begin[{] method[open, return_type[void], modifier[public], parameter[raf, ncfile, cancelTask]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=raf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ncfile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cancelTask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=open, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) assign[member[.mySweep], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getRandomAccessFile, postfix_operators=[], prefix_operators=[], qualifier=raf, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DoradeSweep, sub_type=None))] assign[member[.headerParser], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Doradeheader, sub_type=None))] call[headerParser.read, parameter[member[.mySweep], member[.ncfile], literal[null]]] call[ncfile.finish, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[open] operator[SEP] identifier[ucar] operator[SEP] identifier[unidata] operator[SEP] identifier[io] operator[SEP] identifier[RandomAccessFile] identifier[raf] , identifier[ucar] operator[SEP] identifier[nc2] operator[SEP] identifier[NetcdfFile] identifier[ncfile] , identifier[ucar] operator[SEP] identifier[nc2] operator[SEP] identifier[util] operator[SEP] identifier[CancelTask] identifier[cancelTask] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[super] operator[SEP] identifier[open] operator[SEP] identifier[raf] , identifier[ncfile] , identifier[cancelTask] operator[SEP] operator[SEP] identifier[mySweep] operator[=] Keyword[new] identifier[DoradeSweep] operator[SEP] identifier[raf] operator[SEP] identifier[getRandomAccessFile] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[headerParser] operator[=] Keyword[new] identifier[Doradeheader] operator[SEP] operator[SEP] operator[SEP] identifier[headerParser] operator[SEP] identifier[read] operator[SEP] identifier[mySweep] , identifier[ncfile] , Other[null] operator[SEP] operator[SEP] identifier[ncfile] operator[SEP] identifier[finish] operator[SEP] operator[SEP] operator[SEP] }
private void visit_OP_UPDATE_MASTER_KEY() throws IOException { visitTxId(); v.visitVInt( EditsElement.KEY_ID); v.visitVLong( EditsElement.KEY_EXPIRY_DATE); VIntToken blobLengthToken = v.visitVInt(EditsElement.KEY_LENGTH); v.visitBlob(EditsElement.KEY_BLOB, blobLengthToken.value); }
class class_name[name] begin[{] method[visit_OP_UPDATE_MASTER_KEY, return_type[void], modifier[private], parameter[]] begin[{] call[.visitTxId, parameter[]] call[v.visitVInt, parameter[member[EditsElement.KEY_ID]]] call[v.visitVLong, parameter[member[EditsElement.KEY_EXPIRY_DATE]]] local_variable[type[VIntToken], blobLengthToken] call[v.visitBlob, parameter[member[EditsElement.KEY_BLOB], member[blobLengthToken.value]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[visit_OP_UPDATE_MASTER_KEY] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[visitTxId] operator[SEP] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[visitVInt] operator[SEP] identifier[EditsElement] operator[SEP] identifier[KEY_ID] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[visitVLong] operator[SEP] identifier[EditsElement] operator[SEP] identifier[KEY_EXPIRY_DATE] operator[SEP] operator[SEP] identifier[VIntToken] identifier[blobLengthToken] operator[=] identifier[v] operator[SEP] identifier[visitVInt] operator[SEP] identifier[EditsElement] operator[SEP] identifier[KEY_LENGTH] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[visitBlob] operator[SEP] identifier[EditsElement] operator[SEP] identifier[KEY_BLOB] , identifier[blobLengthToken] operator[SEP] identifier[value] operator[SEP] operator[SEP] }
private RawGcsCreationToken put(final GcsRestCreationToken token, ByteBuffer chunk, final boolean isFinalChunk, long timeoutMillis) throws IOException { final int length = chunk.remaining(); HTTPRequest req = createPutRequest(token, chunk, isFinalChunk, timeoutMillis, length); HTTPRequestInfo info = new HTTPRequestInfo(req); HTTPResponse response; try { response = urlfetch.fetch(req); } catch (IOException e) { throw createIOException(info, e); } return handlePutResponse(token, isFinalChunk, length, info, response); }
class class_name[name] begin[{] method[put, return_type[type[RawGcsCreationToken]], modifier[private], parameter[token, chunk, isFinalChunk, timeoutMillis]] begin[{] local_variable[type[int], length] local_variable[type[HTTPRequest], req] local_variable[type[HTTPRequestInfo], info] local_variable[type[HTTPResponse], response] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=req, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fetch, postfix_operators=[], prefix_operators=[], qualifier=urlfetch, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=info, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createIOException, postfix_operators=[], prefix_operators=[], qualifier=, 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) return[call[.handlePutResponse, parameter[member[.token], member[.isFinalChunk], member[.length], member[.info], member[.response]]]] end[}] END[}]
Keyword[private] identifier[RawGcsCreationToken] identifier[put] operator[SEP] Keyword[final] identifier[GcsRestCreationToken] identifier[token] , identifier[ByteBuffer] identifier[chunk] , Keyword[final] Keyword[boolean] identifier[isFinalChunk] , Keyword[long] identifier[timeoutMillis] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] Keyword[int] identifier[length] operator[=] identifier[chunk] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[SEP] identifier[HTTPRequest] identifier[req] operator[=] identifier[createPutRequest] operator[SEP] identifier[token] , identifier[chunk] , identifier[isFinalChunk] , identifier[timeoutMillis] , identifier[length] operator[SEP] operator[SEP] identifier[HTTPRequestInfo] identifier[info] operator[=] Keyword[new] identifier[HTTPRequestInfo] operator[SEP] identifier[req] operator[SEP] operator[SEP] identifier[HTTPResponse] identifier[response] operator[SEP] Keyword[try] { identifier[response] operator[=] identifier[urlfetch] operator[SEP] identifier[fetch] operator[SEP] identifier[req] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] identifier[createIOException] operator[SEP] identifier[info] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[handlePutResponse] operator[SEP] identifier[token] , identifier[isFinalChunk] , identifier[length] , identifier[info] , identifier[response] operator[SEP] operator[SEP] }
public void bootstrap() throws Exception { final HostRunningModeControl runningModeControl = environment.getRunningModeControl(); final ControlledProcessState processState = new ControlledProcessState(true); shutdownHook.setControlledProcessState(processState); ServiceTarget target = serviceContainer.subTarget(); ControlledProcessStateService controlledProcessStateService = ControlledProcessStateService.addService(target, processState).getValue(); RunningStateJmx.registerMBean(controlledProcessStateService, null, runningModeControl, false); final HostControllerService hcs = new HostControllerService(environment, runningModeControl, authCode, processState); target.addService(HostControllerService.HC_SERVICE_NAME, hcs).install(); }
class class_name[name] begin[{] method[bootstrap, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[HostRunningModeControl], runningModeControl] local_variable[type[ControlledProcessState], processState] call[shutdownHook.setControlledProcessState, parameter[member[.processState]]] local_variable[type[ServiceTarget], target] local_variable[type[ControlledProcessStateService], controlledProcessStateService] call[RunningStateJmx.registerMBean, parameter[member[.controlledProcessStateService], literal[null], member[.runningModeControl], literal[false]]] local_variable[type[HostControllerService], hcs] call[target.addService, parameter[member[HostControllerService.HC_SERVICE_NAME], member[.hcs]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[bootstrap] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[final] identifier[HostRunningModeControl] identifier[runningModeControl] operator[=] identifier[environment] operator[SEP] identifier[getRunningModeControl] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ControlledProcessState] identifier[processState] operator[=] Keyword[new] identifier[ControlledProcessState] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[shutdownHook] operator[SEP] identifier[setControlledProcessState] operator[SEP] identifier[processState] operator[SEP] operator[SEP] identifier[ServiceTarget] identifier[target] operator[=] identifier[serviceContainer] operator[SEP] identifier[subTarget] operator[SEP] operator[SEP] operator[SEP] identifier[ControlledProcessStateService] identifier[controlledProcessStateService] operator[=] identifier[ControlledProcessStateService] operator[SEP] identifier[addService] operator[SEP] identifier[target] , identifier[processState] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[RunningStateJmx] operator[SEP] identifier[registerMBean] operator[SEP] identifier[controlledProcessStateService] , Other[null] , identifier[runningModeControl] , literal[boolean] operator[SEP] operator[SEP] Keyword[final] identifier[HostControllerService] identifier[hcs] operator[=] Keyword[new] identifier[HostControllerService] operator[SEP] identifier[environment] , identifier[runningModeControl] , identifier[authCode] , identifier[processState] operator[SEP] operator[SEP] identifier[target] operator[SEP] identifier[addService] operator[SEP] identifier[HostControllerService] operator[SEP] identifier[HC_SERVICE_NAME] , identifier[hcs] operator[SEP] operator[SEP] identifier[install] operator[SEP] operator[SEP] operator[SEP] }
public String extractToString(final String separator, final String endSeparator) throws DevFailed { logger.debug(LOG_EXTRACTING, this); return attributeImpl.extractToString(separator, endSeparator); }
class class_name[name] begin[{] method[extractToString, return_type[type[String]], modifier[public], parameter[separator, endSeparator]] begin[{] call[logger.debug, parameter[member[.LOG_EXTRACTING], THIS[]]] return[call[attributeImpl.extractToString, parameter[member[.separator], member[.endSeparator]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[extractToString] operator[SEP] Keyword[final] identifier[String] identifier[separator] , Keyword[final] identifier[String] identifier[endSeparator] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[LOG_EXTRACTING] , Keyword[this] operator[SEP] operator[SEP] Keyword[return] identifier[attributeImpl] operator[SEP] identifier[extractToString] operator[SEP] identifier[separator] , identifier[endSeparator] operator[SEP] operator[SEP] }
public static DMatrixRMaj insideSpan(DMatrixRMaj[] span , double min , double max , Random rand ) { DMatrixRMaj A = new DMatrixRMaj(span.length,1); DMatrixRMaj B = new DMatrixRMaj(span[0].getNumElements(),1); for( int i = 0; i < span.length; i++ ) { B.set(span[i]); double val = rand.nextDouble()*(max-min)+min; CommonOps_DDRM.scale(val,B); CommonOps_DDRM.add(A,B,A); } return A; }
class class_name[name] begin[{] method[insideSpan, return_type[type[DMatrixRMaj]], modifier[public static], parameter[span, min, max, rand]] begin[{] local_variable[type[DMatrixRMaj], A] local_variable[type[DMatrixRMaj], B] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=span, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=set, postfix_operators=[], prefix_operators=[], qualifier=B, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=nextDouble, postfix_operators=[], prefix_operators=[], qualifier=rand, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=*), operandr=MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=val)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=B, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=scale, postfix_operators=[], prefix_operators=[], qualifier=CommonOps_DDRM, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=A, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=B, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=A, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=CommonOps_DDRM, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=span, 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[.A]] end[}] END[}]
Keyword[public] Keyword[static] identifier[DMatrixRMaj] identifier[insideSpan] operator[SEP] identifier[DMatrixRMaj] operator[SEP] operator[SEP] identifier[span] , Keyword[double] identifier[min] , Keyword[double] identifier[max] , identifier[Random] identifier[rand] operator[SEP] { identifier[DMatrixRMaj] identifier[A] operator[=] Keyword[new] identifier[DMatrixRMaj] operator[SEP] identifier[span] operator[SEP] identifier[length] , Other[1] operator[SEP] operator[SEP] identifier[DMatrixRMaj] identifier[B] operator[=] Keyword[new] identifier[DMatrixRMaj] operator[SEP] identifier[span] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getNumElements] operator[SEP] operator[SEP] , Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[span] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[B] operator[SEP] identifier[set] operator[SEP] identifier[span] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[val] operator[=] identifier[rand] operator[SEP] identifier[nextDouble] operator[SEP] operator[SEP] operator[*] operator[SEP] identifier[max] operator[-] identifier[min] operator[SEP] operator[+] identifier[min] operator[SEP] identifier[CommonOps_DDRM] operator[SEP] identifier[scale] operator[SEP] identifier[val] , identifier[B] operator[SEP] operator[SEP] identifier[CommonOps_DDRM] operator[SEP] identifier[add] operator[SEP] identifier[A] , identifier[B] , identifier[A] operator[SEP] operator[SEP] } Keyword[return] identifier[A] operator[SEP] }
public static PointsToPolyline create( @Nonnull ConfigPolyline config ) { if( config instanceof ConfigSplitMergeLineFit ) { return splitMerge((ConfigSplitMergeLineFit)config); } else if( config instanceof ConfigPolylineSplitMerge ) { return splitMerge((ConfigPolylineSplitMerge)config); } else { throw new RuntimeException("Unknown"); } }
class class_name[name] begin[{] method[create, return_type[type[PointsToPolyline]], modifier[public static], parameter[config]] begin[{] if[binary_operation[member[.config], instanceof, type[ConfigSplitMergeLineFit]]] begin[{] return[call[.splitMerge, parameter[Cast(expression=MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ConfigSplitMergeLineFit, sub_type=None))]]] else begin[{] if[binary_operation[member[.config], instanceof, type[ConfigPolylineSplitMerge]]] begin[{] return[call[.splitMerge, parameter[Cast(expression=MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ConfigPolylineSplitMerge, sub_type=None))]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown")], 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) end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[PointsToPolyline] identifier[create] operator[SEP] annotation[@] identifier[Nonnull] identifier[ConfigPolyline] identifier[config] operator[SEP] { Keyword[if] operator[SEP] identifier[config] Keyword[instanceof] identifier[ConfigSplitMergeLineFit] operator[SEP] { Keyword[return] identifier[splitMerge] operator[SEP] operator[SEP] identifier[ConfigSplitMergeLineFit] operator[SEP] identifier[config] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[config] Keyword[instanceof] identifier[ConfigPolylineSplitMerge] operator[SEP] { Keyword[return] identifier[splitMerge] operator[SEP] operator[SEP] identifier[ConfigPolylineSplitMerge] operator[SEP] identifier[config] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
DownloadCache createCache(@NonNull BreakpointInfo info) { final MultiPointOutputStream outputStream = OkDownload.with().processFileStrategy() .createProcessStream(task, info, store); return new DownloadCache(outputStream); }
class class_name[name] begin[{] method[createCache, return_type[type[DownloadCache]], modifier[default], parameter[info]] begin[{] local_variable[type[MultiPointOutputStream], outputStream] return[ClassCreator(arguments=[MemberReference(member=outputStream, 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=DownloadCache, sub_type=None))] end[}] END[}]
identifier[DownloadCache] identifier[createCache] operator[SEP] annotation[@] identifier[NonNull] identifier[BreakpointInfo] identifier[info] operator[SEP] { Keyword[final] identifier[MultiPointOutputStream] identifier[outputStream] operator[=] identifier[OkDownload] operator[SEP] identifier[with] operator[SEP] operator[SEP] operator[SEP] identifier[processFileStrategy] operator[SEP] operator[SEP] operator[SEP] identifier[createProcessStream] operator[SEP] identifier[task] , identifier[info] , identifier[store] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[DownloadCache] operator[SEP] identifier[outputStream] operator[SEP] operator[SEP] }