code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private boolean isSymbolAQuotedObjectKey(Symbol symbol) { Node node = symbol.getDeclarationNode(); return node != null && node.isStringKey() && node.isQuotedString(); }
class class_name[name] begin[{] method[isSymbolAQuotedObjectKey, return_type[type[boolean]], modifier[private], parameter[symbol]] begin[{] local_variable[type[Node], node] return[binary_operation[binary_operation[binary_operation[member[.node], !=, literal[null]], &&, call[node.isStringKey, parameter[]]], &&, call[node.isQuotedString, parameter[]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isSymbolAQuotedObjectKey] operator[SEP] identifier[Symbol] identifier[symbol] operator[SEP] { identifier[Node] identifier[node] operator[=] identifier[symbol] operator[SEP] identifier[getDeclarationNode] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[node] operator[!=] Other[null] operator[&&] identifier[node] operator[SEP] identifier[isStringKey] operator[SEP] operator[SEP] operator[&&] identifier[node] operator[SEP] identifier[isQuotedString] operator[SEP] operator[SEP] operator[SEP] }
public EClass getIfcRampFlightType() { if (ifcRampFlightTypeEClass == null) { ifcRampFlightTypeEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(424); } return ifcRampFlightTypeEClass; }
class class_name[name] begin[{] method[getIfcRampFlightType, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcRampFlightTypeEClass], ==, literal[null]]] begin[{] assign[member[.ifcRampFlightTypeEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package, 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=424)], 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[.ifcRampFlightTypeEClass]] end[}] END[}]
Keyword[public] identifier[EClass] identifier[getIfcRampFlightType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcRampFlightTypeEClass] operator[==] Other[null] operator[SEP] { identifier[ifcRampFlightTypeEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[424] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcRampFlightTypeEClass] operator[SEP] }
@SuppressWarnings("unchecked") public static int compare(Object o1, Object o2) { if (o1 == null && o2 == null) { return 0; } else if (o1 == null) { return 1; } else if (o2 == null) { return -1; } return Cast.<Comparable>as(o1).compareTo(o2); }
class class_name[name] begin[{] method[compare, return_type[type[int]], modifier[public static], parameter[o1, o2]] begin[{] if[binary_operation[binary_operation[member[.o1], ==, literal[null]], &&, binary_operation[member[.o2], ==, literal[null]]]] begin[{] return[literal[0]] else begin[{] if[binary_operation[member[.o1], ==, literal[null]]] begin[{] return[literal[1]] else begin[{] if[binary_operation[member[.o2], ==, literal[null]]] begin[{] return[literal[1]] else begin[{] None end[}] end[}] end[}] return[call[.Cast, parameter[member[.o1]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[int] identifier[compare] operator[SEP] identifier[Object] identifier[o1] , identifier[Object] identifier[o2] operator[SEP] { Keyword[if] operator[SEP] identifier[o1] operator[==] Other[null] operator[&&] identifier[o2] operator[==] Other[null] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[o1] operator[==] Other[null] operator[SEP] { Keyword[return] Other[1] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[o2] operator[==] Other[null] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[return] identifier[Cast] operator[SEP] operator[<] identifier[Comparable] operator[>] identifier[as] operator[SEP] identifier[o1] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[o2] operator[SEP] operator[SEP] }
public static GribCollectionProto.GribAxisType convertAxisType(Coordinate.Type type) { switch (type) { case runtime: return GribCollectionProto.GribAxisType.runtime; case time: return GribCollectionProto.GribAxisType.time; case time2D: return GribCollectionProto.GribAxisType.time2D; case timeIntv: return GribCollectionProto.GribAxisType.timeIntv; case ens: return GribCollectionProto.GribAxisType.ens; case vert: return GribCollectionProto.GribAxisType.vert; } throw new IllegalStateException("illegal axis type " + type); }
class class_name[name] begin[{] method[convertAxisType, return_type[type[GribCollectionProto]], modifier[public static], parameter[type]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['runtime'], statements=[ReturnStatement(expression=MemberReference(member=runtime, postfix_operators=[], prefix_operators=[], qualifier=GribCollectionProto.GribAxisType, selectors=[]), label=None)]), SwitchStatementCase(case=['time'], statements=[ReturnStatement(expression=MemberReference(member=time, postfix_operators=[], prefix_operators=[], qualifier=GribCollectionProto.GribAxisType, selectors=[]), label=None)]), SwitchStatementCase(case=['time2D'], statements=[ReturnStatement(expression=MemberReference(member=time2D, postfix_operators=[], prefix_operators=[], qualifier=GribCollectionProto.GribAxisType, selectors=[]), label=None)]), SwitchStatementCase(case=['timeIntv'], statements=[ReturnStatement(expression=MemberReference(member=timeIntv, postfix_operators=[], prefix_operators=[], qualifier=GribCollectionProto.GribAxisType, selectors=[]), label=None)]), SwitchStatementCase(case=['ens'], statements=[ReturnStatement(expression=MemberReference(member=ens, postfix_operators=[], prefix_operators=[], qualifier=GribCollectionProto.GribAxisType, selectors=[]), label=None)]), SwitchStatementCase(case=['vert'], statements=[ReturnStatement(expression=MemberReference(member=vert, postfix_operators=[], prefix_operators=[], qualifier=GribCollectionProto.GribAxisType, selectors=[]), label=None)])], expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="illegal axis type "), operandr=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[GribCollectionProto] operator[SEP] identifier[GribAxisType] identifier[convertAxisType] operator[SEP] identifier[Coordinate] operator[SEP] identifier[Type] identifier[type] operator[SEP] { Keyword[switch] operator[SEP] identifier[type] operator[SEP] { Keyword[case] identifier[runtime] operator[:] Keyword[return] identifier[GribCollectionProto] operator[SEP] identifier[GribAxisType] operator[SEP] identifier[runtime] operator[SEP] Keyword[case] identifier[time] operator[:] Keyword[return] identifier[GribCollectionProto] operator[SEP] identifier[GribAxisType] operator[SEP] identifier[time] operator[SEP] Keyword[case] identifier[time2D] operator[:] Keyword[return] identifier[GribCollectionProto] operator[SEP] identifier[GribAxisType] operator[SEP] identifier[time2D] operator[SEP] Keyword[case] identifier[timeIntv] operator[:] Keyword[return] identifier[GribCollectionProto] operator[SEP] identifier[GribAxisType] operator[SEP] identifier[timeIntv] operator[SEP] Keyword[case] identifier[ens] operator[:] Keyword[return] identifier[GribCollectionProto] operator[SEP] identifier[GribAxisType] operator[SEP] identifier[ens] operator[SEP] Keyword[case] identifier[vert] operator[:] Keyword[return] identifier[GribCollectionProto] operator[SEP] identifier[GribAxisType] operator[SEP] identifier[vert] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[type] operator[SEP] operator[SEP] }
static synchronized public void setGlobalConnectionTimeout(int timeout) { if(timeout >= 0) { globalsettings.put(Prop.CONN_TIMEOUT, (Integer) timeout); globalsettings.put(Prop.CONN_REQ_TIMEOUT, (Integer) timeout); } }
class class_name[name] begin[{] method[setGlobalConnectionTimeout, return_type[void], modifier[synchronized public static], parameter[timeout]] begin[{] if[binary_operation[member[.timeout], >=, literal[0]]] begin[{] call[globalsettings.put, parameter[member[Prop.CONN_TIMEOUT], Cast(expression=MemberReference(member=timeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))]] call[globalsettings.put, parameter[member[Prop.CONN_REQ_TIMEOUT], Cast(expression=MemberReference(member=timeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[static] Keyword[synchronized] Keyword[public] Keyword[void] identifier[setGlobalConnectionTimeout] operator[SEP] Keyword[int] identifier[timeout] operator[SEP] { Keyword[if] operator[SEP] identifier[timeout] operator[>=] Other[0] operator[SEP] { identifier[globalsettings] operator[SEP] identifier[put] operator[SEP] identifier[Prop] operator[SEP] identifier[CONN_TIMEOUT] , operator[SEP] identifier[Integer] operator[SEP] identifier[timeout] operator[SEP] operator[SEP] identifier[globalsettings] operator[SEP] identifier[put] operator[SEP] identifier[Prop] operator[SEP] identifier[CONN_REQ_TIMEOUT] , operator[SEP] identifier[Integer] operator[SEP] identifier[timeout] operator[SEP] operator[SEP] } }
public static Optional<Element> getChildElement(final Element elem, final String ns, final String name) { final NodeList children = elem.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { final Node child = children.item(i); if (child.getNodeType() == Node.ELEMENT_NODE) { if (Objects.equals(child.getNamespaceURI(), ns) && name.equals(child.getLocalName())) { return Optional.of((Element) child); } } } return Optional.empty(); }
class class_name[name] begin[{] method[getChildElement, return_type[type[Optional]], modifier[public static], parameter[elem, ns, name]] begin[{] local_variable[type[NodeList], children] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=item, postfix_operators=[], prefix_operators=[], qualifier=children, selectors=[], type_arguments=None), name=child)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNodeType, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None), operandr=MemberReference(member=ELEMENT_NODE, postfix_operators=[], prefix_operators=[], qualifier=Node, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNamespaceURI, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None), MemberReference(member=ns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=Objects, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalName, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None))], member=of, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=children, 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[call[Optional.empty, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Optional] operator[<] identifier[Element] operator[>] identifier[getChildElement] operator[SEP] Keyword[final] identifier[Element] identifier[elem] , Keyword[final] identifier[String] identifier[ns] , Keyword[final] identifier[String] identifier[name] operator[SEP] { Keyword[final] identifier[NodeList] identifier[children] operator[=] identifier[elem] operator[SEP] identifier[getChildNodes] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[children] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] identifier[Node] identifier[child] operator[=] identifier[children] operator[SEP] identifier[item] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[child] operator[SEP] identifier[getNodeType] operator[SEP] operator[SEP] operator[==] identifier[Node] operator[SEP] identifier[ELEMENT_NODE] operator[SEP] { Keyword[if] operator[SEP] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[child] operator[SEP] identifier[getNamespaceURI] operator[SEP] operator[SEP] , identifier[ns] operator[SEP] operator[&&] identifier[name] operator[SEP] identifier[equals] operator[SEP] identifier[child] operator[SEP] identifier[getLocalName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] operator[SEP] identifier[Element] operator[SEP] identifier[child] operator[SEP] operator[SEP] } } } Keyword[return] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] }
public static RowRanges calculateRowRanges(FilterCompat.Filter filter, ColumnIndexStore columnIndexStore, Set<ColumnPath> paths, long rowCount) { return filter.accept(new FilterCompat.Visitor<RowRanges>() { @Override public RowRanges visit(FilterPredicateCompat filterPredicateCompat) { try { return filterPredicateCompat.getFilterPredicate() .accept(new ColumnIndexFilter(columnIndexStore, paths, rowCount)); } catch (MissingOffsetIndexException e) { LOGGER.info(e.getMessage()); return RowRanges.createSingle(rowCount); } } @Override public RowRanges visit(UnboundRecordFilterCompat unboundRecordFilterCompat) { return RowRanges.createSingle(rowCount); } @Override public RowRanges visit(NoOpFilter noOpFilter) { return RowRanges.createSingle(rowCount); } }); }
class class_name[name] begin[{] method[calculateRowRanges, return_type[type[RowRanges]], modifier[public static], parameter[filter, columnIndexStore, paths, rowCount]] begin[{] return[call[filter.accept, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getFilterPredicate, postfix_operators=[], prefix_operators=[], qualifier=filterPredicateCompat, selectors=[MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=columnIndexStore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=paths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rowCount, 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=ColumnIndexFilter, sub_type=None))], member=accept, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=rowCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createSingle, postfix_operators=[], prefix_operators=[], qualifier=RowRanges, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MissingOffsetIndexException']))], finally_block=None, label=None, resources=None)], documentation=None, modifiers={'public'}, name=visit, parameters=[FormalParameter(annotations=[], modifiers=set(), name=filterPredicateCompat, type=ReferenceType(arguments=None, dimensions=[], name=FilterPredicateCompat, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=RowRanges, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=rowCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createSingle, postfix_operators=[], prefix_operators=[], qualifier=RowRanges, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=visit, parameters=[FormalParameter(annotations=[], modifiers=set(), name=unboundRecordFilterCompat, type=ReferenceType(arguments=None, dimensions=[], name=UnboundRecordFilterCompat, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=RowRanges, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=rowCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createSingle, postfix_operators=[], prefix_operators=[], qualifier=RowRanges, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=visit, parameters=[FormalParameter(annotations=[], modifiers=set(), name=noOpFilter, type=ReferenceType(arguments=None, dimensions=[], name=NoOpFilter, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=RowRanges, sub_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=FilterCompat, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=RowRanges, sub_type=None))], dimensions=None, name=Visitor, sub_type=None)))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[RowRanges] identifier[calculateRowRanges] operator[SEP] identifier[FilterCompat] operator[SEP] identifier[Filter] identifier[filter] , identifier[ColumnIndexStore] identifier[columnIndexStore] , identifier[Set] operator[<] identifier[ColumnPath] operator[>] identifier[paths] , Keyword[long] identifier[rowCount] operator[SEP] { Keyword[return] identifier[filter] operator[SEP] identifier[accept] operator[SEP] Keyword[new] identifier[FilterCompat] operator[SEP] identifier[Visitor] operator[<] identifier[RowRanges] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[RowRanges] identifier[visit] operator[SEP] identifier[FilterPredicateCompat] identifier[filterPredicateCompat] operator[SEP] { Keyword[try] { Keyword[return] identifier[filterPredicateCompat] operator[SEP] identifier[getFilterPredicate] operator[SEP] operator[SEP] operator[SEP] identifier[accept] operator[SEP] Keyword[new] identifier[ColumnIndexFilter] operator[SEP] identifier[columnIndexStore] , identifier[paths] , identifier[rowCount] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MissingOffsetIndexException] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[RowRanges] operator[SEP] identifier[createSingle] operator[SEP] identifier[rowCount] operator[SEP] operator[SEP] } } annotation[@] identifier[Override] Keyword[public] identifier[RowRanges] identifier[visit] operator[SEP] identifier[UnboundRecordFilterCompat] identifier[unboundRecordFilterCompat] operator[SEP] { Keyword[return] identifier[RowRanges] operator[SEP] identifier[createSingle] operator[SEP] identifier[rowCount] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[RowRanges] identifier[visit] operator[SEP] identifier[NoOpFilter] identifier[noOpFilter] operator[SEP] { Keyword[return] identifier[RowRanges] operator[SEP] identifier[createSingle] operator[SEP] identifier[rowCount] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public void displayDialog() throws Exception { Map<String, String[]> params = initAdminTool(); // explorer view dialogs if (CmsExplorerDialog.EXPLORER_TOOLS.contains(getCurrentToolPath())) { if (getAction() == CmsDialog.ACTION_CANCEL) { actionCloseDialog(); return; } getToolManager().jspForwardPage(this, CmsToolManager.ADMINVIEW_ROOT_LOCATION + "/tool-fs.jsp", params); return; } // real tool if (!getAdminTool().getHandler().getLink().equals(getCms().getRequestContext().getUri())) { getToolManager().jspForwardPage(this, getAdminTool().getHandler().getLink(), params); return; } // just grouping if (getAction() == CmsDialog.ACTION_CANCEL) { actionCloseDialog(); return; } JspWriter out = getJsp().getJspContext().getOut(); out.print(htmlStart()); out.print(bodyStart(null)); out.print(dialogStart()); out.print(dialogContentStart(getParamTitle())); out.print(dialogContentEnd()); out.print(dialogEnd()); out.print(bodyEnd()); out.print(htmlEnd()); }
class class_name[name] begin[{] method[displayDialog, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[Map], params] if[call[CmsExplorerDialog.EXPLORER_TOOLS.contains, parameter[call[.getCurrentToolPath, parameter[]]]]] begin[{] if[binary_operation[call[.getAction, parameter[]], ==, member[CmsDialog.ACTION_CANCEL]]] begin[{] call[.actionCloseDialog, parameter[]] return[None] else begin[{] None end[}] call[.getToolManager, parameter[]] return[None] else begin[{] None end[}] if[call[.getAdminTool, parameter[]]] begin[{] call[.getToolManager, parameter[]] return[None] else begin[{] None end[}] if[binary_operation[call[.getAction, parameter[]], ==, member[CmsDialog.ACTION_CANCEL]]] begin[{] call[.actionCloseDialog, parameter[]] return[None] else begin[{] None end[}] local_variable[type[JspWriter], out] call[out.print, parameter[call[.htmlStart, parameter[]]]] call[out.print, parameter[call[.bodyStart, parameter[literal[null]]]]] call[out.print, parameter[call[.dialogStart, parameter[]]]] call[out.print, parameter[call[.dialogContentStart, parameter[call[.getParamTitle, parameter[]]]]]] call[out.print, parameter[call[.dialogContentEnd, parameter[]]]] call[out.print, parameter[call[.dialogEnd, parameter[]]]] call[out.print, parameter[call[.bodyEnd, parameter[]]]] call[out.print, parameter[call[.htmlEnd, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[displayDialog] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[SEP] operator[SEP] operator[>] identifier[params] operator[=] identifier[initAdminTool] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[CmsExplorerDialog] operator[SEP] identifier[EXPLORER_TOOLS] operator[SEP] identifier[contains] operator[SEP] identifier[getCurrentToolPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[getAction] operator[SEP] operator[SEP] operator[==] identifier[CmsDialog] operator[SEP] identifier[ACTION_CANCEL] operator[SEP] { identifier[actionCloseDialog] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[getToolManager] operator[SEP] operator[SEP] operator[SEP] identifier[jspForwardPage] operator[SEP] Keyword[this] , identifier[CmsToolManager] operator[SEP] identifier[ADMINVIEW_ROOT_LOCATION] operator[+] literal[String] , identifier[params] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[getAdminTool] operator[SEP] operator[SEP] operator[SEP] identifier[getHandler] operator[SEP] operator[SEP] operator[SEP] identifier[getLink] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[getCms] operator[SEP] operator[SEP] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[getUri] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[getToolManager] operator[SEP] operator[SEP] operator[SEP] identifier[jspForwardPage] operator[SEP] Keyword[this] , identifier[getAdminTool] operator[SEP] operator[SEP] operator[SEP] identifier[getHandler] operator[SEP] operator[SEP] operator[SEP] identifier[getLink] operator[SEP] operator[SEP] , identifier[params] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[getAction] operator[SEP] operator[SEP] operator[==] identifier[CmsDialog] operator[SEP] identifier[ACTION_CANCEL] operator[SEP] { identifier[actionCloseDialog] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[JspWriter] identifier[out] operator[=] identifier[getJsp] operator[SEP] operator[SEP] operator[SEP] identifier[getJspContext] operator[SEP] operator[SEP] operator[SEP] identifier[getOut] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[htmlStart] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[bodyStart] operator[SEP] Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[dialogStart] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[dialogContentStart] operator[SEP] identifier[getParamTitle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[dialogContentEnd] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[dialogEnd] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[bodyEnd] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[htmlEnd] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public Message toMessage(final Throwable throwable) { LOG.error("The system is currently unavailable", throwable); return new Message(Message.ERROR_MESSAGE, InternalMessages.DEFAULT_SYSTEM_ERROR); }
class class_name[name] begin[{] method[toMessage, return_type[type[Message]], modifier[public], parameter[throwable]] begin[{] call[LOG.error, parameter[literal["The system is currently unavailable"], member[.throwable]]] return[ClassCreator(arguments=[MemberReference(member=ERROR_MESSAGE, postfix_operators=[], prefix_operators=[], qualifier=Message, selectors=[]), MemberReference(member=DEFAULT_SYSTEM_ERROR, postfix_operators=[], prefix_operators=[], qualifier=InternalMessages, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Message, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Message] identifier[toMessage] operator[SEP] Keyword[final] identifier[Throwable] identifier[throwable] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[throwable] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Message] operator[SEP] identifier[Message] operator[SEP] identifier[ERROR_MESSAGE] , identifier[InternalMessages] operator[SEP] identifier[DEFAULT_SYSTEM_ERROR] operator[SEP] operator[SEP] }
@Implementation(minSdk = P) protected static void nativeThemeClear(long themePtr) { Registries.NATIVE_THEME9_REGISTRY.getNativeObject(themePtr).Clear(); }
class class_name[name] begin[{] method[nativeThemeClear, return_type[void], modifier[static protected], parameter[themePtr]] begin[{] call[Registries.NATIVE_THEME9_REGISTRY.getNativeObject, parameter[member[.themePtr]]] end[}] END[}]
annotation[@] identifier[Implementation] operator[SEP] identifier[minSdk] operator[=] identifier[P] operator[SEP] Keyword[protected] Keyword[static] Keyword[void] identifier[nativeThemeClear] operator[SEP] Keyword[long] identifier[themePtr] operator[SEP] { identifier[Registries] operator[SEP] identifier[NATIVE_THEME9_REGISTRY] operator[SEP] identifier[getNativeObject] operator[SEP] identifier[themePtr] operator[SEP] operator[SEP] identifier[Clear] operator[SEP] operator[SEP] operator[SEP] }
public Mono<ServiceMessage> requestOne( ServiceMessage request, Class<?> responseType, Address address) { return Mono.defer( () -> { requireNonNull(address, "requestOne address parameter is required and must not be null"); requireNonNull(transport, "transport is required and must not be null"); return transport .create(address) .requestResponse(request) .map(message -> ServiceMessageCodec.decodeData(message, responseType)) .map(this::throwIfError); }); }
class class_name[name] begin[{] method[requestOne, return_type[type[Mono]], modifier[public], parameter[request, responseType, address]] begin[{] return[call[Mono.defer, parameter[LambdaExpression(body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=address, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="requestOne address parameter is required and must not be null")], member=requireNonNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transport, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="transport is required and must not be null")], member=requireNonNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=address, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=create, postfix_operators=[], prefix_operators=[], qualifier=transport, selectors=[MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=requestResponse, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=responseType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=decodeData, postfix_operators=[], prefix_operators=[], qualifier=ServiceMessageCodec, selectors=[], type_arguments=None), parameters=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=map, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodReference(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), method=MemberReference(member=throwIfError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])], member=map, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], parameters=[])]]] end[}] END[}]
Keyword[public] identifier[Mono] operator[<] identifier[ServiceMessage] operator[>] identifier[requestOne] operator[SEP] identifier[ServiceMessage] identifier[request] , identifier[Class] operator[<] operator[?] operator[>] identifier[responseType] , identifier[Address] identifier[address] operator[SEP] { Keyword[return] identifier[Mono] operator[SEP] identifier[defer] operator[SEP] operator[SEP] operator[SEP] operator[->] { identifier[requireNonNull] operator[SEP] identifier[address] , literal[String] operator[SEP] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[transport] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[transport] operator[SEP] identifier[create] operator[SEP] identifier[address] operator[SEP] operator[SEP] identifier[requestResponse] operator[SEP] identifier[request] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[message] operator[->] identifier[ServiceMessageCodec] operator[SEP] identifier[decodeData] operator[SEP] identifier[message] , identifier[responseType] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[this] operator[::] identifier[throwIfError] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] }
public String getParentId() { return mBodyMap.containsKey(BoxItem.FIELD_PARENT) ? ((BoxFolder) mBodyMap.get(BoxItem.FIELD_PARENT)).getId() : null; }
class class_name[name] begin[{] method[getParentId, return_type[type[String]], modifier[public], parameter[]] begin[{] return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=FIELD_PARENT, postfix_operators=[], prefix_operators=[], qualifier=BoxItem, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=mBodyMap, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=Cast(expression=MethodInvocation(arguments=[MemberReference(member=FIELD_PARENT, postfix_operators=[], prefix_operators=[], qualifier=BoxItem, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=mBodyMap, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=BoxFolder, sub_type=None)))] end[}] END[}]
Keyword[public] identifier[String] identifier[getParentId] operator[SEP] operator[SEP] { Keyword[return] identifier[mBodyMap] operator[SEP] identifier[containsKey] operator[SEP] identifier[BoxItem] operator[SEP] identifier[FIELD_PARENT] operator[SEP] operator[?] operator[SEP] operator[SEP] identifier[BoxFolder] operator[SEP] identifier[mBodyMap] operator[SEP] identifier[get] operator[SEP] identifier[BoxItem] operator[SEP] identifier[FIELD_PARENT] operator[SEP] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] }
public static systemuser get(nitro_service service, String username) throws Exception{ systemuser obj = new systemuser(); obj.set_username(username); systemuser response = (systemuser) obj.get_resource(service); return response; }
class class_name[name] begin[{] method[get, return_type[type[systemuser]], modifier[public static], parameter[service, username]] begin[{] local_variable[type[systemuser], obj] call[obj.set_username, parameter[member[.username]]] local_variable[type[systemuser], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[systemuser] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[username] operator[SEP] Keyword[throws] identifier[Exception] { identifier[systemuser] identifier[obj] operator[=] Keyword[new] identifier[systemuser] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[set_username] operator[SEP] identifier[username] operator[SEP] operator[SEP] identifier[systemuser] identifier[response] operator[=] operator[SEP] identifier[systemuser] operator[SEP] identifier[obj] operator[SEP] identifier[get_resource] operator[SEP] identifier[service] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public static void applyTransform(GrayU8 input , int transform[] , GrayU8 output ) { output.reshape(input.width,input.height); if( BoofConcurrency.USE_CONCURRENT ) { ImplEnhanceHistogram_MT.applyTransform(input, transform, output); } else { ImplEnhanceHistogram.applyTransform(input, transform, output); } }
class class_name[name] begin[{] method[applyTransform, return_type[void], modifier[public static], parameter[input, transform, output]] begin[{] call[output.reshape, parameter[member[input.width], member[input.height]]] if[member[BoofConcurrency.USE_CONCURRENT]] begin[{] call[ImplEnhanceHistogram_MT.applyTransform, parameter[member[.input], member[.transform], member[.output]]] else begin[{] call[ImplEnhanceHistogram.applyTransform, parameter[member[.input], member[.transform], member[.output]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[applyTransform] operator[SEP] identifier[GrayU8] identifier[input] , Keyword[int] identifier[transform] operator[SEP] operator[SEP] , identifier[GrayU8] identifier[output] operator[SEP] { identifier[output] operator[SEP] identifier[reshape] operator[SEP] identifier[input] operator[SEP] identifier[width] , identifier[input] operator[SEP] identifier[height] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[BoofConcurrency] operator[SEP] identifier[USE_CONCURRENT] operator[SEP] { identifier[ImplEnhanceHistogram_MT] operator[SEP] identifier[applyTransform] operator[SEP] identifier[input] , identifier[transform] , identifier[output] operator[SEP] operator[SEP] } Keyword[else] { identifier[ImplEnhanceHistogram] operator[SEP] identifier[applyTransform] operator[SEP] identifier[input] , identifier[transform] , identifier[output] operator[SEP] operator[SEP] } }
private static final boolean isCurrentUOW(Object uow) { if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(TRACE, "isCurrentUOW", uow); } boolean isSameUOW = false; if (isRunningInWAS()) { Object currentUOW = getCurrentUOWCoord(); if (uow == null) { isSameUOW = currentUOW == null; } else { isSameUOW = uow.equals(currentUOW); } } if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.exit(TRACE, "isCurrentUOW", Boolean.valueOf(isSameUOW)); } return isSameUOW; }
class class_name[name] begin[{] method[isCurrentUOW, return_type[type[boolean]], modifier[final private static], parameter[uow]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[TRACE.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.TRACE], literal["isCurrentUOW"], member[.uow]]] else begin[{] None end[}] local_variable[type[boolean], isSameUOW] if[call[.isRunningInWAS, parameter[]]] begin[{] local_variable[type[Object], currentUOW] if[binary_operation[member[.uow], ==, literal[null]]] begin[{] assign[member[.isSameUOW], binary_operation[member[.currentUOW], ==, literal[null]]] else begin[{] assign[member[.isSameUOW], call[uow.equals, parameter[member[.currentUOW]]]] end[}] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[TRACE.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.TRACE], literal["isCurrentUOW"], call[Boolean.valueOf, parameter[member[.isSameUOW]]]]] else begin[{] None end[}] return[member[.isSameUOW]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[final] Keyword[boolean] identifier[isCurrentUOW] operator[SEP] identifier[Object] identifier[uow] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[TRACE] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[TRACE] , literal[String] , identifier[uow] operator[SEP] operator[SEP] } Keyword[boolean] identifier[isSameUOW] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[isRunningInWAS] operator[SEP] operator[SEP] operator[SEP] { identifier[Object] identifier[currentUOW] operator[=] identifier[getCurrentUOWCoord] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[uow] operator[==] Other[null] operator[SEP] { identifier[isSameUOW] operator[=] identifier[currentUOW] operator[==] Other[null] operator[SEP] } Keyword[else] { identifier[isSameUOW] operator[=] identifier[uow] operator[SEP] identifier[equals] operator[SEP] identifier[currentUOW] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[TRACE] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[TRACE] , literal[String] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[isSameUOW] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[isSameUOW] operator[SEP] }
private void reset() { size = 0; qualifier_index = 0; value_index = 0; base_time = Long.MIN_VALUE; last_timestamp = Long.MIN_VALUE; }
class class_name[name] begin[{] method[reset, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.size], literal[0]] assign[member[.qualifier_index], literal[0]] assign[member[.value_index], literal[0]] assign[member[.base_time], member[Long.MIN_VALUE]] assign[member[.last_timestamp], member[Long.MIN_VALUE]] end[}] END[}]
Keyword[private] Keyword[void] identifier[reset] operator[SEP] operator[SEP] { identifier[size] operator[=] Other[0] operator[SEP] identifier[qualifier_index] operator[=] Other[0] operator[SEP] identifier[value_index] operator[=] Other[0] operator[SEP] identifier[base_time] operator[=] identifier[Long] operator[SEP] identifier[MIN_VALUE] operator[SEP] identifier[last_timestamp] operator[=] identifier[Long] operator[SEP] identifier[MIN_VALUE] operator[SEP] }
public static Type[] getSuperClassGenricTypes(final Class<?> clazz) { Type[] temp = { Object.class }; // eg: ClassA<T> if (clazz == null) return null; Type type = clazz.getGenericSuperclass(); if (type instanceof ParameterizedType) { return ((ParameterizedType) type).getActualTypeArguments(); } else { log.warn( "{} 's superclass not ParameterizedType", clazz); return temp; } }
class class_name[name] begin[{] method[getSuperClassGenricTypes, return_type[type[Type]], modifier[public static], parameter[clazz]] begin[{] local_variable[type[Type], temp] if[binary_operation[member[.clazz], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Type], type] if[binary_operation[member[.type], instanceof, type[ParameterizedType]]] begin[{] return[Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ParameterizedType, sub_type=None))] else begin[{] call[log.warn, parameter[literal["{} 's superclass not ParameterizedType"], member[.clazz]]] return[member[.temp]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[Type] operator[SEP] operator[SEP] identifier[getSuperClassGenricTypes] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] { identifier[Type] operator[SEP] operator[SEP] identifier[temp] operator[=] { identifier[Object] operator[SEP] Keyword[class] } operator[SEP] Keyword[if] operator[SEP] identifier[clazz] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[Type] identifier[type] operator[=] identifier[clazz] operator[SEP] identifier[getGenericSuperclass] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[type] Keyword[instanceof] identifier[ParameterizedType] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[ParameterizedType] operator[SEP] identifier[type] operator[SEP] operator[SEP] identifier[getActualTypeArguments] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[clazz] operator[SEP] operator[SEP] Keyword[return] identifier[temp] operator[SEP] } }
@XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "category", scope = SourceType.class) public JAXBElement<CategoryType> createSourceTypeCategory(CategoryType value) { return new JAXBElement<CategoryType>(ENTRY_TYPE_CATEGORY_QNAME, CategoryType.class, SourceType.class, value); }
class class_name[name] begin[{] method[createSourceTypeCategory, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=ENTRY_TYPE_CATEGORY_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CategoryType, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SourceType, sub_type=None)), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CategoryType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[SourceType] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[CategoryType] operator[>] identifier[createSourceTypeCategory] operator[SEP] identifier[CategoryType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[CategoryType] operator[>] operator[SEP] identifier[ENTRY_TYPE_CATEGORY_QNAME] , identifier[CategoryType] operator[SEP] Keyword[class] , identifier[SourceType] operator[SEP] Keyword[class] , identifier[value] operator[SEP] operator[SEP] }
public void reconstituteGDTargetStreams() throws MessageStoreException, SIException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "reconstituteGDTargetStreams"); _targetProtocolItemStream.reconstitute(_baseDestinationHandler, _baseDestinationHandler.getTransactionManager(), (ProducerInputHandler)_baseDestinationHandler.getInputHandler()); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "reconstituteGDTargetStreams"); }
class class_name[name] begin[{] method[reconstituteGDTargetStreams, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["reconstituteGDTargetStreams"]]] else begin[{] None end[}] call[_targetProtocolItemStream.reconstitute, parameter[member[._baseDestinationHandler], call[_baseDestinationHandler.getTransactionManager, parameter[]], Cast(expression=MethodInvocation(arguments=[], member=getInputHandler, postfix_operators=[], prefix_operators=[], qualifier=_baseDestinationHandler, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ProducerInputHandler, sub_type=None))]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["reconstituteGDTargetStreams"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[reconstituteGDTargetStreams] operator[SEP] operator[SEP] Keyword[throws] identifier[MessageStoreException] , identifier[SIException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[_targetProtocolItemStream] operator[SEP] identifier[reconstitute] operator[SEP] identifier[_baseDestinationHandler] , identifier[_baseDestinationHandler] operator[SEP] identifier[getTransactionManager] operator[SEP] operator[SEP] , operator[SEP] identifier[ProducerInputHandler] operator[SEP] identifier[_baseDestinationHandler] operator[SEP] identifier[getInputHandler] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
@Override public void addEvent(Event event) { logger.warn("Security event " + event.getDetectionPoint().getLabel() + " triggered by user: " + event.getUser().getUsername()); String json = gson.toJson(event); events.insertOne(Document.parse(String.valueOf(JSON.parse(json)))); super.notifyListeners(event); }
class class_name[name] begin[{] method[addEvent, return_type[void], modifier[public], parameter[event]] begin[{] call[logger.warn, parameter[binary_operation[binary_operation[binary_operation[literal["Security event "], +, call[event.getDetectionPoint, parameter[]]], +, literal[" triggered by user: "]], +, call[event.getUser, parameter[]]]]] local_variable[type[String], json] call[events.insertOne, parameter[call[Document.parse, parameter[call[String.valueOf, parameter[call[JSON.parse, parameter[member[.json]]]]]]]]] SuperMethodInvocation(arguments=[MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=notifyListeners, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[addEvent] operator[SEP] identifier[Event] identifier[event] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[event] operator[SEP] identifier[getDetectionPoint] operator[SEP] operator[SEP] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[event] operator[SEP] identifier[getUser] operator[SEP] operator[SEP] operator[SEP] identifier[getUsername] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[json] operator[=] identifier[gson] operator[SEP] identifier[toJson] operator[SEP] identifier[event] operator[SEP] operator[SEP] identifier[events] operator[SEP] identifier[insertOne] operator[SEP] identifier[Document] operator[SEP] identifier[parse] operator[SEP] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[JSON] operator[SEP] identifier[parse] operator[SEP] identifier[json] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[notifyListeners] operator[SEP] identifier[event] operator[SEP] operator[SEP] }
public static DMatrixRMaj convert( Homography2D_F64 m , DMatrixRMaj ret ) { if( ret == null ) { ret = new DMatrixRMaj(3,3); } else if( ret.numCols != 3 || ret.numRows != 3) throw new IllegalArgumentException("Expected a 3 by 3 matrix."); ret.unsafe_set(0,0,m.a11); ret.unsafe_set(0,1,m.a12); ret.unsafe_set(0,2,m.a13); ret.unsafe_set(1,0,m.a21); ret.unsafe_set(1,1,m.a22); ret.unsafe_set(1,2,m.a23); ret.unsafe_set(2,0,m.a31); ret.unsafe_set(2,1,m.a32); ret.unsafe_set(2,2,m.a33); return ret; }
class class_name[name] begin[{] method[convert, return_type[type[DMatrixRMaj]], modifier[public static], parameter[m, ret]] begin[{] if[binary_operation[member[.ret], ==, literal[null]]] begin[{] assign[member[.ret], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DMatrixRMaj, sub_type=None))] else begin[{] if[binary_operation[binary_operation[member[ret.numCols], !=, literal[3]], ||, binary_operation[member[ret.numRows], !=, literal[3]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected a 3 by 3 matrix.")], 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[}] end[}] call[ret.unsafe_set, parameter[literal[0], literal[0], member[m.a11]]] call[ret.unsafe_set, parameter[literal[0], literal[1], member[m.a12]]] call[ret.unsafe_set, parameter[literal[0], literal[2], member[m.a13]]] call[ret.unsafe_set, parameter[literal[1], literal[0], member[m.a21]]] call[ret.unsafe_set, parameter[literal[1], literal[1], member[m.a22]]] call[ret.unsafe_set, parameter[literal[1], literal[2], member[m.a23]]] call[ret.unsafe_set, parameter[literal[2], literal[0], member[m.a31]]] call[ret.unsafe_set, parameter[literal[2], literal[1], member[m.a32]]] call[ret.unsafe_set, parameter[literal[2], literal[2], member[m.a33]]] return[member[.ret]] end[}] END[}]
Keyword[public] Keyword[static] identifier[DMatrixRMaj] identifier[convert] operator[SEP] identifier[Homography2D_F64] identifier[m] , identifier[DMatrixRMaj] identifier[ret] operator[SEP] { Keyword[if] operator[SEP] identifier[ret] operator[==] Other[null] operator[SEP] { identifier[ret] operator[=] Keyword[new] identifier[DMatrixRMaj] operator[SEP] Other[3] , Other[3] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[ret] operator[SEP] identifier[numCols] operator[!=] Other[3] operator[||] identifier[ret] operator[SEP] identifier[numRows] operator[!=] Other[3] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[unsafe_set] operator[SEP] Other[0] , Other[0] , identifier[m] operator[SEP] identifier[a11] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[unsafe_set] operator[SEP] Other[0] , Other[1] , identifier[m] operator[SEP] identifier[a12] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[unsafe_set] operator[SEP] Other[0] , Other[2] , identifier[m] operator[SEP] identifier[a13] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[unsafe_set] operator[SEP] Other[1] , Other[0] , identifier[m] operator[SEP] identifier[a21] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[unsafe_set] operator[SEP] Other[1] , Other[1] , identifier[m] operator[SEP] identifier[a22] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[unsafe_set] operator[SEP] Other[1] , Other[2] , identifier[m] operator[SEP] identifier[a23] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[unsafe_set] operator[SEP] Other[2] , Other[0] , identifier[m] operator[SEP] identifier[a31] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[unsafe_set] operator[SEP] Other[2] , Other[1] , identifier[m] operator[SEP] identifier[a32] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[unsafe_set] operator[SEP] Other[2] , Other[2] , identifier[m] operator[SEP] identifier[a33] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] }
public static void createDebugBorder(JComponent c, Color color) { if (color == null) { color = Color.BLACK; } c.setBorder(BorderFactory.createLineBorder(color)); }
class class_name[name] begin[{] method[createDebugBorder, return_type[void], modifier[public static], parameter[c, color]] begin[{] if[binary_operation[member[.color], ==, literal[null]]] begin[{] assign[member[.color], member[Color.BLACK]] else begin[{] None end[}] call[c.setBorder, parameter[call[BorderFactory.createLineBorder, parameter[member[.color]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[createDebugBorder] operator[SEP] identifier[JComponent] identifier[c] , identifier[Color] identifier[color] operator[SEP] { Keyword[if] operator[SEP] identifier[color] operator[==] Other[null] operator[SEP] { identifier[color] operator[=] identifier[Color] operator[SEP] identifier[BLACK] operator[SEP] } identifier[c] operator[SEP] identifier[setBorder] operator[SEP] identifier[BorderFactory] operator[SEP] identifier[createLineBorder] operator[SEP] identifier[color] operator[SEP] operator[SEP] operator[SEP] }
public Observable<ExpressRouteCircuitStatsInner> getPeeringStatsAsync(String resourceGroupName, String circuitName, String peeringName) { return getPeeringStatsWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).map(new Func1<ServiceResponse<ExpressRouteCircuitStatsInner>, ExpressRouteCircuitStatsInner>() { @Override public ExpressRouteCircuitStatsInner call(ServiceResponse<ExpressRouteCircuitStatsInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[getPeeringStatsAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, circuitName, peeringName]] begin[{] return[call[.getPeeringStatsWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.circuitName], member[.peeringName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ExpressRouteCircuitStatsInner] operator[>] identifier[getPeeringStatsAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[circuitName] , identifier[String] identifier[peeringName] operator[SEP] { Keyword[return] identifier[getPeeringStatsWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[circuitName] , identifier[peeringName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[ExpressRouteCircuitStatsInner] operator[>] , identifier[ExpressRouteCircuitStatsInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[ExpressRouteCircuitStatsInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[ExpressRouteCircuitStatsInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public static String join(final Object array, final String separator) { return isArray(array) ? join(toArray(array, ClassUtils.getComponentClass(array)), separator) : Objects.toString(array); }
class class_name[name] begin[{] method[join, return_type[type[String]], modifier[public static], parameter[array, separator]] begin[{] return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Objects, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getComponentClass, postfix_operators=[], prefix_operators=[], qualifier=ClassUtils, selectors=[], type_arguments=None)], member=toArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=separator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=join, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[join] operator[SEP] Keyword[final] identifier[Object] identifier[array] , Keyword[final] identifier[String] identifier[separator] operator[SEP] { Keyword[return] identifier[isArray] operator[SEP] identifier[array] operator[SEP] operator[?] identifier[join] operator[SEP] identifier[toArray] operator[SEP] identifier[array] , identifier[ClassUtils] operator[SEP] identifier[getComponentClass] operator[SEP] identifier[array] operator[SEP] operator[SEP] , identifier[separator] operator[SEP] operator[:] identifier[Objects] operator[SEP] identifier[toString] operator[SEP] identifier[array] operator[SEP] operator[SEP] }
public final String buildAuthority() { // scheme, [user info], host, [port] StringBuilder buf = new StringBuilder(); buf.append(Preconditions.checkNotNull(scheme)); buf.append("://"); if (userInfo != null) { buf.append(CharEscapers.escapeUriUserInfo(userInfo)).append('@'); } buf.append(Preconditions.checkNotNull(host)); int port = this.port; if (port != -1) { buf.append(':').append(port); } return buf.toString(); }
class class_name[name] begin[{] method[buildAuthority, return_type[type[String]], modifier[final public], parameter[]] begin[{] local_variable[type[StringBuilder], buf] call[buf.append, parameter[call[Preconditions.checkNotNull, parameter[member[.scheme]]]]] call[buf.append, parameter[literal["://"]]] if[binary_operation[member[.userInfo], !=, literal[null]]] begin[{] call[buf.append, parameter[call[CharEscapers.escapeUriUserInfo, parameter[member[.userInfo]]]]] else begin[{] None end[}] call[buf.append, parameter[call[Preconditions.checkNotNull, parameter[member[.host]]]]] local_variable[type[int], port] if[binary_operation[member[.port], !=, literal[1]]] begin[{] call[buf.append, parameter[literal[':']]] else begin[{] None end[}] return[call[buf.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[String] identifier[buildAuthority] operator[SEP] operator[SEP] { identifier[StringBuilder] identifier[buf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[scheme] operator[SEP] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[userInfo] operator[!=] Other[null] operator[SEP] { identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[CharEscapers] operator[SEP] identifier[escapeUriUserInfo] operator[SEP] identifier[userInfo] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[host] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[port] operator[=] Keyword[this] operator[SEP] identifier[port] operator[SEP] Keyword[if] operator[SEP] identifier[port] operator[!=] operator[-] Other[1] operator[SEP] { identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[port] operator[SEP] operator[SEP] } Keyword[return] identifier[buf] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void writeExternal(ObjectOutput out) throws IOException { byte[] buf = entry.getNamespace().getBytes(Constants.DEFAULT_ENCODING); out.writeInt(buf.length); out.write(buf); buf = entry.getName().getBytes(Constants.DEFAULT_ENCODING); out.writeInt(buf.length); out.write(buf); out.writeInt(entry.getIndex()); }
class class_name[name] begin[{] method[writeExternal, return_type[void], modifier[public], parameter[out]] begin[{] local_variable[type[byte], buf] call[out.writeInt, parameter[member[buf.length]]] call[out.write, parameter[member[.buf]]] assign[member[.buf], call[entry.getName, parameter[]]] call[out.writeInt, parameter[member[buf.length]]] call[out.write, parameter[member[.buf]]] call[out.writeInt, parameter[call[entry.getIndex, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[writeExternal] operator[SEP] identifier[ObjectOutput] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[byte] operator[SEP] operator[SEP] identifier[buf] operator[=] identifier[entry] operator[SEP] identifier[getNamespace] operator[SEP] operator[SEP] operator[SEP] identifier[getBytes] operator[SEP] identifier[Constants] operator[SEP] identifier[DEFAULT_ENCODING] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeInt] operator[SEP] identifier[buf] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[buf] operator[SEP] operator[SEP] identifier[buf] operator[=] identifier[entry] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[getBytes] operator[SEP] identifier[Constants] operator[SEP] identifier[DEFAULT_ENCODING] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeInt] operator[SEP] identifier[buf] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[buf] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeInt] operator[SEP] identifier[entry] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public final boolean doInRedis(List<RedisClient> clients, boolean isRead, Object key) { List<Integer> randomIndexs = RandomUtil.randomizeWithinLimit(clients.size()); boolean success = false; for (Integer index : randomIndexs) { RedisClient client = clients.get(index); long start = System.currentTimeMillis(); try { result = doOperation(client); long end = System.currentTimeMillis(); logger.info("[RedisCache:" + getOptionType() + "]" + " <key:" + key + "> <client: " + client.getCacheName() + "> <server: " + client.getLiteralRedisServer() + "> success ! (use " + (end - start) + " ms)"); if (isRead) { // read=true,读取出非空即返回,否则双写 if (result == null) { // retry another client logger.info("[RedisCache:" + getOptionType() + "]" + " <key:" + key + "> <client: " + client.getCacheName() + "> <server: " + client.getLiteralRedisServer() + "> but null result... (use " + (end - start) + " ms)"); continue; } return true; } success = success || true; } catch (Exception e) { success = success || false; this.e = new RedisOperationException(e.getMessage() + "@" + client.getLiteralRedisServer(), e); long end = System.currentTimeMillis(); logger.error("[[RedisCache:" + getOptionType() + "]" + " <key:" + key + "> <client: " + client.getCacheName() + "> <server: " + client.getLiteralRedisServer() + "> fail. " + e.getMessage() + "! (use " + (end - start) + " ms)"); } } return success; }
class class_name[name] begin[{] method[doInRedis, return_type[type[boolean]], modifier[final public], parameter[clients, isRead, key]] begin[{] local_variable[type[List], randomIndexs] local_variable[type[boolean], success] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=clients, selectors=[], type_arguments=None), name=client)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RedisClient, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=currentTimeMillis, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), name=start)], modifiers=set(), type=BasicType(dimensions=[], name=long)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doOperation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=currentTimeMillis, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), name=end)], modifiers=set(), type=BasicType(dimensions=[], name=long)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[RedisCache:"), operandr=MethodInvocation(arguments=[], member=getOptionType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" <key:"), operator=+), operandr=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="> <client: "), operator=+), operandr=MethodInvocation(arguments=[], member=getCacheName, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="> <server: "), operator=+), operandr=MethodInvocation(arguments=[], member=getLiteralRedisServer, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="> success ! (use "), operator=+), operandr=BinaryOperation(operandl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ms)"), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=isRead, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=result, 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=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[RedisCache:"), operandr=MethodInvocation(arguments=[], member=getOptionType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" <key:"), operator=+), operandr=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="> <client: "), operator=+), operandr=MethodInvocation(arguments=[], member=getCacheName, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="> <server: "), operator=+), operandr=MethodInvocation(arguments=[], member=getLiteralRedisServer, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="> but null result... (use "), operator=+), operandr=BinaryOperation(operandl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ms)"), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)])), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=success, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=success, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator=||)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=success, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=success, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), operator=||)), label=None), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=e, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="@"), operator=+), operandr=MethodInvocation(arguments=[], member=getLiteralRedisServer, postfix_operators=[], prefix_operators=[], qualifier=client, 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=RedisOperationException, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=currentTimeMillis, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), name=end)], modifiers=set(), type=BasicType(dimensions=[], name=long)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[[RedisCache:"), operandr=MethodInvocation(arguments=[], member=getOptionType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" <key:"), operator=+), operandr=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="> <client: "), operator=+), operandr=MethodInvocation(arguments=[], member=getCacheName, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="> <server: "), operator=+), operandr=MethodInvocation(arguments=[], member=getLiteralRedisServer, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="> fail. "), 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="! (use "), operator=+), operandr=BinaryOperation(operandl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ms)"), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=randomIndexs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=index)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None) return[member[.success]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[boolean] identifier[doInRedis] operator[SEP] identifier[List] operator[<] identifier[RedisClient] operator[>] identifier[clients] , Keyword[boolean] identifier[isRead] , identifier[Object] identifier[key] operator[SEP] { identifier[List] operator[<] identifier[Integer] operator[>] identifier[randomIndexs] operator[=] identifier[RandomUtil] operator[SEP] identifier[randomizeWithinLimit] operator[SEP] identifier[clients] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[success] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Integer] identifier[index] operator[:] identifier[randomIndexs] operator[SEP] { identifier[RedisClient] identifier[client] operator[=] identifier[clients] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[long] identifier[start] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[result] operator[=] identifier[doOperation] operator[SEP] identifier[client] operator[SEP] operator[SEP] Keyword[long] identifier[end] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[getOptionType] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[key] operator[+] literal[String] operator[+] identifier[client] operator[SEP] identifier[getCacheName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[client] operator[SEP] identifier[getLiteralRedisServer] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] operator[SEP] identifier[end] operator[-] identifier[start] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isRead] operator[SEP] { Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[getOptionType] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[key] operator[+] literal[String] operator[+] identifier[client] operator[SEP] identifier[getCacheName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[client] operator[SEP] identifier[getLiteralRedisServer] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] operator[SEP] identifier[end] operator[-] identifier[start] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } identifier[success] operator[=] identifier[success] operator[||] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[success] operator[=] identifier[success] operator[||] literal[boolean] operator[SEP] Keyword[this] operator[SEP] identifier[e] operator[=] Keyword[new] identifier[RedisOperationException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[client] operator[SEP] identifier[getLiteralRedisServer] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[long] identifier[end] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[getOptionType] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[key] operator[+] literal[String] operator[+] identifier[client] operator[SEP] identifier[getCacheName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[client] operator[SEP] identifier[getLiteralRedisServer] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] operator[SEP] identifier[end] operator[-] identifier[start] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[return] identifier[success] operator[SEP] }
public static WebcamInterface loadManager( String pathToManager ) { try { Class c = Class.forName(pathToManager); return (WebcamInterface) c.newInstance(); } catch (ClassNotFoundException e) { throw new RuntimeException("Class not found. Is it included in the class path?"); } catch (InstantiationException | IllegalAccessException e) { throw new RuntimeException(e); } }
class class_name[name] begin[{] method[loadManager, return_type[type[WebcamInterface]], modifier[public static], parameter[pathToManager]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=pathToManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=WebcamInterface, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Class not found. Is it included in the class path?")], 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=['ClassNotFoundException'])), 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=['InstantiationException', 'IllegalAccessException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[WebcamInterface] identifier[loadManager] operator[SEP] identifier[String] identifier[pathToManager] operator[SEP] { Keyword[try] { identifier[Class] identifier[c] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[pathToManager] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[WebcamInterface] operator[SEP] identifier[c] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InstantiationException] operator[|] identifier[IllegalAccessException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
@Override public int read(byte []buf, int offset, int length) throws IOException { if (buf == null) throw new NullPointerException(); else if (offset < 0 || buf.length < offset + length) throw new ArrayIndexOutOfBoundsException(); int result = nativeRead(_fd, buf, offset, length); if (result > 0) _pos += result; return result; }
class class_name[name] begin[{] method[read, return_type[type[int]], modifier[public], parameter[buf, offset, length]] begin[{] if[binary_operation[member[.buf], ==, literal[null]]] 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=NullPointerException, sub_type=None)), label=None) else begin[{] if[binary_operation[binary_operation[member[.offset], <, literal[0]], ||, binary_operation[member[buf.length], <, binary_operation[member[.offset], +, member[.length]]]]] 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=ArrayIndexOutOfBoundsException, sub_type=None)), label=None) else begin[{] None end[}] end[}] local_variable[type[int], result] if[binary_operation[member[.result], >, literal[0]]] begin[{] assign[member[._pos], member[.result]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[read] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buf] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[buf] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[offset] operator[<] Other[0] operator[||] identifier[buf] operator[SEP] identifier[length] operator[<] identifier[offset] operator[+] identifier[length] operator[SEP] Keyword[throw] Keyword[new] identifier[ArrayIndexOutOfBoundsException] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[result] operator[=] identifier[nativeRead] operator[SEP] identifier[_fd] , identifier[buf] , identifier[offset] , identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[>] Other[0] operator[SEP] identifier[_pos] operator[+=] identifier[result] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public DateTime toDateTime(DateTimeZone zone) { zone = DateTimeUtils.getZone(zone); if (getZone() == zone) { return this; } return super.toDateTime(zone); }
class class_name[name] begin[{] method[toDateTime, return_type[type[DateTime]], modifier[public], parameter[zone]] begin[{] assign[member[.zone], call[DateTimeUtils.getZone, parameter[member[.zone]]]] if[binary_operation[call[.getZone, parameter[]], ==, member[.zone]]] begin[{] return[THIS[]] else begin[{] None end[}] return[SuperMethodInvocation(arguments=[MemberReference(member=zone, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toDateTime, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
Keyword[public] identifier[DateTime] identifier[toDateTime] operator[SEP] identifier[DateTimeZone] identifier[zone] operator[SEP] { identifier[zone] operator[=] identifier[DateTimeUtils] operator[SEP] identifier[getZone] operator[SEP] identifier[zone] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getZone] operator[SEP] operator[SEP] operator[==] identifier[zone] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[toDateTime] operator[SEP] identifier[zone] operator[SEP] operator[SEP] }
private void createJaasApiFilter() { final String ATT_JAAS_API_PROVISION = "jaas-api-provision"; final String DEF_JAAS_API_PROVISION = "false"; String provideJaasApi = httpElt.getAttribute(ATT_JAAS_API_PROVISION); if (!StringUtils.hasText(provideJaasApi)) { provideJaasApi = DEF_JAAS_API_PROVISION; } if ("true".equals(provideJaasApi)) { jaasApiFilter = new RootBeanDefinition(JaasApiIntegrationFilter.class); } }
class class_name[name] begin[{] method[createJaasApiFilter, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[String], ATT_JAAS_API_PROVISION] local_variable[type[String], DEF_JAAS_API_PROVISION] local_variable[type[String], provideJaasApi] if[call[StringUtils.hasText, parameter[member[.provideJaasApi]]]] begin[{] assign[member[.provideJaasApi], member[.DEF_JAAS_API_PROVISION]] else begin[{] None end[}] if[literal["true"]] begin[{] assign[member[.jaasApiFilter], ClassCreator(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JaasApiIntegrationFilter, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RootBeanDefinition, sub_type=None))] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[createJaasApiFilter] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[ATT_JAAS_API_PROVISION] operator[=] literal[String] operator[SEP] Keyword[final] identifier[String] identifier[DEF_JAAS_API_PROVISION] operator[=] literal[String] operator[SEP] identifier[String] identifier[provideJaasApi] operator[=] identifier[httpElt] operator[SEP] identifier[getAttribute] operator[SEP] identifier[ATT_JAAS_API_PROVISION] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[StringUtils] operator[SEP] identifier[hasText] operator[SEP] identifier[provideJaasApi] operator[SEP] operator[SEP] { identifier[provideJaasApi] operator[=] identifier[DEF_JAAS_API_PROVISION] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[provideJaasApi] operator[SEP] operator[SEP] { identifier[jaasApiFilter] operator[=] Keyword[new] identifier[RootBeanDefinition] operator[SEP] identifier[JaasApiIntegrationFilter] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } }
public static CmsXmlPage unmarshal(CmsObject cms, CmsFile file) throws CmsXmlException { return CmsXmlPageFactory.unmarshal(cms, file, true); }
class class_name[name] begin[{] method[unmarshal, return_type[type[CmsXmlPage]], modifier[public static], parameter[cms, file]] begin[{] return[call[CmsXmlPageFactory.unmarshal, parameter[member[.cms], member[.file], literal[true]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CmsXmlPage] identifier[unmarshal] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[CmsFile] identifier[file] operator[SEP] Keyword[throws] identifier[CmsXmlException] { Keyword[return] identifier[CmsXmlPageFactory] operator[SEP] identifier[unmarshal] operator[SEP] identifier[cms] , identifier[file] , literal[boolean] operator[SEP] operator[SEP] }
public void marshall(PutRecordBatchRequest putRecordBatchRequest, ProtocolMarshaller protocolMarshaller) { if (putRecordBatchRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(putRecordBatchRequest.getDeliveryStreamName(), DELIVERYSTREAMNAME_BINDING); protocolMarshaller.marshall(putRecordBatchRequest.getRecords(), RECORDS_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[putRecordBatchRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.putRecordBatchRequest], ==, 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=getDeliveryStreamName, postfix_operators=[], prefix_operators=[], qualifier=putRecordBatchRequest, selectors=[], type_arguments=None), MemberReference(member=DELIVERYSTREAMNAME_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=getRecords, postfix_operators=[], prefix_operators=[], qualifier=putRecordBatchRequest, selectors=[], type_arguments=None), MemberReference(member=RECORDS_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[PutRecordBatchRequest] identifier[putRecordBatchRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[putRecordBatchRequest] 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[putRecordBatchRequest] operator[SEP] identifier[getDeliveryStreamName] operator[SEP] operator[SEP] , identifier[DELIVERYSTREAMNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[putRecordBatchRequest] operator[SEP] identifier[getRecords] operator[SEP] operator[SEP] , identifier[RECORDS_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public synchronized long getByteLimit(final String metric) { if (metric == null || metric.isEmpty()) { return default_byte_limit; } for (final QueryLimitOverrideItem item : overrides.values()) { if (item.matches(metric)) { return item.getByteLimit(); } } return default_byte_limit; }
class class_name[name] begin[{] method[getByteLimit, return_type[type[long]], modifier[synchronized public], parameter[metric]] begin[{] if[binary_operation[binary_operation[member[.metric], ==, literal[null]], ||, call[metric.isEmpty, parameter[]]]] begin[{] return[member[.default_byte_limit]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=metric, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matches, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getByteLimit, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=overrides, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=item)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=QueryLimitOverrideItem, sub_type=None))), label=None) return[member[.default_byte_limit]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[long] identifier[getByteLimit] operator[SEP] Keyword[final] identifier[String] identifier[metric] operator[SEP] { Keyword[if] operator[SEP] identifier[metric] operator[==] Other[null] operator[||] identifier[metric] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[default_byte_limit] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[QueryLimitOverrideItem] identifier[item] operator[:] identifier[overrides] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[item] operator[SEP] identifier[matches] operator[SEP] identifier[metric] operator[SEP] operator[SEP] { Keyword[return] identifier[item] operator[SEP] identifier[getByteLimit] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[default_byte_limit] operator[SEP] }
@Nonnull protected static EValidity validateMessage (@Nonnull final String sMsg) { ValueEnforcer.notNull (sMsg, "Msg"); return validateMessage (sMsg.toCharArray ()); }
class class_name[name] begin[{] method[validateMessage, return_type[type[EValidity]], modifier[static protected], parameter[sMsg]] begin[{] call[ValueEnforcer.notNull, parameter[member[.sMsg], literal["Msg"]]] return[call[.validateMessage, parameter[call[sMsg.toCharArray, parameter[]]]]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[protected] Keyword[static] identifier[EValidity] identifier[validateMessage] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[sMsg] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[sMsg] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[validateMessage] operator[SEP] identifier[sMsg] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(Lexicon lexicon, ProtocolMarshaller protocolMarshaller) { if (lexicon == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(lexicon.getContent(), CONTENT_BINDING); protocolMarshaller.marshall(lexicon.getName(), NAME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[lexicon, protocolMarshaller]] begin[{] if[binary_operation[member[.lexicon], ==, 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=getContent, postfix_operators=[], prefix_operators=[], qualifier=lexicon, selectors=[], type_arguments=None), MemberReference(member=CONTENT_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=getName, postfix_operators=[], prefix_operators=[], qualifier=lexicon, selectors=[], type_arguments=None), MemberReference(member=NAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Lexicon] identifier[lexicon] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[lexicon] 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[lexicon] operator[SEP] identifier[getContent] operator[SEP] operator[SEP] , identifier[CONTENT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[lexicon] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[NAME_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public static <T> Single<T> toSingle(ListenableFuture<T> listenableFuture) { return RxJava2FutureUtils.createSingle(SpringFutureUtils.createValueSource(listenableFuture)); }
class class_name[name] begin[{] method[toSingle, return_type[type[Single]], modifier[public static], parameter[listenableFuture]] begin[{] return[call[RxJava2FutureUtils.createSingle, parameter[call[SpringFutureUtils.createValueSource, parameter[member[.listenableFuture]]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Single] operator[<] identifier[T] operator[>] identifier[toSingle] operator[SEP] identifier[ListenableFuture] operator[<] identifier[T] operator[>] identifier[listenableFuture] operator[SEP] { Keyword[return] identifier[RxJava2FutureUtils] operator[SEP] identifier[createSingle] operator[SEP] identifier[SpringFutureUtils] operator[SEP] identifier[createValueSource] operator[SEP] identifier[listenableFuture] operator[SEP] operator[SEP] operator[SEP] }
private FileOutputStream fos() throws IOException { if (closed) throw new IOException("Output stream is already closed"); if (os == null || currFileBytesWritten >= partSize) { if (os != null) { os.close(); // notify about the new file ready for processing observer.onPartCreate(new PartCreationEvent( getFile(filesCreated), filesCreated, false, this)); } currFileBytesWritten = 0; filesCreated++; blockIfNecessary(); final File file = getFile(filesCreated); os = new FileOutputStream(file); } return os; }
class class_name[name] begin[{] method[fos, return_type[type[FileOutputStream]], modifier[private], parameter[]] begin[{] if[member[.closed]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Output stream is already closed")], 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[}] if[binary_operation[binary_operation[member[.os], ==, literal[null]], ||, binary_operation[member[.currFileBytesWritten], >=, member[.partSize]]]] begin[{] if[binary_operation[member[.os], !=, literal[null]]] begin[{] call[os.close, parameter[]] call[observer.onPartCreate, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=filesCreated, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=filesCreated, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PartCreationEvent, sub_type=None))]] else begin[{] None end[}] assign[member[.currFileBytesWritten], literal[0]] member[.filesCreated] call[.blockIfNecessary, parameter[]] local_variable[type[File], file] assign[member[.os], ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileOutputStream, sub_type=None))] else begin[{] None end[}] return[member[.os]] end[}] END[}]
Keyword[private] identifier[FileOutputStream] identifier[fos] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[closed] operator[SEP] Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[os] operator[==] Other[null] operator[||] identifier[currFileBytesWritten] operator[>=] identifier[partSize] operator[SEP] { Keyword[if] operator[SEP] identifier[os] operator[!=] Other[null] operator[SEP] { identifier[os] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[observer] operator[SEP] identifier[onPartCreate] operator[SEP] Keyword[new] identifier[PartCreationEvent] operator[SEP] identifier[getFile] operator[SEP] identifier[filesCreated] operator[SEP] , identifier[filesCreated] , literal[boolean] , Keyword[this] operator[SEP] operator[SEP] operator[SEP] } identifier[currFileBytesWritten] operator[=] Other[0] operator[SEP] identifier[filesCreated] operator[++] operator[SEP] identifier[blockIfNecessary] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[File] identifier[file] operator[=] identifier[getFile] operator[SEP] identifier[filesCreated] operator[SEP] operator[SEP] identifier[os] operator[=] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[file] operator[SEP] operator[SEP] } Keyword[return] identifier[os] operator[SEP] }
@Override public int doEndTag() throws JspException { if (!scopeSpecified) { pageContext.removeAttribute(var); } else { pageContext.removeAttribute(var, scope); } return EVAL_PAGE; }
class class_name[name] begin[{] method[doEndTag, return_type[type[int]], modifier[public], parameter[]] begin[{] if[member[.scopeSpecified]] begin[{] call[pageContext.removeAttribute, parameter[member[.var]]] else begin[{] call[pageContext.removeAttribute, parameter[member[.var], member[.scope]]] end[}] return[member[.EVAL_PAGE]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[doEndTag] operator[SEP] operator[SEP] Keyword[throws] identifier[JspException] { Keyword[if] operator[SEP] operator[!] identifier[scopeSpecified] operator[SEP] { identifier[pageContext] operator[SEP] identifier[removeAttribute] operator[SEP] identifier[var] operator[SEP] operator[SEP] } Keyword[else] { identifier[pageContext] operator[SEP] identifier[removeAttribute] operator[SEP] identifier[var] , identifier[scope] operator[SEP] operator[SEP] } Keyword[return] identifier[EVAL_PAGE] operator[SEP] }
public void setAdditionalLanguageCodes(java.util.Collection<String> additionalLanguageCodes) { if (additionalLanguageCodes == null) { this.additionalLanguageCodes = null; return; } this.additionalLanguageCodes = new java.util.ArrayList<String>(additionalLanguageCodes); }
class class_name[name] begin[{] method[setAdditionalLanguageCodes, return_type[void], modifier[public], parameter[additionalLanguageCodes]] begin[{] if[binary_operation[member[.additionalLanguageCodes], ==, literal[null]]] begin[{] assign[THIS[member[None.additionalLanguageCodes]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.additionalLanguageCodes]], ClassCreator(arguments=[MemberReference(member=additionalLanguageCodes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setAdditionalLanguageCodes] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[additionalLanguageCodes] operator[SEP] { Keyword[if] operator[SEP] identifier[additionalLanguageCodes] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[additionalLanguageCodes] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[additionalLanguageCodes] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[additionalLanguageCodes] operator[SEP] operator[SEP] }
public Object getAt(final int index) { if (index < 0) { // calculate whole list in this case // recommend avoiding -ve's as this is obviously not as efficient List list = list(); int adjustedIndex = index + list.size(); if (adjustedIndex >= 0 && adjustedIndex < list.size()) return list.get(adjustedIndex); } else { final Iterator iter = iterator(); int count = 0; while (iter.hasNext()) { if (count++ == index) { return iter.next(); } else { iter.next(); } } } return new NoChildren(this, this.name, this.namespaceTagHints); }
class class_name[name] begin[{] method[getAt, return_type[type[Object]], modifier[public], parameter[index]] begin[{] if[binary_operation[member[.index], <, literal[0]]] begin[{] local_variable[type[List], list] local_variable[type[int], adjustedIndex] if[binary_operation[binary_operation[member[.adjustedIndex], >=, literal[0]], &&, binary_operation[member[.adjustedIndex], <, call[list.size, parameter[]]]]] begin[{] return[call[list.get, parameter[member[.adjustedIndex]]]] else begin[{] None end[}] else begin[{] local_variable[type[Iterator], iter] local_variable[type[int], count] while[call[iter.hasNext, parameter[]]] begin[{] if[binary_operation[member[.count], ==, member[.index]]] begin[{] return[call[iter.next, parameter[]]] else begin[{] call[iter.next, parameter[]] end[}] end[}] end[}] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=namespaceTagHints, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoChildren, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Object] identifier[getAt] operator[SEP] Keyword[final] Keyword[int] identifier[index] operator[SEP] { Keyword[if] operator[SEP] identifier[index] operator[<] Other[0] operator[SEP] { identifier[List] identifier[list] operator[=] identifier[list] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[adjustedIndex] operator[=] identifier[index] operator[+] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[adjustedIndex] operator[>=] Other[0] operator[&&] identifier[adjustedIndex] operator[<] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[list] operator[SEP] identifier[get] operator[SEP] identifier[adjustedIndex] operator[SEP] operator[SEP] } Keyword[else] { Keyword[final] identifier[Iterator] identifier[iter] operator[=] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[iter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[count] operator[++] operator[==] identifier[index] operator[SEP] { Keyword[return] identifier[iter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[iter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] Keyword[new] identifier[NoChildren] operator[SEP] Keyword[this] , Keyword[this] operator[SEP] identifier[name] , Keyword[this] operator[SEP] identifier[namespaceTagHints] operator[SEP] operator[SEP] }
public WebElement waitForWebElement(final By by, int minimumNumberOfMatches, int timeout, boolean scroll){ final long endTime = SystemClock.uptimeMillis() + timeout; while (true) { final boolean timedOut = SystemClock.uptimeMillis() > endTime; if (timedOut){ searcher.logMatchesFound(by.getValue()); return null; } sleeper.sleep(); WebElement webElementToReturn = searcher.searchForWebElement(by, minimumNumberOfMatches); if(webElementToReturn != null) return webElementToReturn; if(scroll) { scroller.scrollDown(); } } }
class class_name[name] begin[{] method[waitForWebElement, return_type[type[WebElement]], modifier[public], parameter[by, minimumNumberOfMatches, timeout, scroll]] begin[{] local_variable[type[long], endTime] while[literal[true]] begin[{] local_variable[type[boolean], timedOut] if[member[.timedOut]] begin[{] call[searcher.logMatchesFound, parameter[call[by.getValue, parameter[]]]] return[literal[null]] else begin[{] None end[}] call[sleeper.sleep, parameter[]] local_variable[type[WebElement], webElementToReturn] if[binary_operation[member[.webElementToReturn], !=, literal[null]]] begin[{] return[member[.webElementToReturn]] else begin[{] None end[}] if[member[.scroll]] begin[{] call[scroller.scrollDown, parameter[]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] identifier[WebElement] identifier[waitForWebElement] operator[SEP] Keyword[final] identifier[By] identifier[by] , Keyword[int] identifier[minimumNumberOfMatches] , Keyword[int] identifier[timeout] , Keyword[boolean] identifier[scroll] operator[SEP] { Keyword[final] Keyword[long] identifier[endTime] operator[=] identifier[SystemClock] operator[SEP] identifier[uptimeMillis] operator[SEP] operator[SEP] operator[+] identifier[timeout] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[final] Keyword[boolean] identifier[timedOut] operator[=] identifier[SystemClock] operator[SEP] identifier[uptimeMillis] operator[SEP] operator[SEP] operator[>] identifier[endTime] operator[SEP] Keyword[if] operator[SEP] identifier[timedOut] operator[SEP] { identifier[searcher] operator[SEP] identifier[logMatchesFound] operator[SEP] identifier[by] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } identifier[sleeper] operator[SEP] identifier[sleep] operator[SEP] operator[SEP] operator[SEP] identifier[WebElement] identifier[webElementToReturn] operator[=] identifier[searcher] operator[SEP] identifier[searchForWebElement] operator[SEP] identifier[by] , identifier[minimumNumberOfMatches] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[webElementToReturn] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[webElementToReturn] operator[SEP] Keyword[if] operator[SEP] identifier[scroll] operator[SEP] { identifier[scroller] operator[SEP] identifier[scrollDown] operator[SEP] operator[SEP] operator[SEP] } } }
public void init(FgExampleList data) { if (data == null && prm.featCountCutoff > 0) { throw new IllegalArgumentException("Data can only be null if there is no feature count cutoff."); } // Ensure the FactorTemplateList is initialized, and maybe count features along the way. if (templates.isGrowing() && data != null) { log.info("Growing feature template list by iterating over examples"); extractAllFeats(data, templates); templates.stopGrowth(); feAlphabet.stopGrowth(); } numTemplates = templates.size(); // Apply a feature count cutoff. this.included = new boolean[numTemplates][][]; for (int t=0; t<numTemplates; t++) { FactorTemplate template = templates.get(t); int numConfigs = template.getNumConfigs(); int numFeats = template.getAlphabet().size(); included[t] = new boolean[numConfigs][numFeats]; } BoolArrays.fill(included, true); if (prm.featCountCutoff >= 1) { log.info("Applying feature count cutoff: " + prm.featCountCutoff); IntIntDenseVector[][] counts = countFeatures(data, templates); excludeByFeatCount(counts); } // Always include the bias features. for (int t=0; t<included.length; t++) { FactorTemplate template = templates.get(t); FeatureNames alphabet = template.getAlphabet(); for (int k = 0; k < alphabet.size(); k++) { if (alphabet.isBiasFeature(k)) { for (int c = 0; c < included[t].length; c++) { included[t][c][k] = true; } } } } // Set the indices to track only the included parameters. // All other entries are set to -1. // Also: Count the number of parameters, accounting for excluded params. numParams = feAlphabet.size(); this.indices = new int[numTemplates][][]; for (int t=0; t<indices.length; t++) { FactorTemplate template = templates.get(t); int numConfigs = template.getNumConfigs(); int numFeats = template.getAlphabet().size(); indices[t] = new int[numConfigs][numFeats]; for (int c = 0; c < indices[t].length; c++) { for (int k = 0; k < indices[t][c].length; k++) { indices[t][c][k] = included[t][c][k] ? numParams++ : -1; } } } reservedOffset = numParams; numParams += reservedMax; if (reservedMax > 0) { log.debug("Reserved {} parameters starting at {}", reservedMax, reservedOffset); } if (fcmAlphabet.size() > 0) { log.debug("FCM is using {} features", fcmAlphabet.size()); } fcmAlphabet.stopGrowth(); // If we are using the feature hashing trick, we may want to further increase // the number of model parameters. numParams = Math.max(numParams, featureHashModMax); initialized = true; }
class class_name[name] begin[{] method[init, return_type[void], modifier[public], parameter[data]] begin[{] if[binary_operation[binary_operation[member[.data], ==, literal[null]], &&, binary_operation[member[prm.featCountCutoff], >, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Data can only be null if there is no feature count cutoff.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[call[templates.isGrowing, parameter[]], &&, binary_operation[member[.data], !=, literal[null]]]] begin[{] call[log.info, parameter[literal["Growing feature template list by iterating over examples"]]] call[.extractAllFeats, parameter[member[.data], member[.templates]]] call[templates.stopGrowth, parameter[]] call[feAlphabet.stopGrowth, parameter[]] else begin[{] None end[}] assign[member[.numTemplates], call[templates.size, parameter[]]] assign[THIS[member[None.included]], ArrayCreator(dimensions=[MemberReference(member=numTemplates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), None, None], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=boolean))] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=templates, selectors=[], type_arguments=None), name=template)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FactorTemplate, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getNumConfigs, postfix_operators=[], prefix_operators=[], qualifier=template, selectors=[], type_arguments=None), name=numConfigs)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getAlphabet, postfix_operators=[], prefix_operators=[], qualifier=template, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=numFeats)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=included, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ArrayCreator(dimensions=[MemberReference(member=numConfigs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=numFeats, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=boolean))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numTemplates, 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=t)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=t, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[BoolArrays.fill, parameter[member[.included], literal[true]]] if[binary_operation[member[prm.featCountCutoff], >=, literal[1]]] begin[{] call[log.info, parameter[binary_operation[literal["Applying feature count cutoff: "], +, member[prm.featCountCutoff]]]] local_variable[type[IntIntDenseVector], counts] call[.excludeByFeatCount, parameter[member[.counts]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=templates, selectors=[], type_arguments=None), name=template)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FactorTemplate, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getAlphabet, postfix_operators=[], prefix_operators=[], qualifier=template, selectors=[], type_arguments=None), name=alphabet)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FeatureNames, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isBiasFeature, postfix_operators=[], prefix_operators=[], qualifier=alphabet, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=included, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=included, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=c, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=alphabet, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=included, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=t)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=t, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.numParams], call[feAlphabet.size, parameter[]]] assign[THIS[member[None.indices]], ArrayCreator(dimensions=[MemberReference(member=numTemplates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), None, None], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=templates, selectors=[], type_arguments=None), name=template)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FactorTemplate, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getNumConfigs, postfix_operators=[], prefix_operators=[], qualifier=template, selectors=[], type_arguments=None), name=numConfigs)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getAlphabet, postfix_operators=[], prefix_operators=[], qualifier=template, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=numFeats)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=indices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ArrayCreator(dimensions=[MemberReference(member=numConfigs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=numFeats, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))), label=None), ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=indices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=TernaryExpression(condition=MemberReference(member=included, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), if_false=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), if_true=MemberReference(member=numParams, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=indices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=indices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=c, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=indices, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=t)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=t, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.reservedOffset], member[.numParams]] assign[member[.numParams], member[.reservedMax]] if[binary_operation[member[.reservedMax], >, literal[0]]] begin[{] call[log.debug, parameter[literal["Reserved {} parameters starting at {}"], member[.reservedMax], member[.reservedOffset]]] else begin[{] None end[}] if[binary_operation[call[fcmAlphabet.size, parameter[]], >, literal[0]]] begin[{] call[log.debug, parameter[literal["FCM is using {} features"], call[fcmAlphabet.size, parameter[]]]] else begin[{] None end[}] call[fcmAlphabet.stopGrowth, parameter[]] assign[member[.numParams], call[Math.max, parameter[member[.numParams], member[.featureHashModMax]]]] assign[member[.initialized], literal[true]] end[}] END[}]
Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[FgExampleList] identifier[data] operator[SEP] { Keyword[if] operator[SEP] identifier[data] operator[==] Other[null] operator[&&] identifier[prm] operator[SEP] identifier[featCountCutoff] operator[>] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[templates] operator[SEP] identifier[isGrowing] operator[SEP] operator[SEP] operator[&&] identifier[data] operator[!=] Other[null] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[extractAllFeats] operator[SEP] identifier[data] , identifier[templates] operator[SEP] operator[SEP] identifier[templates] operator[SEP] identifier[stopGrowth] operator[SEP] operator[SEP] operator[SEP] identifier[feAlphabet] operator[SEP] identifier[stopGrowth] operator[SEP] operator[SEP] operator[SEP] } identifier[numTemplates] operator[=] identifier[templates] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[included] operator[=] Keyword[new] Keyword[boolean] operator[SEP] identifier[numTemplates] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[t] operator[=] Other[0] operator[SEP] identifier[t] operator[<] identifier[numTemplates] operator[SEP] identifier[t] operator[++] operator[SEP] { identifier[FactorTemplate] identifier[template] operator[=] identifier[templates] operator[SEP] identifier[get] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[int] identifier[numConfigs] operator[=] identifier[template] operator[SEP] identifier[getNumConfigs] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[numFeats] operator[=] identifier[template] operator[SEP] identifier[getAlphabet] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[included] operator[SEP] identifier[t] operator[SEP] operator[=] Keyword[new] Keyword[boolean] operator[SEP] identifier[numConfigs] operator[SEP] operator[SEP] identifier[numFeats] operator[SEP] operator[SEP] } identifier[BoolArrays] operator[SEP] identifier[fill] operator[SEP] identifier[included] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[prm] operator[SEP] identifier[featCountCutoff] operator[>=] Other[1] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[prm] operator[SEP] identifier[featCountCutoff] operator[SEP] operator[SEP] identifier[IntIntDenseVector] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[counts] operator[=] identifier[countFeatures] operator[SEP] identifier[data] , identifier[templates] operator[SEP] operator[SEP] identifier[excludeByFeatCount] operator[SEP] identifier[counts] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[t] operator[=] Other[0] operator[SEP] identifier[t] operator[<] identifier[included] operator[SEP] identifier[length] operator[SEP] identifier[t] operator[++] operator[SEP] { identifier[FactorTemplate] identifier[template] operator[=] identifier[templates] operator[SEP] identifier[get] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[FeatureNames] identifier[alphabet] operator[=] identifier[template] operator[SEP] identifier[getAlphabet] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operator[<] identifier[alphabet] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[k] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[alphabet] operator[SEP] identifier[isBiasFeature] operator[SEP] identifier[k] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[c] operator[=] Other[0] operator[SEP] identifier[c] operator[<] identifier[included] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[length] operator[SEP] identifier[c] operator[++] operator[SEP] { identifier[included] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[k] operator[SEP] operator[=] literal[boolean] operator[SEP] } } } } identifier[numParams] operator[=] identifier[feAlphabet] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[indices] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[numTemplates] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[t] operator[=] Other[0] operator[SEP] identifier[t] operator[<] identifier[indices] operator[SEP] identifier[length] operator[SEP] identifier[t] operator[++] operator[SEP] { identifier[FactorTemplate] identifier[template] operator[=] identifier[templates] operator[SEP] identifier[get] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[int] identifier[numConfigs] operator[=] identifier[template] operator[SEP] identifier[getNumConfigs] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[numFeats] operator[=] identifier[template] operator[SEP] identifier[getAlphabet] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[indices] operator[SEP] identifier[t] operator[SEP] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[numConfigs] operator[SEP] operator[SEP] identifier[numFeats] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[c] operator[=] Other[0] operator[SEP] identifier[c] operator[<] identifier[indices] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[length] operator[SEP] identifier[c] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operator[<] identifier[indices] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[length] operator[SEP] identifier[k] operator[++] operator[SEP] { identifier[indices] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[k] operator[SEP] operator[=] identifier[included] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[k] operator[SEP] operator[?] identifier[numParams] operator[++] operator[:] operator[-] Other[1] operator[SEP] } } } identifier[reservedOffset] operator[=] identifier[numParams] operator[SEP] identifier[numParams] operator[+=] identifier[reservedMax] operator[SEP] Keyword[if] operator[SEP] identifier[reservedMax] operator[>] Other[0] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[reservedMax] , identifier[reservedOffset] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[fcmAlphabet] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[fcmAlphabet] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[fcmAlphabet] operator[SEP] identifier[stopGrowth] operator[SEP] operator[SEP] operator[SEP] identifier[numParams] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[numParams] , identifier[featureHashModMax] operator[SEP] operator[SEP] identifier[initialized] operator[=] literal[boolean] operator[SEP] }
@Override public void put(String key, String val) { if (key == null) { throw new IllegalArgumentException("key cannot be null"); } Map<String, String> map = inheritableThreadLocal.get(); if (map == null) { map = new HashMap<>(); inheritableThreadLocal.set(map); } map.put(key, val); }
class class_name[name] begin[{] method[put, return_type[void], modifier[public], parameter[key, val]] begin[{] if[binary_operation[member[.key], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="key cannot 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) else begin[{] None end[}] local_variable[type[Map], map] if[binary_operation[member[.map], ==, literal[null]]] begin[{] assign[member[.map], 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))] call[inheritableThreadLocal.set, parameter[member[.map]]] else begin[{] None end[}] call[map.put, parameter[member[.key], member[.val]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[val] operator[SEP] { 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[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[map] operator[=] identifier[inheritableThreadLocal] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[map] operator[==] Other[null] operator[SEP] { identifier[map] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[inheritableThreadLocal] operator[SEP] identifier[set] operator[SEP] identifier[map] operator[SEP] operator[SEP] } identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[val] operator[SEP] operator[SEP] }
protected void add(ManagedObject managedObject, Transaction transaction, long logSpaceReservedDelta) throws ObjectManagerException { final String methodName = "add"; if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass, methodName, new Object[] { managedObject, transaction, new Long(logSpaceReservedDelta) }); // We should not call ManagedObject add/delete/replace etc methods with the transaction lock held // because some of these call transaction.lock() which might wait(), thus stalling the checkpoint // as it tries to get the transaction lock. // Make the ManagedObject ready for an addition, // give it a chance to blow up in anything is wrong. If it turns out that this is the wrong transaction // we will call postAdd after we have taken the lock on this transaction. managedObject.preAdd(transaction); // Changes may be made to these objects after this point, however they will not be restored, // we record the object at this point in time. // We have to allow for some other transaction to modify the object between the end of this transaction and // when we actually write it to the ObjectStore, using optimisticReplace. // We address this by keeping a copy of the serialised immage of the object when we create the // log record along with the logSequenceNumber when we write it. // A higher level lock, such as synchronizing on LinkedList must protect against our capturing the wrong // serialized version of the ManagedObject. // We do not add the ManagedObject to the ObjectStore now because the ObjectStore might force it to disk // before we force the log. This would leave us with no way of recovering if we crashed in that state. // We get the serializedBytes before taking the lock on the transaction bacause any stall in the // ObjectStore.reserve() call would block the checkpoint. ObjectManagerByteArrayOutputStream serializedBytes = null; try { if (managedObject.owningToken.getObjectStore().getUsesSerializedForm()) serializedBytes = managedObject.getSerializedBytes(); } catch (ObjectManagerException exception) { // No FFDC Code Needed. // Drive the postAdd method for the object. managedObject.postAdd(transaction, false); if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.exit(this, cclass, methodName, new Object[] { exception }); throw exception; } // try... synchronized (this) { // To defend against two application threads completing the same transaction and trying to // continue with it at the same time we check that the Transaction still refers to this one, // now that we are synchronized on the InternalTransaction. if (transaction.internalTransaction != this) { managedObject.postAdd(transaction, false); if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.exit(this, cclass, methodName, new Object[] { "via InvalidTransactionException", transaction.internalTransaction }); // Same behaviour as if the transaction was completed and replaced by // objectManagerState.dummyInternalTransaction. throw new InvalidStateException(this, InternalTransaction.stateTerminated, InternalTransaction.stateNames[InternalTransaction.stateTerminated]); } // if (transaction.internalTransaction != this). // Is data logging required for this object in order too recover it? // Non persistent objects that are within the scope of the transaction do not // require logging. This is because we reconstruct their state from other // objects at restart or because their state is restablished at restart in some other way, // for example, we might delete them on restart. // We write the log record now but dont actually write to the ObjectStore until // the transaction has commited. The actual ObjectStore write to disk happens even // later when the object store is flushed. long logSequenceNumber; // This try block catches any fatal error that causes us to fail to write the transaction // log or reserve space in the Objectstores. try { if (managedObject.owningToken.getObjectStore().getPersistence()) { testState(nextStateForInvolvePersistentObject); logSpaceReservedDelta = logSpaceReservedDelta + Token.maximumSerializedSize(); if (logSpaceReserved == 0) logSpaceReservedDelta = logSpaceReservedDelta + logSpaceReservedOverhead; TransactionAddLogRecord transactionAddLogRecord = new TransactionAddLogRecord(this, managedObject.owningToken, serializedBytes); // If we throw an exception in here no state change has been done. logSequenceNumber = objectManagerState.logOutput.writeNext(transactionAddLogRecord, logSpaceReservedDelta, true, false); setState(nextStateForInvolvePersistentObject); // Make the state change. logSpaceReserved = logSpaceReserved + logSpaceReservedDelta; // Remember what we logged in case we commit this version of the ManagedObject. loggedSerializedBytes.put(managedObject.owningToken, serializedBytes); } else { // if (tokenToAdd.getObjectstore().getPersistence()). setState(nextStateForInvolveNonPersistentObject); // Make the state change. logSequenceNumber = objectManagerState.getDummyLogSequenceNumber(); // Do we need to capture the serialized form of the ManagedObject for the ObjectStore? if (managedObject.owningToken.getObjectStore().getUsesSerializedForm()) { // Remember what we would have logged in case we commit this version of the ManagedObject. loggedSerializedBytes.put(managedObject.owningToken, serializedBytes); } // if (managedObject.owningToken.getObjectStore().getUsesSerializedForm()). } // If Non Persistent. } catch (ObjectManagerException exception) { // The write was not done. // No FFDC Code Needed. ObjectManager.ffdc.processException(this, cclass, methodName, exception, "1:860:1.41"); // Drive the postadd method for the object. managedObject.postAdd(transaction, false); if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.exit(this, cclass, methodName, new Object[] { exception }); throw exception; } // try... // The ManagedObject is now included in the transaction. includedManagedObjects.put(managedObject.owningToken, managedObject); // Remember which logSequenceNumber was used when we logged the ManagedObject. logSequenceNumbers.put(managedObject.owningToken, new Long(logSequenceNumber)); managedObjectSequenceNumbers.put(managedObject.owningToken, new Long(managedObject.getUpdateSequence())); } // synchronized (this). // Drive the postAdd method for the object. managedObject.postAdd(transaction, true); if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.exit(this, cclass, methodName); }
class class_name[name] begin[{] method[add, return_type[void], modifier[protected], parameter[managedObject, transaction, logSpaceReservedDelta]] begin[{] local_variable[type[String], methodName] if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryEnabled, parameter[]]]] begin[{] call[trace.entry, parameter[THIS[], member[.cclass], member[.methodName], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=managedObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=logSpaceReservedDelta, 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=Long, sub_type=None))]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] call[managedObject.preAdd, parameter[member[.transaction]]] local_variable[type[ObjectManagerByteArrayOutputStream], serializedBytes] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=getObjectStore, postfix_operators=[], prefix_operators=[], qualifier=managedObject.owningToken, selectors=[MethodInvocation(arguments=[], member=getUsesSerializedForm, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=serializedBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getSerializedBytes, postfix_operators=[], prefix_operators=[], qualifier=managedObject, selectors=[], type_arguments=None)), label=None))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=postAdd, postfix_operators=[], prefix_operators=[], qualifier=managedObject, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=Tracing, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEntryEnabled, postfix_operators=[], prefix_operators=[], qualifier=trace, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=cclass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=exit, postfix_operators=[], prefix_operators=[], qualifier=trace, selectors=[], type_arguments=None), label=None)), ThrowStatement(expression=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['ObjectManagerException']))], finally_block=None, label=None, resources=None) SYNCHRONIZED[THIS[]] BEGIN[{] if[binary_operation[member[transaction.internalTransaction], !=, THIS[]]] begin[{] call[managedObject.postAdd, parameter[member[.transaction], literal[false]]] if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryEnabled, parameter[]]]] begin[{] call[trace.exit, parameter[THIS[], member[.cclass], member[.methodName], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="via InvalidTransactionException"), MemberReference(member=internalTransaction, postfix_operators=[], prefix_operators=[], qualifier=transaction, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=stateTerminated, postfix_operators=[], prefix_operators=[], qualifier=InternalTransaction, selectors=[]), MemberReference(member=stateNames, postfix_operators=[], prefix_operators=[], qualifier=InternalTransaction, selectors=[ArraySelector(index=MemberReference(member=stateTerminated, postfix_operators=[], prefix_operators=[], qualifier=InternalTransaction, selectors=[]))])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidStateException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[long], logSequenceNumber] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=getObjectStore, postfix_operators=[], prefix_operators=[], qualifier=managedObject.owningToken, selectors=[MethodInvocation(arguments=[], member=getPersistence, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nextStateForInvolveNonPersistentObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=logSequenceNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getDummyLogSequenceNumber, postfix_operators=[], prefix_operators=[], qualifier=objectManagerState, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=getObjectStore, postfix_operators=[], prefix_operators=[], qualifier=managedObject.owningToken, selectors=[MethodInvocation(arguments=[], member=getUsesSerializedForm, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=owningToken, postfix_operators=[], prefix_operators=[], qualifier=managedObject, selectors=[]), MemberReference(member=serializedBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=loggedSerializedBytes, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nextStateForInvolvePersistentObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=testState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=logSpaceReservedDelta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=logSpaceReservedDelta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=maximumSerializedSize, postfix_operators=[], prefix_operators=[], qualifier=Token, selectors=[], type_arguments=None), operator=+)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=logSpaceReserved, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=logSpaceReservedDelta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=logSpaceReservedDelta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=logSpaceReservedOverhead, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=owningToken, postfix_operators=[], prefix_operators=[], qualifier=managedObject, selectors=[]), MemberReference(member=serializedBytes, 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=TransactionAddLogRecord, sub_type=None)), name=transactionAddLogRecord)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TransactionAddLogRecord, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=logSequenceNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=transactionAddLogRecord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=logSpaceReservedDelta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=writeNext, postfix_operators=[], prefix_operators=[], qualifier=objectManagerState.logOutput, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nextStateForInvolvePersistentObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=logSpaceReserved, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=logSpaceReserved, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=logSpaceReservedDelta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=owningToken, postfix_operators=[], prefix_operators=[], qualifier=managedObject, selectors=[]), MemberReference(member=serializedBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=loggedSerializedBytes, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=cclass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:860:1.41")], member=processException, postfix_operators=[], prefix_operators=[], qualifier=ObjectManager.ffdc, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=postAdd, postfix_operators=[], prefix_operators=[], qualifier=managedObject, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=Tracing, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEntryEnabled, postfix_operators=[], prefix_operators=[], qualifier=trace, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=cclass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=exit, postfix_operators=[], prefix_operators=[], qualifier=trace, selectors=[], type_arguments=None), label=None)), ThrowStatement(expression=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['ObjectManagerException']))], finally_block=None, label=None, resources=None) call[includedManagedObjects.put, parameter[member[managedObject.owningToken], member[.managedObject]]] call[logSequenceNumbers.put, parameter[member[managedObject.owningToken], ClassCreator(arguments=[MemberReference(member=logSequenceNumber, 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=Long, sub_type=None))]] call[managedObjectSequenceNumbers.put, parameter[member[managedObject.owningToken], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getUpdateSequence, postfix_operators=[], prefix_operators=[], qualifier=managedObject, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Long, sub_type=None))]] END[}] call[managedObject.postAdd, parameter[member[.transaction], literal[true]]] if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryEnabled, parameter[]]]] begin[{] call[trace.exit, parameter[THIS[], member[.cclass], member[.methodName]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[add] operator[SEP] identifier[ManagedObject] identifier[managedObject] , identifier[Transaction] identifier[transaction] , Keyword[long] identifier[logSpaceReservedDelta] operator[SEP] Keyword[throws] identifier[ObjectManagerException] { Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[Tracing] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[trace] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[trace] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[cclass] , identifier[methodName] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[managedObject] , identifier[transaction] , Keyword[new] identifier[Long] operator[SEP] identifier[logSpaceReservedDelta] operator[SEP] } operator[SEP] operator[SEP] identifier[managedObject] operator[SEP] identifier[preAdd] operator[SEP] identifier[transaction] operator[SEP] operator[SEP] identifier[ObjectManagerByteArrayOutputStream] identifier[serializedBytes] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[managedObject] operator[SEP] identifier[owningToken] operator[SEP] identifier[getObjectStore] operator[SEP] operator[SEP] operator[SEP] identifier[getUsesSerializedForm] operator[SEP] operator[SEP] operator[SEP] identifier[serializedBytes] operator[=] identifier[managedObject] operator[SEP] identifier[getSerializedBytes] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ObjectManagerException] identifier[exception] operator[SEP] { identifier[managedObject] operator[SEP] identifier[postAdd] operator[SEP] identifier[transaction] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Tracing] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[trace] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[trace] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[cclass] , identifier[methodName] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[exception] } operator[SEP] operator[SEP] Keyword[throw] identifier[exception] operator[SEP] } Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] identifier[transaction] operator[SEP] identifier[internalTransaction] operator[!=] Keyword[this] operator[SEP] { identifier[managedObject] operator[SEP] identifier[postAdd] operator[SEP] identifier[transaction] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Tracing] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[trace] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[trace] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[cclass] , identifier[methodName] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] , identifier[transaction] operator[SEP] identifier[internalTransaction] } operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[InvalidStateException] operator[SEP] Keyword[this] , identifier[InternalTransaction] operator[SEP] identifier[stateTerminated] , identifier[InternalTransaction] operator[SEP] identifier[stateNames] operator[SEP] identifier[InternalTransaction] operator[SEP] identifier[stateTerminated] operator[SEP] operator[SEP] operator[SEP] } Keyword[long] identifier[logSequenceNumber] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[managedObject] operator[SEP] identifier[owningToken] operator[SEP] identifier[getObjectStore] operator[SEP] operator[SEP] operator[SEP] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] { identifier[testState] operator[SEP] identifier[nextStateForInvolvePersistentObject] operator[SEP] operator[SEP] identifier[logSpaceReservedDelta] operator[=] identifier[logSpaceReservedDelta] operator[+] identifier[Token] operator[SEP] identifier[maximumSerializedSize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[logSpaceReserved] operator[==] Other[0] operator[SEP] identifier[logSpaceReservedDelta] operator[=] identifier[logSpaceReservedDelta] operator[+] identifier[logSpaceReservedOverhead] operator[SEP] identifier[TransactionAddLogRecord] identifier[transactionAddLogRecord] operator[=] Keyword[new] identifier[TransactionAddLogRecord] operator[SEP] Keyword[this] , identifier[managedObject] operator[SEP] identifier[owningToken] , identifier[serializedBytes] operator[SEP] operator[SEP] identifier[logSequenceNumber] operator[=] identifier[objectManagerState] operator[SEP] identifier[logOutput] operator[SEP] identifier[writeNext] operator[SEP] identifier[transactionAddLogRecord] , identifier[logSpaceReservedDelta] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[setState] operator[SEP] identifier[nextStateForInvolvePersistentObject] operator[SEP] operator[SEP] identifier[logSpaceReserved] operator[=] identifier[logSpaceReserved] operator[+] identifier[logSpaceReservedDelta] operator[SEP] identifier[loggedSerializedBytes] operator[SEP] identifier[put] operator[SEP] identifier[managedObject] operator[SEP] identifier[owningToken] , identifier[serializedBytes] operator[SEP] operator[SEP] } Keyword[else] { identifier[setState] operator[SEP] identifier[nextStateForInvolveNonPersistentObject] operator[SEP] operator[SEP] identifier[logSequenceNumber] operator[=] identifier[objectManagerState] operator[SEP] identifier[getDummyLogSequenceNumber] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[managedObject] operator[SEP] identifier[owningToken] operator[SEP] identifier[getObjectStore] operator[SEP] operator[SEP] operator[SEP] identifier[getUsesSerializedForm] operator[SEP] operator[SEP] operator[SEP] { identifier[loggedSerializedBytes] operator[SEP] identifier[put] operator[SEP] identifier[managedObject] operator[SEP] identifier[owningToken] , identifier[serializedBytes] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[ObjectManagerException] identifier[exception] operator[SEP] { identifier[ObjectManager] operator[SEP] identifier[ffdc] operator[SEP] identifier[processException] operator[SEP] Keyword[this] , identifier[cclass] , identifier[methodName] , identifier[exception] , literal[String] operator[SEP] operator[SEP] identifier[managedObject] operator[SEP] identifier[postAdd] operator[SEP] identifier[transaction] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Tracing] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[trace] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[trace] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[cclass] , identifier[methodName] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[exception] } operator[SEP] operator[SEP] Keyword[throw] identifier[exception] operator[SEP] } identifier[includedManagedObjects] operator[SEP] identifier[put] operator[SEP] identifier[managedObject] operator[SEP] identifier[owningToken] , identifier[managedObject] operator[SEP] operator[SEP] identifier[logSequenceNumbers] operator[SEP] identifier[put] operator[SEP] identifier[managedObject] operator[SEP] identifier[owningToken] , Keyword[new] identifier[Long] operator[SEP] identifier[logSequenceNumber] operator[SEP] operator[SEP] operator[SEP] identifier[managedObjectSequenceNumbers] operator[SEP] identifier[put] operator[SEP] identifier[managedObject] operator[SEP] identifier[owningToken] , Keyword[new] identifier[Long] operator[SEP] identifier[managedObject] operator[SEP] identifier[getUpdateSequence] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[managedObject] operator[SEP] identifier[postAdd] operator[SEP] identifier[transaction] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Tracing] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[trace] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[trace] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[cclass] , identifier[methodName] operator[SEP] operator[SEP] }
@Override public int read() throws IOException, StreamIntegrityException { if (trailerIn == null) { initializeStream(); } int result = pushbackInputStream.read(); return completeRead(result); }
class class_name[name] begin[{] method[read, return_type[type[int]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.trailerIn], ==, literal[null]]] begin[{] call[.initializeStream, parameter[]] else begin[{] None end[}] local_variable[type[int], result] return[call[.completeRead, parameter[member[.result]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[read] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[StreamIntegrityException] { Keyword[if] operator[SEP] identifier[trailerIn] operator[==] Other[null] operator[SEP] { identifier[initializeStream] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[result] operator[=] identifier[pushbackInputStream] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[completeRead] operator[SEP] identifier[result] operator[SEP] operator[SEP] }
@Override public DescribeStackSetResult describeStackSet(DescribeStackSetRequest request) { request = beforeClientExecution(request); return executeDescribeStackSet(request); }
class class_name[name] begin[{] method[describeStackSet, return_type[type[DescribeStackSetResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDescribeStackSet, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DescribeStackSetResult] identifier[describeStackSet] operator[SEP] identifier[DescribeStackSetRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDescribeStackSet] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static void assertThrows(String message, Class<? extends Exception> exceptionClass, Runnable runnable) { try { runnable.run(); fail(message, "No exception was thrown (expected " + exceptionClass.getSimpleName() + ")"); } catch (Exception e) { if (!e.getClass().equals(exceptionClass)) { fail(message, e.getClass().getSimpleName() + " was thrown instead of " + exceptionClass.getSimpleName()); } } pass(message); }
class class_name[name] begin[{] method[assertThrows, return_type[void], modifier[public static], parameter[message, exceptionClass, runnable]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=run, postfix_operators=[], prefix_operators=[], qualifier=runnable, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No exception was thrown (expected "), operandr=MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=[], prefix_operators=[], qualifier=exceptionClass, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=")"), operator=+)], member=fail, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=['!'], qualifier=e, selectors=[MethodInvocation(arguments=[MemberReference(member=exceptionClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" was thrown instead of "), operator=+), operandr=MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=[], prefix_operators=[], qualifier=exceptionClass, selectors=[], type_arguments=None), operator=+)], member=fail, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) call[.pass, parameter[member[.message]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[assertThrows] operator[SEP] identifier[String] identifier[message] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Exception] operator[>] identifier[exceptionClass] , identifier[Runnable] identifier[runnable] operator[SEP] { Keyword[try] { identifier[runnable] operator[SEP] identifier[run] operator[SEP] operator[SEP] operator[SEP] identifier[fail] operator[SEP] identifier[message] , literal[String] operator[+] identifier[exceptionClass] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[e] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[exceptionClass] operator[SEP] operator[SEP] { identifier[fail] operator[SEP] identifier[message] , identifier[e] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[exceptionClass] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[pass] operator[SEP] identifier[message] operator[SEP] operator[SEP] }
public static boolean isSegmentFile(String journalName, String fileName) { checkNotNull(journalName, "journalName cannot be null"); checkNotNull(fileName, "fileName cannot be null"); int partSeparator = fileName.lastIndexOf(PART_SEPARATOR); int extensionSeparator = fileName.lastIndexOf(EXTENSION_SEPARATOR); if (extensionSeparator == -1 || partSeparator == -1 || extensionSeparator < partSeparator || !fileName.endsWith(EXTENSION)) { return false; } for (int i = partSeparator + 1; i < extensionSeparator; i++) { if (!Character.isDigit(fileName.charAt(i))) { return false; } } return fileName.startsWith(journalName); }
class class_name[name] begin[{] method[isSegmentFile, return_type[type[boolean]], modifier[public static], parameter[journalName, fileName]] begin[{] call[.checkNotNull, parameter[member[.journalName], literal["journalName cannot be null"]]] call[.checkNotNull, parameter[member[.fileName], literal["fileName cannot be null"]]] local_variable[type[int], partSeparator] local_variable[type[int], extensionSeparator] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.extensionSeparator], ==, literal[1]], ||, binary_operation[member[.partSeparator], ==, literal[1]]], ||, binary_operation[member[.extensionSeparator], <, member[.partSeparator]]], ||, call[fileName.endsWith, parameter[member[.EXTENSION]]]]] begin[{] return[literal[false]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=fileName, selectors=[], type_arguments=None)], member=isDigit, postfix_operators=[], prefix_operators=['!'], qualifier=Character, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=extensionSeparator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=partSeparator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[fileName.startsWith, parameter[member[.journalName]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isSegmentFile] operator[SEP] identifier[String] identifier[journalName] , identifier[String] identifier[fileName] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[journalName] , literal[String] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[fileName] , literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[partSeparator] operator[=] identifier[fileName] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[PART_SEPARATOR] operator[SEP] operator[SEP] Keyword[int] identifier[extensionSeparator] operator[=] identifier[fileName] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[EXTENSION_SEPARATOR] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[extensionSeparator] operator[==] operator[-] Other[1] operator[||] identifier[partSeparator] operator[==] operator[-] Other[1] operator[||] identifier[extensionSeparator] operator[<] identifier[partSeparator] operator[||] operator[!] identifier[fileName] operator[SEP] identifier[endsWith] operator[SEP] identifier[EXTENSION] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[partSeparator] operator[+] Other[1] operator[SEP] identifier[i] operator[<] identifier[extensionSeparator] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[Character] operator[SEP] identifier[isDigit] operator[SEP] identifier[fileName] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] identifier[fileName] operator[SEP] identifier[startsWith] operator[SEP] identifier[journalName] operator[SEP] operator[SEP] }
public Element getById(Element id, String childName) throws Exception { return getById(doc.getDocumentElement(), id, childName); }
class class_name[name] begin[{] method[getById, return_type[type[Element]], modifier[public], parameter[id, childName]] begin[{] return[call[.getById, parameter[call[doc.getDocumentElement, parameter[]], member[.id], member[.childName]]]] end[}] END[}]
Keyword[public] identifier[Element] identifier[getById] operator[SEP] identifier[Element] identifier[id] , identifier[String] identifier[childName] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[return] identifier[getById] operator[SEP] identifier[doc] operator[SEP] identifier[getDocumentElement] operator[SEP] operator[SEP] , identifier[id] , identifier[childName] operator[SEP] operator[SEP] }
private JPanel getUrlPanel() { if (urlPanel == null) { GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints1.gridy = 0; gridBagConstraints1.weightx = 1.0; gridBagConstraints1.gridx = 1; GridBagConstraints gridBagConstraints7 = new GridBagConstraints(); gridBagConstraints7.gridx = 3; gridBagConstraints7.insets = new Insets(0, 0, 0, 7); gridBagConstraints7.gridy = 0; GridBagConstraints gridBagConstraints6 = new GridBagConstraints(); gridBagConstraints6.gridx = 2; gridBagConstraints6.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints6.gridy = 0; gridBagConstraints6.weightx = 1.0; gridBagConstraints6.insets = new java.awt.Insets(0,5,0,5); GridBagConstraints gridBagConstraints5 = new GridBagConstraints(); gridBagConstraints5.gridy = 0; gridBagConstraints5.anchor = java.awt.GridBagConstraints.CENTER; gridBagConstraints5.insets = new Insets(0, 6, 0, 5); gridBagConstraints5.gridx = 1; jLabel = new JLabel(); jLabel.setText("Location :"); urlPanel = new JPanel(); urlPanel.setLayout(new GridBagLayout()); GridBagConstraints gbc_backButton = new GridBagConstraints(); gbc_backButton.insets = new Insets(0, 0, 5, 5); gbc_backButton.gridx = 0; gbc_backButton.gridy = 0; urlPanel.add(getBackButton(), gbc_backButton); urlPanel.add(jLabel, gridBagConstraints5); urlPanel.add(getUrlText(), gridBagConstraints6); urlPanel.add(getOkButton(), gridBagConstraints7); } return urlPanel; }
class class_name[name] begin[{] method[getUrlPanel, return_type[type[JPanel]], modifier[private], parameter[]] begin[{] if[binary_operation[member[.urlPanel], ==, literal[null]]] begin[{] local_variable[type[GridBagConstraints], gridBagConstraints1] assign[member[gridBagConstraints1.fill], member[java.awt.GridBagConstraints.HORIZONTAL]] assign[member[gridBagConstraints1.gridy], literal[0]] assign[member[gridBagConstraints1.weightx], literal[1.0]] assign[member[gridBagConstraints1.gridx], literal[1]] local_variable[type[GridBagConstraints], gridBagConstraints7] assign[member[gridBagConstraints7.gridx], literal[3]] assign[member[gridBagConstraints7.insets], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))] assign[member[gridBagConstraints7.gridy], literal[0]] local_variable[type[GridBagConstraints], gridBagConstraints6] assign[member[gridBagConstraints6.gridx], literal[2]] assign[member[gridBagConstraints6.fill], member[java.awt.GridBagConstraints.HORIZONTAL]] assign[member[gridBagConstraints6.gridy], literal[0]] assign[member[gridBagConstraints6.weightx], literal[1.0]] assign[member[gridBagConstraints6.insets], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))))] local_variable[type[GridBagConstraints], gridBagConstraints5] assign[member[gridBagConstraints5.gridy], literal[0]] assign[member[gridBagConstraints5.anchor], member[java.awt.GridBagConstraints.CENTER]] assign[member[gridBagConstraints5.insets], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), 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=Insets, sub_type=None))] assign[member[gridBagConstraints5.gridx], literal[1]] assign[member[.jLabel], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))] call[jLabel.setText, parameter[literal["Location :"]]] assign[member[.urlPanel], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JPanel, sub_type=None))] call[urlPanel.setLayout, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GridBagLayout, sub_type=None))]] local_variable[type[GridBagConstraints], gbc_backButton] assign[member[gbc_backButton.insets], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), 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=Insets, sub_type=None))] assign[member[gbc_backButton.gridx], literal[0]] assign[member[gbc_backButton.gridy], literal[0]] call[urlPanel.add, parameter[call[.getBackButton, parameter[]], member[.gbc_backButton]]] call[urlPanel.add, parameter[member[.jLabel], member[.gridBagConstraints5]]] call[urlPanel.add, parameter[call[.getUrlText, parameter[]], member[.gridBagConstraints6]]] call[urlPanel.add, parameter[call[.getOkButton, parameter[]], member[.gridBagConstraints7]]] else begin[{] None end[}] return[member[.urlPanel]] end[}] END[}]
Keyword[private] identifier[JPanel] identifier[getUrlPanel] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[urlPanel] operator[==] Other[null] operator[SEP] { identifier[GridBagConstraints] identifier[gridBagConstraints1] operator[=] Keyword[new] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[gridBagConstraints1] operator[SEP] identifier[fill] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] identifier[HORIZONTAL] operator[SEP] identifier[gridBagConstraints1] operator[SEP] identifier[gridy] operator[=] Other[0] operator[SEP] identifier[gridBagConstraints1] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[gridBagConstraints1] operator[SEP] identifier[gridx] operator[=] Other[1] operator[SEP] identifier[GridBagConstraints] identifier[gridBagConstraints7] operator[=] Keyword[new] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[gridBagConstraints7] operator[SEP] identifier[gridx] operator[=] Other[3] operator[SEP] identifier[gridBagConstraints7] operator[SEP] identifier[insets] operator[=] Keyword[new] identifier[Insets] operator[SEP] Other[0] , Other[0] , Other[0] , Other[7] operator[SEP] operator[SEP] identifier[gridBagConstraints7] operator[SEP] identifier[gridy] operator[=] Other[0] operator[SEP] identifier[GridBagConstraints] identifier[gridBagConstraints6] operator[=] Keyword[new] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[gridBagConstraints6] operator[SEP] identifier[gridx] operator[=] Other[2] operator[SEP] identifier[gridBagConstraints6] operator[SEP] identifier[fill] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] identifier[HORIZONTAL] operator[SEP] identifier[gridBagConstraints6] operator[SEP] identifier[gridy] operator[=] Other[0] operator[SEP] identifier[gridBagConstraints6] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[gridBagConstraints6] operator[SEP] identifier[insets] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Insets] operator[SEP] Other[0] , Other[5] , Other[0] , Other[5] operator[SEP] operator[SEP] identifier[GridBagConstraints] identifier[gridBagConstraints5] operator[=] Keyword[new] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[gridBagConstraints5] operator[SEP] identifier[gridy] operator[=] Other[0] operator[SEP] identifier[gridBagConstraints5] operator[SEP] identifier[anchor] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] identifier[CENTER] operator[SEP] identifier[gridBagConstraints5] operator[SEP] identifier[insets] operator[=] Keyword[new] identifier[Insets] operator[SEP] Other[0] , Other[6] , Other[0] , Other[5] operator[SEP] operator[SEP] identifier[gridBagConstraints5] operator[SEP] identifier[gridx] operator[=] Other[1] operator[SEP] identifier[jLabel] operator[=] Keyword[new] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[jLabel] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[urlPanel] operator[=] Keyword[new] identifier[JPanel] operator[SEP] operator[SEP] operator[SEP] identifier[urlPanel] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[GridBagLayout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[GridBagConstraints] identifier[gbc_backButton] operator[=] Keyword[new] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[gbc_backButton] operator[SEP] identifier[insets] operator[=] Keyword[new] identifier[Insets] operator[SEP] Other[0] , Other[0] , Other[5] , Other[5] operator[SEP] operator[SEP] identifier[gbc_backButton] operator[SEP] identifier[gridx] operator[=] Other[0] operator[SEP] identifier[gbc_backButton] operator[SEP] identifier[gridy] operator[=] Other[0] operator[SEP] identifier[urlPanel] operator[SEP] identifier[add] operator[SEP] identifier[getBackButton] operator[SEP] operator[SEP] , identifier[gbc_backButton] operator[SEP] operator[SEP] identifier[urlPanel] operator[SEP] identifier[add] operator[SEP] identifier[jLabel] , identifier[gridBagConstraints5] operator[SEP] operator[SEP] identifier[urlPanel] operator[SEP] identifier[add] operator[SEP] identifier[getUrlText] operator[SEP] operator[SEP] , identifier[gridBagConstraints6] operator[SEP] operator[SEP] identifier[urlPanel] operator[SEP] identifier[add] operator[SEP] identifier[getOkButton] operator[SEP] operator[SEP] , identifier[gridBagConstraints7] operator[SEP] operator[SEP] } Keyword[return] identifier[urlPanel] operator[SEP] }
@Override public final void replicate( final Map<String, Object> pAddParams) throws Exception { Writer htmlWriter = (Writer) pAddParams.get("htmlWriter"); try { //URL must be String urlSourceStr = "https://" + (String) pAddParams.get("urlSource"); if (urlSourceStr == null || urlSourceStr.length() < 10) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "Where is no urlSource!!!"); } URL url = new URL(urlSourceStr); String authMethod = (String) pAddParams.get("authMethod"); if ("base".equals(authMethod)) { final String userName = (String) pAddParams.get("userName"); final String userPass = (String) pAddParams.get("userPass"); Authenticator.setDefault(new Authenticator() { @Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(userName, userPass.toCharArray()); } }); } else if ("form".equals(authMethod)) { CookieManager cookieManager = new CookieManager(); CookieHandler.setDefault(cookieManager); cookieManager.setCookiePolicy(CookiePolicy.ACCEPT_ALL); requestCookiesGet(pAddParams); authForm(pAddParams, cookieManager); } Map<String, Integer> classesCounts = makeJob(url, pAddParams); if (htmlWriter != null) { String statusString = ", replication has been done."; htmlWriter.write("<h4>" + new Date().toString() + statusString + "</h4>"); pAddParams.put("statusString", new Date().toString() + ", " + ReplicatorXmlHttp.class.getSimpleName() + statusString); this.logger.info(null, ReplicatorXmlHttp.class, statusString); htmlWriter.write("<table>"); htmlWriter.write("<tr><th style=\"padding: 5px;\">Class</th><th style=\"padding: 5px;\">Total records</th></tr>"); for (Map.Entry<String, Integer> entry : classesCounts.entrySet()) { htmlWriter.write("<tr>"); htmlWriter.write("<td>" + entry.getKey() + "</td>"); htmlWriter.write("<td>" + entry.getValue() + "</td>"); htmlWriter.write("</tr>"); } htmlWriter.write("</table>"); } } catch (ExceptionWithCode ex) { if (htmlWriter != null) { htmlWriter.write(new Date().toString() + ", " + ReplicatorXmlHttp.class.getSimpleName() + ", " + ex.getShortMessage()); } this.logger.error(null, ReplicatorXmlHttp.class, ex.getShortMessage()); throw ex; } }
class class_name[name] begin[{] method[replicate, return_type[void], modifier[final public], parameter[pAddParams]] begin[{] local_variable[type[Writer], htmlWriter] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="https://"), operandr=Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="urlSource")], member=get, postfix_operators=[], prefix_operators=[], qualifier=pAddParams, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), operator=+), name=urlSourceStr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=urlSourceStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=urlSourceStr, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), operator=<), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=WRONG_PARAMETER, postfix_operators=[], prefix_operators=[], qualifier=ExceptionWithCode, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Where is no urlSource!!!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ExceptionWithCode, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=urlSourceStr, 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=URL, sub_type=None)), name=url)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=URL, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="authMethod")], member=get, postfix_operators=[], prefix_operators=[], qualifier=pAddParams, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=authMethod)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=authMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="base"), else_statement=IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=authMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="form"), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CookieManager, sub_type=None)), name=cookieManager)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CookieManager, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cookieManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setDefault, postfix_operators=[], prefix_operators=[], qualifier=CookieHandler, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ACCEPT_ALL, postfix_operators=[], prefix_operators=[], qualifier=CookiePolicy, selectors=[])], member=setCookiePolicy, postfix_operators=[], prefix_operators=[], qualifier=cookieManager, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pAddParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=requestCookiesGet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pAddParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cookieManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=authForm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="userName")], member=get, postfix_operators=[], prefix_operators=[], qualifier=pAddParams, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=userName)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="userPass")], member=get, postfix_operators=[], prefix_operators=[], qualifier=pAddParams, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=userPass)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=userName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=toCharArray, postfix_operators=[], prefix_operators=[], qualifier=userPass, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PasswordAuthentication, sub_type=None)), label=None)], documentation=None, modifiers={'protected'}, name=getPasswordAuthentication, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=PasswordAuthentication, sub_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=Authenticator, sub_type=None))], member=setDefault, postfix_operators=[], prefix_operators=[], qualifier=Authenticator, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pAddParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=makeJob, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=classesCounts)], 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=Map, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=htmlWriter, 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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", replication has been done."), name=statusString)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<h4>"), operandr=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None)), operator=+), operandr=MemberReference(member=statusString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="</h4>"), operator=+)], member=write, postfix_operators=[], prefix_operators=[], qualifier=htmlWriter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="statusString"), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ReplicatorXmlHttp, sub_type=None)), operator=+), operandr=MemberReference(member=statusString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=put, postfix_operators=[], prefix_operators=[], qualifier=pAddParams, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=logger, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ReplicatorXmlHttp, sub_type=None)), MemberReference(member=statusString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=info, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<table>")], member=write, postfix_operators=[], prefix_operators=[], qualifier=htmlWriter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<tr><th style=\"padding: 5px;\">Class</th><th style=\"padding: 5px;\">Total records</th></tr>")], member=write, postfix_operators=[], prefix_operators=[], qualifier=htmlWriter, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<tr>")], member=write, postfix_operators=[], prefix_operators=[], qualifier=htmlWriter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<td>"), operandr=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="</td>"), operator=+)], member=write, postfix_operators=[], prefix_operators=[], qualifier=htmlWriter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<td>"), operandr=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="</td>"), operator=+)], member=write, postfix_operators=[], prefix_operators=[], qualifier=htmlWriter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="</tr>")], member=write, postfix_operators=[], prefix_operators=[], qualifier=htmlWriter, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=classesCounts, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="</table>")], member=write, postfix_operators=[], prefix_operators=[], qualifier=htmlWriter, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=htmlWriter, 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=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ReplicatorXmlHttp, sub_type=None)), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=MethodInvocation(arguments=[], member=getShortMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), operator=+)], member=write, postfix_operators=[], prefix_operators=[], qualifier=htmlWriter, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=logger, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ReplicatorXmlHttp, sub_type=None)), MethodInvocation(arguments=[], member=getShortMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None)], member=error, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), ThrowStatement(expression=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['ExceptionWithCode']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[replicate] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParams] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Writer] identifier[htmlWriter] operator[=] operator[SEP] identifier[Writer] operator[SEP] identifier[pAddParams] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[String] identifier[urlSourceStr] operator[=] literal[String] operator[+] operator[SEP] identifier[String] operator[SEP] identifier[pAddParams] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[urlSourceStr] operator[==] Other[null] operator[||] identifier[urlSourceStr] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] Other[10] operator[SEP] { Keyword[throw] Keyword[new] identifier[ExceptionWithCode] operator[SEP] identifier[ExceptionWithCode] operator[SEP] identifier[WRONG_PARAMETER] , literal[String] operator[SEP] operator[SEP] } identifier[URL] identifier[url] operator[=] Keyword[new] identifier[URL] operator[SEP] identifier[urlSourceStr] operator[SEP] operator[SEP] identifier[String] identifier[authMethod] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[pAddParams] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[authMethod] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[userName] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[pAddParams] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[userPass] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[pAddParams] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Authenticator] operator[SEP] identifier[setDefault] operator[SEP] Keyword[new] identifier[Authenticator] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[protected] identifier[PasswordAuthentication] identifier[getPasswordAuthentication] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[PasswordAuthentication] operator[SEP] identifier[userName] , identifier[userPass] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[authMethod] operator[SEP] operator[SEP] { identifier[CookieManager] identifier[cookieManager] operator[=] Keyword[new] identifier[CookieManager] operator[SEP] operator[SEP] operator[SEP] identifier[CookieHandler] operator[SEP] identifier[setDefault] operator[SEP] identifier[cookieManager] operator[SEP] operator[SEP] identifier[cookieManager] operator[SEP] identifier[setCookiePolicy] operator[SEP] identifier[CookiePolicy] operator[SEP] identifier[ACCEPT_ALL] operator[SEP] operator[SEP] identifier[requestCookiesGet] operator[SEP] identifier[pAddParams] operator[SEP] operator[SEP] identifier[authForm] operator[SEP] identifier[pAddParams] , identifier[cookieManager] operator[SEP] operator[SEP] } identifier[Map] operator[<] identifier[String] , identifier[Integer] operator[>] identifier[classesCounts] operator[=] identifier[makeJob] operator[SEP] identifier[url] , identifier[pAddParams] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[htmlWriter] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[statusString] operator[=] literal[String] operator[SEP] identifier[htmlWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] identifier[statusString] operator[+] literal[String] operator[SEP] operator[SEP] identifier[pAddParams] operator[SEP] identifier[put] operator[SEP] literal[String] , Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[ReplicatorXmlHttp] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] identifier[statusString] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] Other[null] , identifier[ReplicatorXmlHttp] operator[SEP] Keyword[class] , identifier[statusString] operator[SEP] operator[SEP] identifier[htmlWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[htmlWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[Integer] operator[>] identifier[entry] operator[:] identifier[classesCounts] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[htmlWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[htmlWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[htmlWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[htmlWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[htmlWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[ExceptionWithCode] identifier[ex] operator[SEP] { Keyword[if] operator[SEP] identifier[htmlWriter] operator[!=] Other[null] operator[SEP] { identifier[htmlWriter] operator[SEP] identifier[write] operator[SEP] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[ReplicatorXmlHttp] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[ex] operator[SEP] identifier[getShortMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[error] operator[SEP] Other[null] , identifier[ReplicatorXmlHttp] operator[SEP] Keyword[class] , identifier[ex] operator[SEP] identifier[getShortMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] identifier[ex] operator[SEP] } }
private static void serializeString(StringBuilder builder, String str) { builder.append('"'); int last = 0; int length = str.length(); for (int i = 0; i < length; i++) { char c = str.charAt(i); String replacement; if (c < 128) { replacement = REPLACEMENT_CHARS[c]; if (replacement == null) { continue; } } else if (c == '\u2028') { replacement = "\\u2028"; } else if (c == '\u2029') { replacement = "\\u2029"; } else { continue; } if (last < i) { builder.append(str, last, i); } builder.append(replacement); last = i + 1; } if (last < length) { builder.append(str, last, length); } builder.append('"'); }
class class_name[name] begin[{] method[serializeString, return_type[void], modifier[private static], parameter[builder, str]] begin[{] call[builder.append, parameter[literal['"']]] local_variable[type[int], last] local_variable[type[int], length] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=replacement)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=128), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='
'), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='
'), operator===), else_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=replacement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\u2029")), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=replacement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\u2028")), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=replacement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=REPLACEMENT_CHARS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=replacement, 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=[ContinueStatement(goto=None, label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=replacement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[member[.last], <, member[.length]]] begin[{] call[builder.append, parameter[member[.str], member[.last], member[.length]]] else begin[{] None end[}] call[builder.append, parameter[literal['"']]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[serializeString] operator[SEP] identifier[StringBuilder] identifier[builder] , identifier[String] identifier[str] operator[SEP] { identifier[builder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[last] operator[=] Other[0] operator[SEP] Keyword[int] identifier[length] operator[=] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[char] identifier[c] operator[=] identifier[str] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[String] identifier[replacement] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[<] Other[128] operator[SEP] { identifier[replacement] operator[=] identifier[REPLACEMENT_CHARS] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[replacement] operator[==] Other[null] operator[SEP] { Keyword[continue] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[replacement] operator[=] literal[String] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[replacement] operator[=] literal[String] operator[SEP] } Keyword[else] { Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[last] operator[<] identifier[i] operator[SEP] { identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[str] , identifier[last] , identifier[i] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[replacement] operator[SEP] operator[SEP] identifier[last] operator[=] identifier[i] operator[+] Other[1] operator[SEP] } Keyword[if] operator[SEP] identifier[last] operator[<] identifier[length] operator[SEP] { identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[str] , identifier[last] , identifier[length] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public static final Function<String,Integer> toInteger(final RoundingMode roundingMode, final DecimalPoint decimalPoint) { return new ToInteger(roundingMode, decimalPoint); }
class class_name[name] begin[{] method[toInteger, return_type[type[Function]], modifier[final public static], parameter[roundingMode, decimalPoint]] begin[{] return[ClassCreator(arguments=[MemberReference(member=roundingMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=decimalPoint, 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=ToInteger, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] identifier[Function] operator[<] identifier[String] , identifier[Integer] operator[>] identifier[toInteger] operator[SEP] Keyword[final] identifier[RoundingMode] identifier[roundingMode] , Keyword[final] identifier[DecimalPoint] identifier[decimalPoint] operator[SEP] { Keyword[return] Keyword[new] identifier[ToInteger] operator[SEP] identifier[roundingMode] , identifier[decimalPoint] operator[SEP] operator[SEP] }
public boolean isLoggable(final Level level) { if (logger.isTraceEnabled()) { return level.intValue() >= Level.FINEST.intValue(); } else if (logger.isDebugEnabled()) { return level.intValue() >= Level.FINE.intValue(); } else if (logger.isInfoEnabled()) { return level.intValue() >= Level.INFO.intValue(); } else if (logger.isWarnEnabled()) { return level.intValue() >= Level.WARNING.intValue(); } else if (logger.isErrorEnabled()) { return level.intValue() >= Level.SEVERE.intValue(); } else { return false; } }
class class_name[name] begin[{] method[isLoggable, return_type[type[boolean]], modifier[public], parameter[level]] begin[{] if[call[logger.isTraceEnabled, parameter[]]] begin[{] return[binary_operation[call[level.intValue, parameter[]], >=, call[Level.FINEST.intValue, parameter[]]]] else begin[{] if[call[logger.isDebugEnabled, parameter[]]] begin[{] return[binary_operation[call[level.intValue, parameter[]], >=, call[Level.FINE.intValue, parameter[]]]] else begin[{] if[call[logger.isInfoEnabled, parameter[]]] begin[{] return[binary_operation[call[level.intValue, parameter[]], >=, call[Level.INFO.intValue, parameter[]]]] else begin[{] if[call[logger.isWarnEnabled, parameter[]]] begin[{] return[binary_operation[call[level.intValue, parameter[]], >=, call[Level.WARNING.intValue, parameter[]]]] else begin[{] if[call[logger.isErrorEnabled, parameter[]]] begin[{] return[binary_operation[call[level.intValue, parameter[]], >=, call[Level.SEVERE.intValue, parameter[]]]] else begin[{] return[literal[false]] end[}] end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isLoggable] operator[SEP] Keyword[final] identifier[Level] identifier[level] operator[SEP] { Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[level] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[>=] identifier[Level] operator[SEP] identifier[FINEST] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[level] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[>=] identifier[Level] operator[SEP] identifier[FINE] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[level] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[>=] identifier[Level] operator[SEP] identifier[INFO] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isWarnEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[level] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[>=] identifier[Level] operator[SEP] identifier[WARNING] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isErrorEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[level] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[>=] identifier[Level] operator[SEP] identifier[SEVERE] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
public synchronized Boolean isChecked(int index) { if(index < 0 || index >= itemStatus.size()) return null; return itemStatus.get(index); }
class class_name[name] begin[{] method[isChecked, return_type[type[Boolean]], modifier[synchronized public], parameter[index]] begin[{] if[binary_operation[binary_operation[member[.index], <, literal[0]], ||, binary_operation[member[.index], >=, call[itemStatus.size, parameter[]]]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[itemStatus.get, parameter[member[.index]]]] end[}] END[}]
Keyword[public] Keyword[synchronized] identifier[Boolean] identifier[isChecked] operator[SEP] Keyword[int] identifier[index] operator[SEP] { Keyword[if] operator[SEP] identifier[index] operator[<] Other[0] operator[||] identifier[index] operator[>=] identifier[itemStatus] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[itemStatus] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] }
public static List<Long> asList(final MutableLongTuple t) { if (t == null) { throw new NullPointerException("The tuple may not be null"); } return new AbstractList<Long>() { @Override public Long get(int index) { return t.get(index); } @Override public int size() { return t.getSize(); } @Override public Long set(int index, Long element) { long oldValue = t.get(index); t.set(index, element); return oldValue; } }; }
class class_name[name] begin[{] method[asList, return_type[type[List]], modifier[public static], parameter[t]] begin[{] if[binary_operation[member[.t], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The tuple may not be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=get, parameters=[FormalParameter(annotations=[], modifiers=set(), name=index, type=BasicType(dimensions=[], name=int), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getSize, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=size, parameters=[], return_type=BasicType(dimensions=[], name=int), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), name=oldValue)], modifiers=set(), type=BasicType(dimensions=[], name=long)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=oldValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=set, parameters=[FormalParameter(annotations=[], modifiers=set(), name=index, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=element, type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))], dimensions=None, name=AbstractList, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Long] operator[>] identifier[asList] operator[SEP] Keyword[final] identifier[MutableLongTuple] identifier[t] operator[SEP] { Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[AbstractList] operator[<] identifier[Long] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Long] identifier[get] operator[SEP] Keyword[int] identifier[index] operator[SEP] { Keyword[return] identifier[t] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[size] operator[SEP] operator[SEP] { Keyword[return] identifier[t] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[Long] identifier[set] operator[SEP] Keyword[int] identifier[index] , identifier[Long] identifier[element] operator[SEP] { Keyword[long] identifier[oldValue] operator[=] identifier[t] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] identifier[t] operator[SEP] identifier[set] operator[SEP] identifier[index] , identifier[element] operator[SEP] operator[SEP] Keyword[return] identifier[oldValue] operator[SEP] } } operator[SEP] }
public Retryer<R> fixedWait(long sleepTime, TimeUnit timeUnit) { withWaitStrategy(fixedWaitStrategy(checkNotNull(timeUnit, "TimeUnit cannot be null").toMillis(sleepTime))); return this; }
class class_name[name] begin[{] method[fixedWait, return_type[type[Retryer]], modifier[public], parameter[sleepTime, timeUnit]] begin[{] call[.withWaitStrategy, parameter[call[.fixedWaitStrategy, parameter[call[.checkNotNull, parameter[member[.timeUnit], literal["TimeUnit cannot be null"]]]]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Retryer] operator[<] identifier[R] operator[>] identifier[fixedWait] operator[SEP] Keyword[long] identifier[sleepTime] , identifier[TimeUnit] identifier[timeUnit] operator[SEP] { identifier[withWaitStrategy] operator[SEP] identifier[fixedWaitStrategy] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[timeUnit] , literal[String] operator[SEP] operator[SEP] identifier[toMillis] operator[SEP] identifier[sleepTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static ZMatrixRMaj pivotMatrix(ZMatrixRMaj ret, int pivots[], int numPivots, boolean transposed ) { if( ret == null ) { ret = new ZMatrixRMaj(numPivots, numPivots); } else { if( ret.numCols != numPivots || ret.numRows != numPivots ) throw new IllegalArgumentException("Unexpected matrix dimension"); CommonOps_ZDRM.fill(ret, 0,0); } if( transposed ) { for( int i = 0; i < numPivots; i++ ) { ret.set(pivots[i],i,1,0); } } else { for( int i = 0; i < numPivots; i++ ) { ret.set(i,pivots[i],1,0); } } return ret; }
class class_name[name] begin[{] method[pivotMatrix, return_type[type[ZMatrixRMaj]], modifier[public static], parameter[ret, pivots, numPivots, transposed]] begin[{] if[binary_operation[member[.ret], ==, literal[null]]] begin[{] assign[member[.ret], ClassCreator(arguments=[MemberReference(member=numPivots, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=numPivots, 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=ZMatrixRMaj, sub_type=None))] else begin[{] if[binary_operation[binary_operation[member[ret.numCols], !=, member[.numPivots]], ||, binary_operation[member[ret.numRows], !=, member[.numPivots]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unexpected matrix dimension")], 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[CommonOps_ZDRM.fill, parameter[member[.ret], literal[0], literal[0]]] end[}] if[member[.transposed]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pivots, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=set, postfix_operators=[], prefix_operators=[], qualifier=ret, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numPivots, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pivots, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=set, postfix_operators=[], prefix_operators=[], qualifier=ret, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numPivots, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] return[member[.ret]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ZMatrixRMaj] identifier[pivotMatrix] operator[SEP] identifier[ZMatrixRMaj] identifier[ret] , Keyword[int] identifier[pivots] operator[SEP] operator[SEP] , Keyword[int] identifier[numPivots] , Keyword[boolean] identifier[transposed] operator[SEP] { Keyword[if] operator[SEP] identifier[ret] operator[==] Other[null] operator[SEP] { identifier[ret] operator[=] Keyword[new] identifier[ZMatrixRMaj] operator[SEP] identifier[numPivots] , identifier[numPivots] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[ret] operator[SEP] identifier[numCols] operator[!=] identifier[numPivots] operator[||] identifier[ret] operator[SEP] identifier[numRows] operator[!=] identifier[numPivots] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[CommonOps_ZDRM] operator[SEP] identifier[fill] operator[SEP] identifier[ret] , Other[0] , Other[0] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[transposed] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numPivots] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[ret] operator[SEP] identifier[set] operator[SEP] identifier[pivots] operator[SEP] identifier[i] operator[SEP] , identifier[i] , Other[1] , Other[0] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numPivots] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[ret] operator[SEP] identifier[set] operator[SEP] identifier[i] , identifier[pivots] operator[SEP] identifier[i] operator[SEP] , Other[1] , Other[0] operator[SEP] operator[SEP] } } Keyword[return] identifier[ret] operator[SEP] }
private static long getTime(int year, int month, int day, int hour, int minute, int second, int millisecond) { Calendar cal = Calendar.getInstance(Util.TIME_ZONE_UTC); cal.set(year, month - 1, day, hour, minute, second); cal.set(Calendar.MILLISECOND, millisecond); return cal.getTimeInMillis(); }
class class_name[name] begin[{] method[getTime, return_type[type[long]], modifier[private static], parameter[year, month, day, hour, minute, second, millisecond]] begin[{] local_variable[type[Calendar], cal] call[cal.set, parameter[member[.year], binary_operation[member[.month], -, literal[1]], member[.day], member[.hour], member[.minute], member[.second]]] call[cal.set, parameter[member[Calendar.MILLISECOND], member[.millisecond]]] return[call[cal.getTimeInMillis, parameter[]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[long] identifier[getTime] operator[SEP] Keyword[int] identifier[year] , Keyword[int] identifier[month] , Keyword[int] identifier[day] , Keyword[int] identifier[hour] , Keyword[int] identifier[minute] , Keyword[int] identifier[second] , Keyword[int] identifier[millisecond] operator[SEP] { identifier[Calendar] identifier[cal] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] identifier[Util] operator[SEP] identifier[TIME_ZONE_UTC] operator[SEP] operator[SEP] identifier[cal] operator[SEP] identifier[set] operator[SEP] identifier[year] , identifier[month] operator[-] Other[1] , identifier[day] , identifier[hour] , identifier[minute] , identifier[second] operator[SEP] operator[SEP] identifier[cal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[MILLISECOND] , identifier[millisecond] operator[SEP] operator[SEP] Keyword[return] identifier[cal] operator[SEP] identifier[getTimeInMillis] operator[SEP] operator[SEP] operator[SEP] }
private boolean initializeExtensionPointSCIs(List<ServletContainerInitializer> myScis, DeployedModule module, HashMap<ServletContainerInitializer, Class[]> handleTypesHashMap, HashMap<ServletContainerInitializer, HashSet<Class<?>>> onStartupHashMap){ Iterator<ServletContainerInitializer> servletContainerInitializersIterator = com.ibm.ws.webcontainer.osgi.WebContainer.getServletContainerInitializerExtension();//com.ibm.ws.webcontainer.WSWebContainer.getServletContainerInitializerRegistry(); if (servletContainerInitializersIterator==null) return false; boolean needToScanClasses = false; while(servletContainerInitializersIterator.hasNext()){ ServletContainerInitializer sci = servletContainerInitializersIterator.next(); String className = sci.getClass().getName(); try{ myScis.add(sci); if(investigateHandlesTypes(sci, handleTypesHashMap, onStartupHashMap)){ needToScanClasses = true; } }catch (Exception e){ logger.logp(Level.SEVERE, CLASS_NAME,"initializeExtensionPointSCIs", "exception.occured.while.processing.ServletContainerInitializer.initializeExtensionPointSCIs", new Object[] {className}); } } return needToScanClasses; }
class class_name[name] begin[{] method[initializeExtensionPointSCIs, return_type[type[boolean]], modifier[private], parameter[myScis, module, handleTypesHashMap, onStartupHashMap]] begin[{] local_variable[type[Iterator], servletContainerInitializersIterator] if[binary_operation[member[.servletContainerInitializersIterator], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[boolean], needToScanClasses] while[call[servletContainerInitializersIterator.hasNext, parameter[]]] begin[{] local_variable[type[ServletContainerInitializer], sci] local_variable[type[String], className] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sci, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=myScis, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=sci, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=handleTypesHashMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=onStartupHashMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=investigateHandlesTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=needToScanClasses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="initializeExtensionPointSCIs"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="exception.occured.while.processing.ServletContainerInitializer.initializeExtensionPointSCIs"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=logp, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] return[member[.needToScanClasses]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[initializeExtensionPointSCIs] operator[SEP] identifier[List] operator[<] identifier[ServletContainerInitializer] operator[>] identifier[myScis] , identifier[DeployedModule] identifier[module] , identifier[HashMap] operator[<] identifier[ServletContainerInitializer] , identifier[Class] operator[SEP] operator[SEP] operator[>] identifier[handleTypesHashMap] , identifier[HashMap] operator[<] identifier[ServletContainerInitializer] , identifier[HashSet] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] operator[>] identifier[onStartupHashMap] operator[SEP] { identifier[Iterator] operator[<] identifier[ServletContainerInitializer] operator[>] identifier[servletContainerInitializersIterator] operator[=] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[webcontainer] operator[SEP] identifier[osgi] operator[SEP] identifier[WebContainer] operator[SEP] identifier[getServletContainerInitializerExtension] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[servletContainerInitializersIterator] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[boolean] identifier[needToScanClasses] operator[=] literal[boolean] operator[SEP] Keyword[while] operator[SEP] identifier[servletContainerInitializersIterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[ServletContainerInitializer] identifier[sci] operator[=] identifier[servletContainerInitializersIterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[className] operator[=] identifier[sci] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[myScis] operator[SEP] identifier[add] operator[SEP] identifier[sci] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[investigateHandlesTypes] operator[SEP] identifier[sci] , identifier[handleTypesHashMap] , identifier[onStartupHashMap] operator[SEP] operator[SEP] { identifier[needToScanClasses] operator[=] literal[boolean] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[logp] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , identifier[CLASS_NAME] , literal[String] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[className] } operator[SEP] operator[SEP] } } Keyword[return] identifier[needToScanClasses] operator[SEP] }
public BigComplex add(BigComplex value) { return valueOf( re.add(value.re), im.add(value.im)); }
class class_name[name] begin[{] method[add, return_type[type[BigComplex]], modifier[public], parameter[value]] begin[{] return[call[.valueOf, parameter[call[re.add, parameter[member[value.re]]], call[im.add, parameter[member[value.im]]]]]] end[}] END[}]
Keyword[public] identifier[BigComplex] identifier[add] operator[SEP] identifier[BigComplex] identifier[value] operator[SEP] { Keyword[return] identifier[valueOf] operator[SEP] identifier[re] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] identifier[re] operator[SEP] , identifier[im] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] identifier[im] operator[SEP] operator[SEP] operator[SEP] }
@Nonnull public static <K, V> Map<K, V> putAllAndMakeImmutable(@Nonnull Map<K, V> original, @Nullable Object... a) { return asImmutableMap(CollectionUtils.putAll(original, a)); }
class class_name[name] begin[{] method[putAllAndMakeImmutable, return_type[type[Map]], modifier[public static], parameter[original, a]] begin[{] return[call[.asImmutableMap, parameter[call[CollectionUtils.putAll, parameter[member[.original], member[.a]]]]]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[putAllAndMakeImmutable] operator[SEP] annotation[@] identifier[Nonnull] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[original] , annotation[@] identifier[Nullable] identifier[Object] operator[...] identifier[a] operator[SEP] { Keyword[return] identifier[asImmutableMap] operator[SEP] identifier[CollectionUtils] operator[SEP] identifier[putAll] operator[SEP] identifier[original] , identifier[a] operator[SEP] operator[SEP] operator[SEP] }
public static List<Element> getElements(Iterable<? extends Module> modules) { return getElements(Stage.DEVELOPMENT, modules); }
class class_name[name] begin[{] method[getElements, return_type[type[List]], modifier[public static], parameter[modules]] begin[{] return[call[.getElements, parameter[member[Stage.DEVELOPMENT], member[.modules]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Element] operator[>] identifier[getElements] operator[SEP] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[Module] operator[>] identifier[modules] operator[SEP] { Keyword[return] identifier[getElements] operator[SEP] identifier[Stage] operator[SEP] identifier[DEVELOPMENT] , identifier[modules] operator[SEP] operator[SEP] }
public BaseField getField(String strTableName, int iFieldSeq) // Lookup this field { Record record = this.getRecord(strTableName); if (record != null) return record.getField(iFieldSeq); return null; // Not found }
class class_name[name] begin[{] method[getField, return_type[type[BaseField]], modifier[public], parameter[strTableName, iFieldSeq]] begin[{] local_variable[type[Record], record] if[binary_operation[member[.record], !=, literal[null]]] begin[{] return[call[record.getField, parameter[member[.iFieldSeq]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] identifier[BaseField] identifier[getField] operator[SEP] identifier[String] identifier[strTableName] , Keyword[int] identifier[iFieldSeq] operator[SEP] { identifier[Record] identifier[record] operator[=] Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[strTableName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[record] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[record] operator[SEP] identifier[getField] operator[SEP] identifier[iFieldSeq] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
public OvhOrder license_plesk_serviceName_upgrade_duration_POST(String serviceName, String duration, OvhOrderableAntispamEnum antispam, OvhOrderableAntivirusEnum antivirus, OvhPleskApplicationSetEnum applicationSet, OvhOrderablePleskDomainNumberEnum domainNumber, OvhOrderablePleskLanguagePackEnum languagePackNumber, Boolean powerpack, Boolean resellerManagement, OvhPleskVersionEnum version, Boolean wordpressToolkit) throws IOException { String qPath = "/order/license/plesk/{serviceName}/upgrade/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "antispam", antispam); addBody(o, "antivirus", antivirus); addBody(o, "applicationSet", applicationSet); addBody(o, "domainNumber", domainNumber); addBody(o, "languagePackNumber", languagePackNumber); addBody(o, "powerpack", powerpack); addBody(o, "resellerManagement", resellerManagement); addBody(o, "version", version); addBody(o, "wordpressToolkit", wordpressToolkit); String resp = exec(qPath, "POST", sb.toString(), o); return convertTo(resp, OvhOrder.class); }
class class_name[name] begin[{] method[license_plesk_serviceName_upgrade_duration_POST, return_type[type[OvhOrder]], modifier[public], parameter[serviceName, duration, antispam, antivirus, applicationSet, domainNumber, languagePackNumber, powerpack, resellerManagement, version, wordpressToolkit]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[HashMap], o] call[.addBody, parameter[member[.o], literal["antispam"], member[.antispam]]] call[.addBody, parameter[member[.o], literal["antivirus"], member[.antivirus]]] call[.addBody, parameter[member[.o], literal["applicationSet"], member[.applicationSet]]] call[.addBody, parameter[member[.o], literal["domainNumber"], member[.domainNumber]]] call[.addBody, parameter[member[.o], literal["languagePackNumber"], member[.languagePackNumber]]] call[.addBody, parameter[member[.o], literal["powerpack"], member[.powerpack]]] call[.addBody, parameter[member[.o], literal["resellerManagement"], member[.resellerManagement]]] call[.addBody, parameter[member[.o], literal["version"], member[.version]]] call[.addBody, parameter[member[.o], literal["wordpressToolkit"], member[.wordpressToolkit]]] 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=OvhOrder, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[OvhOrder] identifier[license_plesk_serviceName_upgrade_duration_POST] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[duration] , identifier[OvhOrderableAntispamEnum] identifier[antispam] , identifier[OvhOrderableAntivirusEnum] identifier[antivirus] , identifier[OvhPleskApplicationSetEnum] identifier[applicationSet] , identifier[OvhOrderablePleskDomainNumberEnum] identifier[domainNumber] , identifier[OvhOrderablePleskLanguagePackEnum] identifier[languagePackNumber] , identifier[Boolean] identifier[powerpack] , identifier[Boolean] identifier[resellerManagement] , identifier[OvhPleskVersionEnum] identifier[version] , identifier[Boolean] identifier[wordpressToolkit] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[serviceName] , identifier[duration] 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[antispam] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[antivirus] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[applicationSet] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[domainNumber] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[languagePackNumber] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[powerpack] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[resellerManagement] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[version] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[wordpressToolkit] 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[OvhOrder] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public double[] getPaulingElectronegativities(IAtomContainer ac, boolean modified) throws CDKException { double[] paulingElectronegativities = new double[ac.getAtomCount()]; IElement element = null; String symbol = null; int atomicNumber = 0; try { ifac = Isotopes.getInstance(); for (int i = 0; i < ac.getAtomCount(); i++) { IAtom atom = ac.getAtom(i); symbol = ac.getAtom(i).getSymbol(); element = ifac.getElement(symbol); atomicNumber = element.getAtomicNumber(); if (modified) { if (symbol.equals("Cl")) { paulingElectronegativities[i] = 3.28; } else if (symbol.equals("Br")) { paulingElectronegativities[i] = 3.13; } else if (symbol.equals("I")) { paulingElectronegativities[i] = 2.93; } else if (symbol.equals("H")) { paulingElectronegativities[i] = 2.10; } else if (symbol.equals("C")) { if (ac.getMaximumBondOrder(atom) == IBond.Order.SINGLE) { // Csp3 paulingElectronegativities[i] = 2.20; } else if (ac.getMaximumBondOrder(atom) == IBond.Order.DOUBLE) { paulingElectronegativities[i] = 2.31; } else { paulingElectronegativities[i] = 3.15; } } else if (symbol.equals("O")) { if (ac.getMaximumBondOrder(atom) == IBond.Order.SINGLE) { // Osp3 paulingElectronegativities[i] = 3.20; } else if (ac.getMaximumBondOrder(atom) != IBond.Order.SINGLE) { paulingElectronegativities[i] = 4.34; } } else if (symbol.equals("Si")) { paulingElectronegativities[i] = 1.99; } else if (symbol.equals("S")) { paulingElectronegativities[i] = 2.74; } else if (symbol.equals("N")) { paulingElectronegativities[i] = 2.59; } else { paulingElectronegativities[i] = pauling[atomicNumber]; } } else { paulingElectronegativities[i] = pauling[atomicNumber]; } } return paulingElectronegativities; } catch (Exception ex1) { logger.debug(ex1); throw new CDKException("Problems with IsotopeFactory due to " + ex1.toString(), ex1); } }
class class_name[name] begin[{] method[getPaulingElectronegativities, return_type[type[double]], modifier[public], parameter[ac, modified]] begin[{] local_variable[type[double], paulingElectronegativities] local_variable[type[IElement], element] local_variable[type[String], symbol] local_variable[type[int], atomicNumber] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ifac, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=Isotopes, selectors=[], type_arguments=None)), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAtom, postfix_operators=[], prefix_operators=[], qualifier=ac, selectors=[], type_arguments=None), name=atom)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IAtom, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=symbol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAtom, postfix_operators=[], prefix_operators=[], qualifier=ac, selectors=[MethodInvocation(arguments=[], member=getSymbol, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=symbol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getElement, postfix_operators=[], prefix_operators=[], qualifier=ifac, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=atomicNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getAtomicNumber, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MemberReference(member=modified, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=pauling, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=atomicNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cl")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=symbol, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Br")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=symbol, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="I")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=symbol, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="H")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=symbol, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="C")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=symbol, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="O")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=symbol, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Si")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=symbol, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="S")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=symbol, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="N")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=symbol, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=pauling, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=atomicNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.59)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.74)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.99)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=atom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getMaximumBondOrder, postfix_operators=[], prefix_operators=[], qualifier=ac, selectors=[], type_arguments=None), operandr=MemberReference(member=SINGLE, postfix_operators=[], prefix_operators=[], qualifier=IBond.Order, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=atom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getMaximumBondOrder, postfix_operators=[], prefix_operators=[], qualifier=ac, selectors=[], type_arguments=None), operandr=MemberReference(member=SINGLE, postfix_operators=[], prefix_operators=[], qualifier=IBond.Order, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4.34)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.20)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=atom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getMaximumBondOrder, postfix_operators=[], prefix_operators=[], qualifier=ac, selectors=[], type_arguments=None), operandr=MemberReference(member=SINGLE, postfix_operators=[], prefix_operators=[], qualifier=IBond.Order, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=atom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getMaximumBondOrder, postfix_operators=[], prefix_operators=[], qualifier=ac, selectors=[], type_arguments=None), operandr=MemberReference(member=DOUBLE, postfix_operators=[], prefix_operators=[], qualifier=IBond.Order, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.15)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.31)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.20)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.10)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.93)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.13)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.28)), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getAtomCount, postfix_operators=[], prefix_operators=[], qualifier=ac, 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), ReturnStatement(expression=MemberReference(member=paulingElectronegativities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ex1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Problems with IsotopeFactory due to "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=ex1, selectors=[], type_arguments=None), operator=+), MemberReference(member=ex1, 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=CDKException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex1, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[double] operator[SEP] operator[SEP] identifier[getPaulingElectronegativities] operator[SEP] identifier[IAtomContainer] identifier[ac] , Keyword[boolean] identifier[modified] operator[SEP] Keyword[throws] identifier[CDKException] { Keyword[double] operator[SEP] operator[SEP] identifier[paulingElectronegativities] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[ac] operator[SEP] identifier[getAtomCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[IElement] identifier[element] operator[=] Other[null] operator[SEP] identifier[String] identifier[symbol] operator[=] Other[null] operator[SEP] Keyword[int] identifier[atomicNumber] operator[=] Other[0] operator[SEP] Keyword[try] { identifier[ifac] operator[=] identifier[Isotopes] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[ac] operator[SEP] identifier[getAtomCount] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[IAtom] identifier[atom] operator[=] identifier[ac] operator[SEP] identifier[getAtom] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[symbol] operator[=] identifier[ac] operator[SEP] identifier[getAtom] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getSymbol] operator[SEP] operator[SEP] operator[SEP] identifier[element] operator[=] identifier[ifac] operator[SEP] identifier[getElement] operator[SEP] identifier[symbol] operator[SEP] operator[SEP] identifier[atomicNumber] operator[=] identifier[element] operator[SEP] identifier[getAtomicNumber] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[modified] operator[SEP] { Keyword[if] operator[SEP] identifier[symbol] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[paulingElectronegativities] operator[SEP] identifier[i] operator[SEP] operator[=] literal[Float] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[symbol] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[paulingElectronegativities] operator[SEP] identifier[i] operator[SEP] operator[=] literal[Float] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[symbol] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[paulingElectronegativities] operator[SEP] identifier[i] operator[SEP] operator[=] literal[Float] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[symbol] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[paulingElectronegativities] operator[SEP] identifier[i] operator[SEP] operator[=] literal[Float] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[symbol] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ac] operator[SEP] identifier[getMaximumBondOrder] operator[SEP] identifier[atom] operator[SEP] operator[==] identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] operator[SEP] { identifier[paulingElectronegativities] operator[SEP] identifier[i] operator[SEP] operator[=] literal[Float] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[ac] operator[SEP] identifier[getMaximumBondOrder] operator[SEP] identifier[atom] operator[SEP] operator[==] identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[DOUBLE] operator[SEP] { identifier[paulingElectronegativities] operator[SEP] identifier[i] operator[SEP] operator[=] literal[Float] operator[SEP] } Keyword[else] { identifier[paulingElectronegativities] operator[SEP] identifier[i] operator[SEP] operator[=] literal[Float] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[symbol] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ac] operator[SEP] identifier[getMaximumBondOrder] operator[SEP] identifier[atom] operator[SEP] operator[==] identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] operator[SEP] { identifier[paulingElectronegativities] operator[SEP] identifier[i] operator[SEP] operator[=] literal[Float] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[ac] operator[SEP] identifier[getMaximumBondOrder] operator[SEP] identifier[atom] operator[SEP] operator[!=] identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] operator[SEP] { identifier[paulingElectronegativities] operator[SEP] identifier[i] operator[SEP] operator[=] literal[Float] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[symbol] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[paulingElectronegativities] operator[SEP] identifier[i] operator[SEP] operator[=] literal[Float] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[symbol] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[paulingElectronegativities] operator[SEP] identifier[i] operator[SEP] operator[=] literal[Float] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[symbol] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[paulingElectronegativities] operator[SEP] identifier[i] operator[SEP] operator[=] literal[Float] operator[SEP] } Keyword[else] { identifier[paulingElectronegativities] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[pauling] operator[SEP] identifier[atomicNumber] operator[SEP] operator[SEP] } } Keyword[else] { identifier[paulingElectronegativities] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[pauling] operator[SEP] identifier[atomicNumber] operator[SEP] operator[SEP] } } Keyword[return] identifier[paulingElectronegativities] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex1] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[ex1] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[CDKException] operator[SEP] literal[String] operator[+] identifier[ex1] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[ex1] operator[SEP] operator[SEP] } }
public static <R> Observable<R> fromRunnable(final Runnable run, final R result) { return fromRunnable(run, result, Schedulers.computation()); }
class class_name[name] begin[{] method[fromRunnable, return_type[type[Observable]], modifier[public static], parameter[run, result]] begin[{] return[call[.fromRunnable, parameter[member[.run], member[.result], call[Schedulers.computation, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[R] operator[>] identifier[Observable] operator[<] identifier[R] operator[>] identifier[fromRunnable] operator[SEP] Keyword[final] identifier[Runnable] identifier[run] , Keyword[final] identifier[R] identifier[result] operator[SEP] { Keyword[return] identifier[fromRunnable] operator[SEP] identifier[run] , identifier[result] , identifier[Schedulers] operator[SEP] identifier[computation] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public Matrix4f setFrustumLH(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne) { if ((properties & PROPERTY_IDENTITY) == 0) MemUtil.INSTANCE.identity(this); this._m00((zNear + zNear) / (right - left)); this._m11((zNear + zNear) / (top - bottom)); this._m20((right + left) / (right - left)); this._m21((top + bottom) / (top - bottom)); boolean farInf = zFar > 0 && Float.isInfinite(zFar); boolean nearInf = zNear > 0 && Float.isInfinite(zNear); if (farInf) { // See: "Infinite Projection Matrix" (http://www.terathon.com/gdc07_lengyel.pdf) float e = 1E-6f; this._m22(1.0f - e); this._m32((e - (zZeroToOne ? 1.0f : 2.0f)) * zNear); } else if (nearInf) { float e = 1E-6f; this._m22((zZeroToOne ? 0.0f : 1.0f) - e); this._m32(((zZeroToOne ? 1.0f : 2.0f) - e) * zFar); } else { this._m22((zZeroToOne ? zFar : zFar + zNear) / (zFar - zNear)); this._m32((zZeroToOne ? zFar : zFar + zFar) * zNear / (zNear - zFar)); } this._m23(1.0f); this._m33(0.0f); _properties(0); return this; }
class class_name[name] begin[{] method[setFrustumLH, return_type[type[Matrix4f]], modifier[public], parameter[left, right, bottom, top, zNear, zFar, zZeroToOne]] begin[{] if[binary_operation[binary_operation[member[.properties], &, member[.PROPERTY_IDENTITY]], ==, literal[0]]] begin[{] call[MemUtil.INSTANCE.identity, parameter[THIS[]]] else begin[{] None end[}] THIS[call[None._m00, parameter[binary_operation[binary_operation[member[.zNear], +, member[.zNear]], /, binary_operation[member[.right], -, member[.left]]]]]] THIS[call[None._m11, parameter[binary_operation[binary_operation[member[.zNear], +, member[.zNear]], /, binary_operation[member[.top], -, member[.bottom]]]]]] THIS[call[None._m20, parameter[binary_operation[binary_operation[member[.right], +, member[.left]], /, binary_operation[member[.right], -, member[.left]]]]]] THIS[call[None._m21, parameter[binary_operation[binary_operation[member[.top], +, member[.bottom]], /, binary_operation[member[.top], -, member[.bottom]]]]]] local_variable[type[boolean], farInf] local_variable[type[boolean], nearInf] if[member[.farInf]] begin[{] local_variable[type[float], e] THIS[call[None._m22, parameter[binary_operation[literal[1.0f], -, member[.e]]]]] THIS[call[None._m32, parameter[binary_operation[binary_operation[member[.e], -, TernaryExpression(condition=MemberReference(member=zZeroToOne, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0f), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0f))], *, member[.zNear]]]]] else begin[{] if[member[.nearInf]] begin[{] local_variable[type[float], e] THIS[call[None._m22, parameter[binary_operation[TernaryExpression(condition=MemberReference(member=zZeroToOne, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0f), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0f)), -, member[.e]]]]] THIS[call[None._m32, parameter[binary_operation[binary_operation[TernaryExpression(condition=MemberReference(member=zZeroToOne, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0f), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0f)), -, member[.e]], *, member[.zFar]]]]] else begin[{] THIS[call[None._m22, parameter[binary_operation[TernaryExpression(condition=MemberReference(member=zZeroToOne, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=BinaryOperation(operandl=MemberReference(member=zFar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=zNear, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), if_true=MemberReference(member=zFar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), /, binary_operation[member[.zFar], -, member[.zNear]]]]]] THIS[call[None._m32, parameter[binary_operation[binary_operation[TernaryExpression(condition=MemberReference(member=zZeroToOne, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=BinaryOperation(operandl=MemberReference(member=zFar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=zFar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), if_true=MemberReference(member=zFar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), *, member[.zNear]], /, binary_operation[member[.zNear], -, member[.zFar]]]]]] end[}] end[}] THIS[call[None._m23, parameter[literal[1.0f]]]] THIS[call[None._m33, parameter[literal[0.0f]]]] call[._properties, parameter[literal[0]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Matrix4f] identifier[setFrustumLH] operator[SEP] Keyword[float] identifier[left] , Keyword[float] identifier[right] , Keyword[float] identifier[bottom] , Keyword[float] identifier[top] , Keyword[float] identifier[zNear] , Keyword[float] identifier[zFar] , Keyword[boolean] identifier[zZeroToOne] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[properties] operator[&] identifier[PROPERTY_IDENTITY] operator[SEP] operator[==] Other[0] operator[SEP] identifier[MemUtil] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[identity] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m00] operator[SEP] operator[SEP] identifier[zNear] operator[+] identifier[zNear] operator[SEP] operator[/] operator[SEP] identifier[right] operator[-] identifier[left] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m11] operator[SEP] operator[SEP] identifier[zNear] operator[+] identifier[zNear] operator[SEP] operator[/] operator[SEP] identifier[top] operator[-] identifier[bottom] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m20] operator[SEP] operator[SEP] identifier[right] operator[+] identifier[left] operator[SEP] operator[/] operator[SEP] identifier[right] operator[-] identifier[left] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m21] operator[SEP] operator[SEP] identifier[top] operator[+] identifier[bottom] operator[SEP] operator[/] operator[SEP] identifier[top] operator[-] identifier[bottom] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[farInf] operator[=] identifier[zFar] operator[>] Other[0] operator[&&] identifier[Float] operator[SEP] identifier[isInfinite] operator[SEP] identifier[zFar] operator[SEP] operator[SEP] Keyword[boolean] identifier[nearInf] operator[=] identifier[zNear] operator[>] Other[0] operator[&&] identifier[Float] operator[SEP] identifier[isInfinite] operator[SEP] identifier[zNear] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[farInf] operator[SEP] { Keyword[float] identifier[e] operator[=] literal[Float] operator[SEP] Keyword[this] operator[SEP] identifier[_m22] operator[SEP] literal[Float] operator[-] identifier[e] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m32] operator[SEP] operator[SEP] identifier[e] operator[-] operator[SEP] identifier[zZeroToOne] operator[?] literal[Float] operator[:] literal[Float] operator[SEP] operator[SEP] operator[*] identifier[zNear] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[nearInf] operator[SEP] { Keyword[float] identifier[e] operator[=] literal[Float] operator[SEP] Keyword[this] operator[SEP] identifier[_m22] operator[SEP] operator[SEP] identifier[zZeroToOne] operator[?] literal[Float] operator[:] literal[Float] operator[SEP] operator[-] identifier[e] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m32] operator[SEP] operator[SEP] operator[SEP] identifier[zZeroToOne] operator[?] literal[Float] operator[:] literal[Float] operator[SEP] operator[-] identifier[e] operator[SEP] operator[*] identifier[zFar] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[_m22] operator[SEP] operator[SEP] identifier[zZeroToOne] operator[?] identifier[zFar] operator[:] identifier[zFar] operator[+] identifier[zNear] operator[SEP] operator[/] operator[SEP] identifier[zFar] operator[-] identifier[zNear] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m32] operator[SEP] operator[SEP] identifier[zZeroToOne] operator[?] identifier[zFar] operator[:] identifier[zFar] operator[+] identifier[zFar] operator[SEP] operator[*] identifier[zNear] operator[/] operator[SEP] identifier[zNear] operator[-] identifier[zFar] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[_m23] operator[SEP] literal[Float] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m33] operator[SEP] literal[Float] operator[SEP] operator[SEP] identifier[_properties] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
protected Object processFetchedHistoryModelList(final List<Version<MODEL>> list, final MODEL_ID id) throws Exception { return list; }
class class_name[name] begin[{] method[processFetchedHistoryModelList, return_type[type[Object]], modifier[protected], parameter[list, id]] begin[{] return[member[.list]] end[}] END[}]
Keyword[protected] identifier[Object] identifier[processFetchedHistoryModelList] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Version] operator[<] identifier[MODEL] operator[>] operator[>] identifier[list] , Keyword[final] identifier[MODEL_ID] identifier[id] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[return] identifier[list] operator[SEP] }
public static ExecutorService getSingleThreadExecutor(String name) { ExecutorService ste = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(), CoreUtils.getThreadFactory(null, name, SMALL_STACK_SIZE, false, null)); return ste; }
class class_name[name] begin[{] method[getSingleThreadExecutor, return_type[type[ExecutorService]], modifier[public static], parameter[name]] begin[{] local_variable[type[ExecutorService], ste] return[member[.ste]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ExecutorService] identifier[getSingleThreadExecutor] operator[SEP] identifier[String] identifier[name] operator[SEP] { identifier[ExecutorService] identifier[ste] operator[=] Keyword[new] identifier[ThreadPoolExecutor] operator[SEP] Other[1] , Other[1] , Other[0L] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] , Keyword[new] identifier[LinkedBlockingQueue] operator[<] identifier[Runnable] operator[>] operator[SEP] operator[SEP] , identifier[CoreUtils] operator[SEP] identifier[getThreadFactory] operator[SEP] Other[null] , identifier[name] , identifier[SMALL_STACK_SIZE] , literal[boolean] , Other[null] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[ste] operator[SEP] }
protected <T> T getInstanceByType(BeanManager manager, Class<T> type, Annotation... bindings) { final Bean<?> bean = manager.resolve(manager.getBeans(type, bindings)); if (bean == null) { throw CommonLogger.LOG.unableToResolveBean(type, Arrays.asList(bindings)); } CreationalContext<?> cc = manager.createCreationalContext(bean); return type.cast(manager.getReference(bean, type, cc)); }
class class_name[name] begin[{] method[getInstanceByType, return_type[type[T]], modifier[protected], parameter[manager, type, bindings]] begin[{] local_variable[type[Bean], bean] if[binary_operation[member[.bean], ==, literal[null]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=bindings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=asList, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None)], member=unableToResolveBean, postfix_operators=[], prefix_operators=[], qualifier=CommonLogger.LOG, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] local_variable[type[CreationalContext], cc] return[call[type.cast, parameter[call[manager.getReference, parameter[member[.bean], member[.type], member[.cc]]]]]] end[}] END[}]
Keyword[protected] operator[<] identifier[T] operator[>] identifier[T] identifier[getInstanceByType] operator[SEP] identifier[BeanManager] identifier[manager] , identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , identifier[Annotation] operator[...] identifier[bindings] operator[SEP] { Keyword[final] identifier[Bean] operator[<] operator[?] operator[>] identifier[bean] operator[=] identifier[manager] operator[SEP] identifier[resolve] operator[SEP] identifier[manager] operator[SEP] identifier[getBeans] operator[SEP] identifier[type] , identifier[bindings] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bean] operator[==] Other[null] operator[SEP] { Keyword[throw] identifier[CommonLogger] operator[SEP] identifier[LOG] operator[SEP] identifier[unableToResolveBean] operator[SEP] identifier[type] , identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[bindings] operator[SEP] operator[SEP] operator[SEP] } identifier[CreationalContext] operator[<] operator[?] operator[>] identifier[cc] operator[=] identifier[manager] operator[SEP] identifier[createCreationalContext] operator[SEP] identifier[bean] operator[SEP] operator[SEP] Keyword[return] identifier[type] operator[SEP] identifier[cast] operator[SEP] identifier[manager] operator[SEP] identifier[getReference] operator[SEP] identifier[bean] , identifier[type] , identifier[cc] operator[SEP] operator[SEP] operator[SEP] }
public DescribeReplicationGroupsResult withReplicationGroups(ReplicationGroup... replicationGroups) { if (this.replicationGroups == null) { setReplicationGroups(new com.amazonaws.internal.SdkInternalList<ReplicationGroup>(replicationGroups.length)); } for (ReplicationGroup ele : replicationGroups) { this.replicationGroups.add(ele); } return this; }
class class_name[name] begin[{] method[withReplicationGroups, return_type[type[DescribeReplicationGroupsResult]], modifier[public], parameter[replicationGroups]] begin[{] if[binary_operation[THIS[member[None.replicationGroups]], ==, literal[null]]] begin[{] call[.setReplicationGroups, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=replicationGroups, 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=ReplicationGroup, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=replicationGroups, 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=replicationGroups, 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=ReplicationGroup, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[DescribeReplicationGroupsResult] identifier[withReplicationGroups] operator[SEP] identifier[ReplicationGroup] operator[...] identifier[replicationGroups] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[replicationGroups] operator[==] Other[null] operator[SEP] { identifier[setReplicationGroups] operator[SEP] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[ReplicationGroup] operator[>] operator[SEP] identifier[replicationGroups] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[ReplicationGroup] identifier[ele] operator[:] identifier[replicationGroups] operator[SEP] { Keyword[this] operator[SEP] identifier[replicationGroups] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public XmlPathConfig defaultObjectDeserializer(XmlPathObjectDeserializer defaultObjectDeserializer) { return new XmlPathConfig(jaxbObjectMapperFactory, defaultParserType, defaultObjectDeserializer, charset, features, declaredNamespaces, properties, validating, namespaceAware, allowDocTypeDeclaration); }
class class_name[name] begin[{] method[defaultObjectDeserializer, return_type[type[XmlPathConfig]], modifier[public], parameter[defaultObjectDeserializer]] begin[{] return[ClassCreator(arguments=[MemberReference(member=jaxbObjectMapperFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=defaultParserType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=defaultObjectDeserializer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=charset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=features, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=declaredNamespaces, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=properties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=validating, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=namespaceAware, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=allowDocTypeDeclaration, 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=XmlPathConfig, sub_type=None))] end[}] END[}]
Keyword[public] identifier[XmlPathConfig] identifier[defaultObjectDeserializer] operator[SEP] identifier[XmlPathObjectDeserializer] identifier[defaultObjectDeserializer] operator[SEP] { Keyword[return] Keyword[new] identifier[XmlPathConfig] operator[SEP] identifier[jaxbObjectMapperFactory] , identifier[defaultParserType] , identifier[defaultObjectDeserializer] , identifier[charset] , identifier[features] , identifier[declaredNamespaces] , identifier[properties] , identifier[validating] , identifier[namespaceAware] , identifier[allowDocTypeDeclaration] operator[SEP] operator[SEP] }
protected void setParameter( PreparedStatement pPreparedStatement ) throws SQLException { if( _parameters != null ) { for( int i = 0; i < _parameters.size(); i++ ) { pPreparedStatement.setObject( i + 1, _parameters.get( i ) ); } } }
class class_name[name] begin[{] method[setParameter, return_type[void], modifier[protected], parameter[pPreparedStatement]] begin[{] if[binary_operation[member[._parameters], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=_parameters, selectors=[], type_arguments=None)], member=setObject, postfix_operators=[], prefix_operators=[], qualifier=pPreparedStatement, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=_parameters, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[setParameter] operator[SEP] identifier[PreparedStatement] identifier[pPreparedStatement] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[if] operator[SEP] identifier[_parameters] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[_parameters] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[pPreparedStatement] operator[SEP] identifier[setObject] operator[SEP] identifier[i] operator[+] Other[1] , identifier[_parameters] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } }
public void write(ObjectOutput output) throws IOException { output.writeObject(this.moment); output.writeObject(this.zone); }
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[output]] begin[{] call[output.writeObject, parameter[THIS[member[None.moment]]]] call[output.writeObject, parameter[THIS[member[None.zone]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[ObjectOutput] identifier[output] operator[SEP] Keyword[throws] identifier[IOException] { identifier[output] operator[SEP] identifier[writeObject] operator[SEP] Keyword[this] operator[SEP] identifier[moment] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[writeObject] operator[SEP] Keyword[this] operator[SEP] identifier[zone] operator[SEP] operator[SEP] }
public static void ensureNotError(ObjectMapper mapper, JsonNode resourceNode) { if (resourceNode != null && resourceNode.hasNonNull(JSONAPISpecConstants.ERRORS)) { try { throw new ResourceParseException(ErrorUtils.parseError(mapper, resourceNode, Errors.class)); } catch (JsonProcessingException e) { throw new RuntimeException(e); } } }
class class_name[name] begin[{] method[ensureNotError, return_type[void], modifier[public static], parameter[mapper, resourceNode]] begin[{] if[binary_operation[binary_operation[member[.resourceNode], !=, literal[null]], &&, call[resourceNode.hasNonNull, parameter[member[JSONAPISpecConstants.ERRORS]]]]] begin[{] TryStatement(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=mapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resourceNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Errors, sub_type=None))], member=parseError, postfix_operators=[], prefix_operators=[], qualifier=ErrorUtils, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ResourceParseException, sub_type=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=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JsonProcessingException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[ensureNotError] operator[SEP] identifier[ObjectMapper] identifier[mapper] , identifier[JsonNode] identifier[resourceNode] operator[SEP] { Keyword[if] operator[SEP] identifier[resourceNode] operator[!=] Other[null] operator[&&] identifier[resourceNode] operator[SEP] identifier[hasNonNull] operator[SEP] identifier[JSONAPISpecConstants] operator[SEP] identifier[ERRORS] operator[SEP] operator[SEP] { Keyword[try] { Keyword[throw] Keyword[new] identifier[ResourceParseException] operator[SEP] identifier[ErrorUtils] operator[SEP] identifier[parseError] operator[SEP] identifier[mapper] , identifier[resourceNode] , identifier[Errors] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JsonProcessingException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } }
private void constraint(PatternDescrBuilder<?> pattern, boolean positional, String prefix) throws RecognitionException { if (speculateNestedConstraint()) { nestedConstraint(pattern, prefix); return; } if (state.backtracking == 0) { helper.emit(Location.LOCATION_LHS_INSIDE_CONDITION_START); } int first = input.index(); exprParser.getHelper().setHasOperator(false); // resetting try { exprParser.conditionalOrExpression(); } finally { if (state.backtracking == 0) { if (input.LA(1) == DRL6Lexer.ID && input.LA(2) == DRL6Lexer.EOF) { helper.emit(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT); } else if (input.LA(1) != DRL6Lexer.EOF) { helper.emit(Location.LOCATION_LHS_INSIDE_CONDITION_END); } else if (!lastTokenWasWhiteSpace()) { int location = getCurrentLocation(); if (location == Location.LOCATION_LHS_INSIDE_CONDITION_END) { helper.emit(Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT); } else if (input.get(input.index()).getType() != DRL6Lexer.EOF) { helper.emit(Location.LOCATION_LHS_INSIDE_CONDITION_START); } } else if (getCurrentLocation() == Location.LOCATION_LHS_INSIDE_CONDITION_START && !exprParser.getHelper().getHasOperator() && lastTokenWasWhiteSpace() && input.LA(1) == DRL6Lexer.EOF && input.LA(-1) == DRL6Lexer.ID) { helper.emit(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR); } } } if (state.failed) return; if (state.backtracking == 0 && input.index() > first) { // expression consumed something int last = input.LT(-1).getTokenIndex(); String expr = toExpression(prefix, first, last); pattern.constraint(expr, positional); BaseDescr constrDescr = pattern.getDescr().getDescrs().get(pattern.getDescr().getDescrs().size() - 1); constrDescr.setLocation(input.get(first).getLine(), input.get(first).getCharPositionInLine()); constrDescr.setEndLocation(input.get(last).getLine(), input.get(last).getCharPositionInLine()); constrDescr.setStartCharacter(((CommonToken) input.get(first)).getStartIndex()); constrDescr.setEndCharacter(((CommonToken) input.get(last)).getStopIndex()); } }
class class_name[name] begin[{] method[constraint, return_type[void], modifier[private], parameter[pattern, positional, prefix]] begin[{] if[call[.speculateNestedConstraint, parameter[]]] begin[{] call[.nestedConstraint, parameter[member[.pattern], member[.prefix]]] return[None] else begin[{] None end[}] if[binary_operation[member[state.backtracking], ==, literal[0]]] begin[{] call[helper.emit, parameter[member[Location.LOCATION_LHS_INSIDE_CONDITION_START]]] else begin[{] None end[}] local_variable[type[int], first] call[exprParser.getHelper, parameter[]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=conditionalOrExpression, postfix_operators=[], prefix_operators=[], qualifier=exprParser, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=MemberReference(member=ID, postfix_operators=[], prefix_operators=[], qualifier=DRL6Lexer, selectors=[]), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=DRL6Lexer, selectors=[]), operator===), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=DRL6Lexer, selectors=[]), operator=!=), else_statement=IfStatement(condition=MethodInvocation(arguments=[], member=lastTokenWasWhiteSpace, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCurrentLocation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=MemberReference(member=LOCATION_LHS_INSIDE_CONDITION_START, postfix_operators=[], prefix_operators=[], qualifier=Location, selectors=[]), operator===), operandr=MethodInvocation(arguments=[], member=getHelper, postfix_operators=[], prefix_operators=['!'], qualifier=exprParser, selectors=[MethodInvocation(arguments=[], member=getHasOperator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), operandr=MethodInvocation(arguments=[], member=lastTokenWasWhiteSpace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=DRL6Lexer, selectors=[]), operator===), operator=&&), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=MemberReference(member=ID, postfix_operators=[], prefix_operators=[], qualifier=DRL6Lexer, selectors=[]), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=LOCATION_LHS_INSIDE_CONDITION_OPERATOR, postfix_operators=[], prefix_operators=[], qualifier=Location, selectors=[])], member=emit, postfix_operators=[], prefix_operators=[], qualifier=helper, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCurrentLocation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=location)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=location, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LOCATION_LHS_INSIDE_CONDITION_END, postfix_operators=[], prefix_operators=[], qualifier=Location, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=index, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[MethodInvocation(arguments=[], member=getType, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=DRL6Lexer, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=LOCATION_LHS_INSIDE_CONDITION_START, postfix_operators=[], prefix_operators=[], qualifier=Location, selectors=[])], member=emit, postfix_operators=[], prefix_operators=[], qualifier=helper, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=LOCATION_LHS_INSIDE_CONDITION_ARGUMENT, postfix_operators=[], prefix_operators=[], qualifier=Location, selectors=[])], member=emit, postfix_operators=[], prefix_operators=[], qualifier=helper, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=LOCATION_LHS_INSIDE_CONDITION_END, postfix_operators=[], prefix_operators=[], qualifier=Location, selectors=[])], member=emit, postfix_operators=[], prefix_operators=[], qualifier=helper, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=LOCATION_LHS_INSIDE_CONDITION_ARGUMENT, postfix_operators=[], prefix_operators=[], qualifier=Location, selectors=[])], member=emit, postfix_operators=[], prefix_operators=[], qualifier=helper, selectors=[], type_arguments=None), label=None)]))]))], label=None, resources=None) if[member[state.failed]] begin[{] return[None] else begin[{] None end[}] if[binary_operation[binary_operation[member[state.backtracking], ==, literal[0]], &&, binary_operation[call[input.index, parameter[]], >, member[.first]]]] begin[{] local_variable[type[int], last] local_variable[type[String], expr] call[pattern.constraint, parameter[member[.expr], member[.positional]]] local_variable[type[BaseDescr], constrDescr] call[constrDescr.setLocation, parameter[call[input.get, parameter[member[.first]]], call[input.get, parameter[member[.first]]]]] call[constrDescr.setEndLocation, parameter[call[input.get, parameter[member[.last]]], call[input.get, parameter[member[.last]]]]] call[constrDescr.setStartCharacter, parameter[Cast(expression=MethodInvocation(arguments=[MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=CommonToken, sub_type=None))]] call[constrDescr.setEndCharacter, parameter[Cast(expression=MethodInvocation(arguments=[MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=CommonToken, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[constraint] operator[SEP] identifier[PatternDescrBuilder] operator[<] operator[?] operator[>] identifier[pattern] , Keyword[boolean] identifier[positional] , identifier[String] identifier[prefix] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[if] operator[SEP] identifier[speculateNestedConstraint] operator[SEP] operator[SEP] operator[SEP] { identifier[nestedConstraint] operator[SEP] identifier[pattern] , identifier[prefix] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[helper] operator[SEP] identifier[emit] operator[SEP] identifier[Location] operator[SEP] identifier[LOCATION_LHS_INSIDE_CONDITION_START] operator[SEP] operator[SEP] } Keyword[int] identifier[first] operator[=] identifier[input] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] identifier[exprParser] operator[SEP] identifier[getHelper] operator[SEP] operator[SEP] operator[SEP] identifier[setHasOperator] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[try] { identifier[exprParser] operator[SEP] identifier[conditionalOrExpression] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[==] identifier[DRL6Lexer] operator[SEP] identifier[ID] operator[&&] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[==] identifier[DRL6Lexer] operator[SEP] identifier[EOF] operator[SEP] { identifier[helper] operator[SEP] identifier[emit] operator[SEP] identifier[Location] operator[SEP] identifier[LOCATION_LHS_INSIDE_CONDITION_ARGUMENT] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[!=] identifier[DRL6Lexer] operator[SEP] identifier[EOF] operator[SEP] { identifier[helper] operator[SEP] identifier[emit] operator[SEP] identifier[Location] operator[SEP] identifier[LOCATION_LHS_INSIDE_CONDITION_END] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[lastTokenWasWhiteSpace] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[location] operator[=] identifier[getCurrentLocation] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[location] operator[==] identifier[Location] operator[SEP] identifier[LOCATION_LHS_INSIDE_CONDITION_END] operator[SEP] { identifier[helper] operator[SEP] identifier[emit] operator[SEP] identifier[Location] operator[SEP] identifier[LOCATION_LHS_INSIDE_CONDITION_ARGUMENT] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[input] operator[SEP] identifier[get] operator[SEP] identifier[input] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[!=] identifier[DRL6Lexer] operator[SEP] identifier[EOF] operator[SEP] { identifier[helper] operator[SEP] identifier[emit] operator[SEP] identifier[Location] operator[SEP] identifier[LOCATION_LHS_INSIDE_CONDITION_START] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[getCurrentLocation] operator[SEP] operator[SEP] operator[==] identifier[Location] operator[SEP] identifier[LOCATION_LHS_INSIDE_CONDITION_START] operator[&&] operator[!] identifier[exprParser] operator[SEP] identifier[getHelper] operator[SEP] operator[SEP] operator[SEP] identifier[getHasOperator] operator[SEP] operator[SEP] operator[&&] identifier[lastTokenWasWhiteSpace] operator[SEP] operator[SEP] operator[&&] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[==] identifier[DRL6Lexer] operator[SEP] identifier[EOF] operator[&&] identifier[input] operator[SEP] identifier[LA] operator[SEP] operator[-] Other[1] operator[SEP] operator[==] identifier[DRL6Lexer] operator[SEP] identifier[ID] operator[SEP] { identifier[helper] operator[SEP] identifier[emit] operator[SEP] identifier[Location] operator[SEP] identifier[LOCATION_LHS_INSIDE_CONDITION_OPERATOR] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[&&] identifier[input] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[>] identifier[first] operator[SEP] { Keyword[int] identifier[last] operator[=] identifier[input] operator[SEP] identifier[LT] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[getTokenIndex] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[expr] operator[=] identifier[toExpression] operator[SEP] identifier[prefix] , identifier[first] , identifier[last] operator[SEP] operator[SEP] identifier[pattern] operator[SEP] identifier[constraint] operator[SEP] identifier[expr] , identifier[positional] operator[SEP] operator[SEP] identifier[BaseDescr] identifier[constrDescr] operator[=] identifier[pattern] operator[SEP] identifier[getDescr] operator[SEP] operator[SEP] operator[SEP] identifier[getDescrs] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[pattern] operator[SEP] identifier[getDescr] operator[SEP] operator[SEP] operator[SEP] identifier[getDescrs] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[constrDescr] operator[SEP] identifier[setLocation] operator[SEP] identifier[input] operator[SEP] identifier[get] operator[SEP] identifier[first] operator[SEP] operator[SEP] identifier[getLine] operator[SEP] operator[SEP] , identifier[input] operator[SEP] identifier[get] operator[SEP] identifier[first] operator[SEP] operator[SEP] identifier[getCharPositionInLine] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[constrDescr] operator[SEP] identifier[setEndLocation] operator[SEP] identifier[input] operator[SEP] identifier[get] operator[SEP] identifier[last] operator[SEP] operator[SEP] identifier[getLine] operator[SEP] operator[SEP] , identifier[input] operator[SEP] identifier[get] operator[SEP] identifier[last] operator[SEP] operator[SEP] identifier[getCharPositionInLine] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[constrDescr] operator[SEP] identifier[setStartCharacter] operator[SEP] operator[SEP] operator[SEP] identifier[CommonToken] operator[SEP] identifier[input] operator[SEP] identifier[get] operator[SEP] identifier[first] operator[SEP] operator[SEP] operator[SEP] identifier[getStartIndex] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[constrDescr] operator[SEP] identifier[setEndCharacter] operator[SEP] operator[SEP] operator[SEP] identifier[CommonToken] operator[SEP] identifier[input] operator[SEP] identifier[get] operator[SEP] identifier[last] operator[SEP] operator[SEP] operator[SEP] identifier[getStopIndex] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private boolean visitInPostOrder(StateVisitor v, int node, BitSet visited) { if (visited.get(node)) return true; visited.set(node); for (int arc = getFirstArc(node); arc != 0; arc = getNextArc(arc)) { if (!isArcTerminal(arc)) { if (!visitInPostOrder(v, getEndNode(arc), visited)) return false; } } return v.accept(node); }
class class_name[name] begin[{] method[visitInPostOrder, return_type[type[boolean]], modifier[private], parameter[v, node, visited]] begin[{] if[call[visited.get, parameter[member[.node]]]] begin[{] return[literal[true]] else begin[{] None end[}] call[visited.set, parameter[member[.node]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=arc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isArcTerminal, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=arc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getEndNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=visited, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=visitInPostOrder, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=arc, 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=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFirstArc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=arc)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=arc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=arc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getNextArc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))]), label=None) return[call[v.accept, parameter[member[.node]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[visitInPostOrder] operator[SEP] identifier[StateVisitor] identifier[v] , Keyword[int] identifier[node] , identifier[BitSet] identifier[visited] operator[SEP] { Keyword[if] operator[SEP] identifier[visited] operator[SEP] identifier[get] operator[SEP] identifier[node] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[visited] operator[SEP] identifier[set] operator[SEP] identifier[node] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[arc] operator[=] identifier[getFirstArc] operator[SEP] identifier[node] operator[SEP] operator[SEP] identifier[arc] operator[!=] Other[0] operator[SEP] identifier[arc] operator[=] identifier[getNextArc] operator[SEP] identifier[arc] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isArcTerminal] operator[SEP] identifier[arc] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[visitInPostOrder] operator[SEP] identifier[v] , identifier[getEndNode] operator[SEP] identifier[arc] operator[SEP] , identifier[visited] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] identifier[v] operator[SEP] identifier[accept] operator[SEP] identifier[node] operator[SEP] operator[SEP] }
protected Collection<BioPAXElement> generate(Interaction inter, Set<Entity> taboo) { Set<BioPAXElement> simples = new HashSet<BioPAXElement>(); for (Entity part : inter.getParticipant()) { if (part instanceof PhysicalEntity && !taboo.contains(part)) { simples.addAll(linker.getLinkedElements((PhysicalEntity) part)); } } return pe2ER.getValueFromBeans(simples); }
class class_name[name] begin[{] method[generate, return_type[type[Collection]], modifier[protected], parameter[inter, taboo]] begin[{] local_variable[type[Set], simples] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=part, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=PhysicalEntity, sub_type=None), operator=instanceof), operandr=MethodInvocation(arguments=[MemberReference(member=part, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=taboo, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Cast(expression=MemberReference(member=part, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=PhysicalEntity, sub_type=None))], member=getLinkedElements, postfix_operators=[], prefix_operators=[], qualifier=linker, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=simples, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getParticipant, postfix_operators=[], prefix_operators=[], qualifier=inter, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=part)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Entity, sub_type=None))), label=None) return[call[pe2ER.getValueFromBeans, parameter[member[.simples]]]] end[}] END[}]
Keyword[protected] identifier[Collection] operator[<] identifier[BioPAXElement] operator[>] identifier[generate] operator[SEP] identifier[Interaction] identifier[inter] , identifier[Set] operator[<] identifier[Entity] operator[>] identifier[taboo] operator[SEP] { identifier[Set] operator[<] identifier[BioPAXElement] operator[>] identifier[simples] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[BioPAXElement] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Entity] identifier[part] operator[:] identifier[inter] operator[SEP] identifier[getParticipant] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[part] Keyword[instanceof] identifier[PhysicalEntity] operator[&&] operator[!] identifier[taboo] operator[SEP] identifier[contains] operator[SEP] identifier[part] operator[SEP] operator[SEP] { identifier[simples] operator[SEP] identifier[addAll] operator[SEP] identifier[linker] operator[SEP] identifier[getLinkedElements] operator[SEP] operator[SEP] identifier[PhysicalEntity] operator[SEP] identifier[part] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[pe2ER] operator[SEP] identifier[getValueFromBeans] operator[SEP] identifier[simples] operator[SEP] operator[SEP] }
public static String applyFromXml(String text) throws ConverterException { String xml = converters.get(0).convertFromXml(text, false); xml = applyFromSecond(xml); if (conversionDone()) { return converters.get(converters.size()-1).changeVersion(xml); } else { return xml; } }
class class_name[name] begin[{] method[applyFromXml, return_type[type[String]], modifier[public static], parameter[text]] begin[{] local_variable[type[String], xml] assign[member[.xml], call[.applyFromSecond, parameter[member[.xml]]]] if[call[.conversionDone, parameter[]]] begin[{] return[call[converters.get, parameter[binary_operation[call[converters.size, parameter[]], -, literal[1]]]]] else begin[{] return[member[.xml]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[applyFromXml] operator[SEP] identifier[String] identifier[text] operator[SEP] Keyword[throws] identifier[ConverterException] { identifier[String] identifier[xml] operator[=] identifier[converters] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[convertFromXml] operator[SEP] identifier[text] , literal[boolean] operator[SEP] operator[SEP] identifier[xml] operator[=] identifier[applyFromSecond] operator[SEP] identifier[xml] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[conversionDone] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[converters] operator[SEP] identifier[get] operator[SEP] identifier[converters] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[changeVersion] operator[SEP] identifier[xml] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[xml] operator[SEP] } }
public void addActionMapping( ActionModel mapping ) { String mappingPath = mapping.getPath(); ActionModel conflictingActionMapping = ( ActionModel ) _actionMappings.get( mappingPath ); if ( conflictingActionMapping != null ) { ActionModel defaultMappingForThisPath = conflictingActionMapping; // // If the new action mapping takes no form, then it has the highest precedence, and replaces the existing // "natural" mapping for the given path. Otherwise, replace the existing one if the existing one has a // form bean and if the new mapping's form bean type comes alphabetically before the existing one's. // if ( mapping.getFormBeanName() == null || ( conflictingActionMapping.getFormBeanName() != null && getBeanType( mapping ).compareTo( getBeanType( conflictingActionMapping ) ) < 0 ) ) { _actionMappings.remove( mappingPath ); _actionMappings.put( mappingPath, mapping ); defaultMappingForThisPath = mapping; conflictingActionMapping.setOverloaded( false ); addDisambiguatedActionMapping( conflictingActionMapping ); } else { addDisambiguatedActionMapping( mapping ); } defaultMappingForThisPath.setOverloaded( true ); defaultMappingForThisPath.setComment( DUPLICATE_ACTION_COMMENT.replaceAll( "\\{0\\}", mappingPath ) ); // @TODO I18N } else { _actionMappings.put( mappingPath, mapping ); } }
class class_name[name] begin[{] method[addActionMapping, return_type[void], modifier[public], parameter[mapping]] begin[{] local_variable[type[String], mappingPath] local_variable[type[ActionModel], conflictingActionMapping] if[binary_operation[member[.conflictingActionMapping], !=, literal[null]]] begin[{] local_variable[type[ActionModel], defaultMappingForThisPath] if[binary_operation[binary_operation[call[mapping.getFormBeanName, parameter[]], ==, literal[null]], ||, binary_operation[binary_operation[call[conflictingActionMapping.getFormBeanName, parameter[]], !=, literal[null]], &&, binary_operation[call[.getBeanType, parameter[member[.mapping]]], <, literal[0]]]]] begin[{] call[_actionMappings.remove, parameter[member[.mappingPath]]] call[_actionMappings.put, parameter[member[.mappingPath], member[.mapping]]] assign[member[.defaultMappingForThisPath], member[.mapping]] call[conflictingActionMapping.setOverloaded, parameter[literal[false]]] call[.addDisambiguatedActionMapping, parameter[member[.conflictingActionMapping]]] else begin[{] call[.addDisambiguatedActionMapping, parameter[member[.mapping]]] end[}] call[defaultMappingForThisPath.setOverloaded, parameter[literal[true]]] call[defaultMappingForThisPath.setComment, parameter[call[DUPLICATE_ACTION_COMMENT.replaceAll, parameter[literal["\\{0\\}"], member[.mappingPath]]]]] else begin[{] call[_actionMappings.put, parameter[member[.mappingPath], member[.mapping]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addActionMapping] operator[SEP] identifier[ActionModel] identifier[mapping] operator[SEP] { identifier[String] identifier[mappingPath] operator[=] identifier[mapping] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[ActionModel] identifier[conflictingActionMapping] operator[=] operator[SEP] identifier[ActionModel] operator[SEP] identifier[_actionMappings] operator[SEP] identifier[get] operator[SEP] identifier[mappingPath] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[conflictingActionMapping] operator[!=] Other[null] operator[SEP] { identifier[ActionModel] identifier[defaultMappingForThisPath] operator[=] identifier[conflictingActionMapping] operator[SEP] Keyword[if] operator[SEP] identifier[mapping] operator[SEP] identifier[getFormBeanName] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] operator[SEP] identifier[conflictingActionMapping] operator[SEP] identifier[getFormBeanName] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[getBeanType] operator[SEP] identifier[mapping] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[getBeanType] operator[SEP] identifier[conflictingActionMapping] operator[SEP] operator[SEP] operator[<] Other[0] operator[SEP] operator[SEP] { identifier[_actionMappings] operator[SEP] identifier[remove] operator[SEP] identifier[mappingPath] operator[SEP] operator[SEP] identifier[_actionMappings] operator[SEP] identifier[put] operator[SEP] identifier[mappingPath] , identifier[mapping] operator[SEP] operator[SEP] identifier[defaultMappingForThisPath] operator[=] identifier[mapping] operator[SEP] identifier[conflictingActionMapping] operator[SEP] identifier[setOverloaded] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[addDisambiguatedActionMapping] operator[SEP] identifier[conflictingActionMapping] operator[SEP] operator[SEP] } Keyword[else] { identifier[addDisambiguatedActionMapping] operator[SEP] identifier[mapping] operator[SEP] operator[SEP] } identifier[defaultMappingForThisPath] operator[SEP] identifier[setOverloaded] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[defaultMappingForThisPath] operator[SEP] identifier[setComment] operator[SEP] identifier[DUPLICATE_ACTION_COMMENT] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , identifier[mappingPath] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[_actionMappings] operator[SEP] identifier[put] operator[SEP] identifier[mappingPath] , identifier[mapping] operator[SEP] operator[SEP] } }
public <T0, T1, T2, T3> SingleOutputStreamOperator<Tuple4<T0, T1, T2, T3>> projectTuple4() { TypeInformation<?>[] fTypes = extractFieldTypes(fieldIndexes, dataStream.getType()); TupleTypeInfo<Tuple4<T0, T1, T2, T3>> tType = new TupleTypeInfo<Tuple4<T0, T1, T2, T3>>(fTypes); return dataStream.transform("Projection", tType, new StreamProject<IN, Tuple4<T0, T1, T2, T3>>(fieldIndexes, tType.createSerializer(dataStream.getExecutionConfig()))); }
class class_name[name] begin[{] method[projectTuple4, return_type[type[SingleOutputStreamOperator]], modifier[public], parameter[]] begin[{] local_variable[type[TypeInformation], fTypes] local_variable[type[TupleTypeInfo], tType] return[call[dataStream.transform, parameter[literal["Projection"], member[.tType], ClassCreator(arguments=[MemberReference(member=fieldIndexes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getExecutionConfig, postfix_operators=[], prefix_operators=[], qualifier=dataStream, selectors=[], type_arguments=None)], member=createSerializer, postfix_operators=[], prefix_operators=[], qualifier=tType, selectors=[], type_arguments=None)], 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=IN, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T0, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T1, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T2, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T3, sub_type=None))], dimensions=[], name=Tuple4, sub_type=None))], dimensions=None, name=StreamProject, sub_type=None))]]] end[}] END[}]
Keyword[public] operator[<] identifier[T0] , identifier[T1] , identifier[T2] , identifier[T3] operator[>] identifier[SingleOutputStreamOperator] operator[<] identifier[Tuple4] operator[<] identifier[T0] , identifier[T1] , identifier[T2] , identifier[T3] operator[>] operator[>] identifier[projectTuple4] operator[SEP] operator[SEP] { identifier[TypeInformation] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[fTypes] operator[=] identifier[extractFieldTypes] operator[SEP] identifier[fieldIndexes] , identifier[dataStream] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[TupleTypeInfo] operator[<] identifier[Tuple4] operator[<] identifier[T0] , identifier[T1] , identifier[T2] , identifier[T3] operator[>] operator[>] identifier[tType] operator[=] Keyword[new] identifier[TupleTypeInfo] operator[<] identifier[Tuple4] operator[<] identifier[T0] , identifier[T1] , identifier[T2] , identifier[T3] operator[>] operator[>] operator[SEP] identifier[fTypes] operator[SEP] operator[SEP] Keyword[return] identifier[dataStream] operator[SEP] identifier[transform] operator[SEP] literal[String] , identifier[tType] , Keyword[new] identifier[StreamProject] operator[<] identifier[IN] , identifier[Tuple4] operator[<] identifier[T0] , identifier[T1] , identifier[T2] , identifier[T3] operator[>] operator[>] operator[SEP] identifier[fieldIndexes] , identifier[tType] operator[SEP] identifier[createSerializer] operator[SEP] identifier[dataStream] operator[SEP] identifier[getExecutionConfig] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void addExpression(final String _expression) { this.tokens.add(new Token(ValueList.TokenType.EXPRESSION, _expression)); getExpressions().add(_expression); }
class class_name[name] begin[{] method[addExpression, return_type[void], modifier[public], parameter[_expression]] begin[{] THIS[member[None.tokens]call[None.add, parameter[ClassCreator(arguments=[MemberReference(member=EXPRESSION, postfix_operators=[], prefix_operators=[], qualifier=ValueList.TokenType, selectors=[]), MemberReference(member=_expression, 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=Token, sub_type=None))]]] call[.getExpressions, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addExpression] operator[SEP] Keyword[final] identifier[String] identifier[_expression] operator[SEP] { Keyword[this] operator[SEP] identifier[tokens] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Token] operator[SEP] identifier[ValueList] operator[SEP] identifier[TokenType] operator[SEP] identifier[EXPRESSION] , identifier[_expression] operator[SEP] operator[SEP] operator[SEP] identifier[getExpressions] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[_expression] operator[SEP] operator[SEP] }
@Override public GetFunctionConfigurationResult getFunctionConfiguration(GetFunctionConfigurationRequest request) { request = beforeClientExecution(request); return executeGetFunctionConfiguration(request); }
class class_name[name] begin[{] method[getFunctionConfiguration, return_type[type[GetFunctionConfigurationResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetFunctionConfiguration, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[GetFunctionConfigurationResult] identifier[getFunctionConfiguration] operator[SEP] identifier[GetFunctionConfigurationRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeGetFunctionConfiguration] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public <S> S getService(final ServiceReference<S> reference, final BundleContext context) { if (System.getSecurityManager() == null) return context.getService(reference); return AccessController.doPrivileged(new PrivilegedAction<S>() { @Override public S run() { return context.getService(reference); } }, controlContext); }
class class_name[name] begin[{] method[getService, return_type[type[S]], modifier[public], parameter[reference, context]] begin[{] if[binary_operation[call[System.getSecurityManager, parameter[]], ==, literal[null]]] begin[{] return[call[context.getService, parameter[member[.reference]]]] else begin[{] None end[}] return[call[AccessController.doPrivileged, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=reference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getService, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=S, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=S, sub_type=None))], dimensions=None, name=PrivilegedAction, sub_type=None)), member[.controlContext]]]] end[}] END[}]
Keyword[public] operator[<] identifier[S] operator[>] identifier[S] identifier[getService] operator[SEP] Keyword[final] identifier[ServiceReference] operator[<] identifier[S] operator[>] identifier[reference] , Keyword[final] identifier[BundleContext] identifier[context] operator[SEP] { Keyword[if] operator[SEP] identifier[System] operator[SEP] identifier[getSecurityManager] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] Keyword[return] identifier[context] operator[SEP] identifier[getService] operator[SEP] identifier[reference] operator[SEP] operator[SEP] Keyword[return] identifier[AccessController] operator[SEP] identifier[doPrivileged] operator[SEP] Keyword[new] identifier[PrivilegedAction] operator[<] identifier[S] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[S] identifier[run] operator[SEP] operator[SEP] { Keyword[return] identifier[context] operator[SEP] identifier[getService] operator[SEP] identifier[reference] operator[SEP] operator[SEP] } } , identifier[controlContext] operator[SEP] operator[SEP] }
@Override public GetTerminologyResult getTerminology(GetTerminologyRequest request) { request = beforeClientExecution(request); return executeGetTerminology(request); }
class class_name[name] begin[{] method[getTerminology, return_type[type[GetTerminologyResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetTerminology, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[GetTerminologyResult] identifier[getTerminology] operator[SEP] identifier[GetTerminologyRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeGetTerminology] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static com.liferay.commerce.product.model.CPRuleAssetCategoryRel createCPRuleAssetCategoryRel( long CPRuleAssetCategoryRelId) { return getService() .createCPRuleAssetCategoryRel(CPRuleAssetCategoryRelId); }
class class_name[name] begin[{] method[createCPRuleAssetCategoryRel, return_type[type[com]], modifier[public static], parameter[CPRuleAssetCategoryRelId]] begin[{] return[call[.getService, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[product] operator[SEP] identifier[model] operator[SEP] identifier[CPRuleAssetCategoryRel] identifier[createCPRuleAssetCategoryRel] operator[SEP] Keyword[long] identifier[CPRuleAssetCategoryRelId] operator[SEP] { Keyword[return] identifier[getService] operator[SEP] operator[SEP] operator[SEP] identifier[createCPRuleAssetCategoryRel] operator[SEP] identifier[CPRuleAssetCategoryRelId] operator[SEP] operator[SEP] }
private static ServletHolder createHuluServletHolder(){ ServletHolder servletHolder = new ServletHolder(ActionServlet.class); servletHolder.setAsyncSupported(false); servletHolder.setInitOrder(1); return servletHolder; }
class class_name[name] begin[{] method[createHuluServletHolder, return_type[type[ServletHolder]], modifier[private static], parameter[]] begin[{] local_variable[type[ServletHolder], servletHolder] call[servletHolder.setAsyncSupported, parameter[literal[false]]] call[servletHolder.setInitOrder, parameter[literal[1]]] return[member[.servletHolder]] end[}] END[}]
Keyword[private] Keyword[static] identifier[ServletHolder] identifier[createHuluServletHolder] operator[SEP] operator[SEP] { identifier[ServletHolder] identifier[servletHolder] operator[=] Keyword[new] identifier[ServletHolder] operator[SEP] identifier[ActionServlet] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[servletHolder] operator[SEP] identifier[setAsyncSupported] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[servletHolder] operator[SEP] identifier[setInitOrder] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[return] identifier[servletHolder] operator[SEP] }
public PhotoList<Photo> getPhotos(String photosetId, Set<String> extras, int privacy_filter, int perPage, int page) throws FlickrException { PhotoList<Photo> photos = new PhotoList<Photo>(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_PHOTOS); parameters.put("photoset_id", photosetId); if (perPage > 0) { parameters.put("per_page", String.valueOf(perPage)); } if (page > 0) { parameters.put("page", String.valueOf(page)); } if (privacy_filter > 0) { parameters.put("privacy_filter", "" + privacy_filter); } if (extras != null && !extras.isEmpty()) { parameters.put(Extras.KEY_EXTRAS, StringUtilities.join(extras, ",")); } Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element photoset = response.getPayload(); NodeList photoElements = photoset.getElementsByTagName("photo"); photos.setPage(photoset.getAttribute("page")); photos.setPages(photoset.getAttribute("pages")); photos.setPerPage(photoset.getAttribute("per_page")); photos.setTotal(photoset.getAttribute("total")); for (int i = 0; i < photoElements.getLength(); i++) { Element photoElement = (Element) photoElements.item(i); photos.add(PhotoUtils.createPhoto(photoElement, photoset)); } return photos; }
class class_name[name] begin[{] method[getPhotos, return_type[type[PhotoList]], modifier[public], parameter[photosetId, extras, privacy_filter, perPage, page]] begin[{] local_variable[type[PhotoList], photos] local_variable[type[Map], parameters] call[parameters.put, parameter[literal["method"], member[.METHOD_GET_PHOTOS]]] call[parameters.put, parameter[literal["photoset_id"], member[.photosetId]]] if[binary_operation[member[.perPage], >, literal[0]]] begin[{] call[parameters.put, parameter[literal["per_page"], call[String.valueOf, parameter[member[.perPage]]]]] else begin[{] None end[}] if[binary_operation[member[.page], >, literal[0]]] begin[{] call[parameters.put, parameter[literal["page"], call[String.valueOf, parameter[member[.page]]]]] else begin[{] None end[}] if[binary_operation[member[.privacy_filter], >, literal[0]]] begin[{] call[parameters.put, parameter[literal["privacy_filter"], binary_operation[literal[""], +, member[.privacy_filter]]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.extras], !=, literal[null]], &&, call[extras.isEmpty, parameter[]]]] begin[{] call[parameters.put, parameter[member[Extras.KEY_EXTRAS], call[StringUtilities.join, parameter[member[.extras], literal[","]]]]] else begin[{] None end[}] local_variable[type[Response], response] if[call[response.isError, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getErrorCode, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getErrorMessage, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FlickrException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Element], photoset] local_variable[type[NodeList], photoElements] call[photos.setPage, parameter[call[photoset.getAttribute, parameter[literal["page"]]]]] call[photos.setPages, parameter[call[photoset.getAttribute, parameter[literal["pages"]]]]] call[photos.setPerPage, parameter[call[photoset.getAttribute, parameter[literal["per_page"]]]]] call[photos.setTotal, parameter[call[photoset.getAttribute, parameter[literal["total"]]]]] 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=item, postfix_operators=[], prefix_operators=[], qualifier=photoElements, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), name=photoElement)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=photoElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=photoset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createPhoto, postfix_operators=[], prefix_operators=[], qualifier=PhotoUtils, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=photos, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=photoElements, 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[.photos]] end[}] END[}]
Keyword[public] identifier[PhotoList] operator[<] identifier[Photo] operator[>] identifier[getPhotos] operator[SEP] identifier[String] identifier[photosetId] , identifier[Set] operator[<] identifier[String] operator[>] identifier[extras] , Keyword[int] identifier[privacy_filter] , Keyword[int] identifier[perPage] , Keyword[int] identifier[page] operator[SEP] Keyword[throws] identifier[FlickrException] { identifier[PhotoList] operator[<] identifier[Photo] operator[>] identifier[photos] operator[=] Keyword[new] identifier[PhotoList] operator[<] identifier[Photo] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameters] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[METHOD_GET_PHOTOS] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[photosetId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[perPage] operator[>] Other[0] operator[SEP] { identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[perPage] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[page] operator[>] Other[0] operator[SEP] { identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[page] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[privacy_filter] operator[>] Other[0] operator[SEP] { identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[+] identifier[privacy_filter] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[extras] operator[!=] Other[null] operator[&&] operator[!] identifier[extras] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[parameters] operator[SEP] identifier[put] operator[SEP] identifier[Extras] operator[SEP] identifier[KEY_EXTRAS] , identifier[StringUtilities] operator[SEP] identifier[join] operator[SEP] identifier[extras] , literal[String] operator[SEP] operator[SEP] operator[SEP] } identifier[Response] identifier[response] operator[=] identifier[transportAPI] operator[SEP] identifier[get] operator[SEP] identifier[transportAPI] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] , identifier[parameters] , identifier[apiKey] , identifier[sharedSecret] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[response] operator[SEP] identifier[isError] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[FlickrException] operator[SEP] identifier[response] operator[SEP] identifier[getErrorCode] operator[SEP] operator[SEP] , identifier[response] operator[SEP] identifier[getErrorMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Element] identifier[photoset] operator[=] identifier[response] operator[SEP] identifier[getPayload] operator[SEP] operator[SEP] operator[SEP] identifier[NodeList] identifier[photoElements] operator[=] identifier[photoset] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[photos] operator[SEP] identifier[setPage] operator[SEP] identifier[photoset] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[photos] operator[SEP] identifier[setPages] operator[SEP] identifier[photoset] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[photos] operator[SEP] identifier[setPerPage] operator[SEP] identifier[photoset] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[photos] operator[SEP] identifier[setTotal] operator[SEP] identifier[photoset] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[photoElements] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Element] identifier[photoElement] operator[=] operator[SEP] identifier[Element] operator[SEP] identifier[photoElements] operator[SEP] identifier[item] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[photos] operator[SEP] identifier[add] operator[SEP] identifier[PhotoUtils] operator[SEP] identifier[createPhoto] operator[SEP] identifier[photoElement] , identifier[photoset] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[photos] operator[SEP] }
final void _setAsHead(LinkedList parent, Link tail) { _nextLink = tail; _parent = parent; _state = LinkState.HEAD; }
class class_name[name] begin[{] method[_setAsHead, return_type[void], modifier[final], parameter[parent, tail]] begin[{] assign[member[._nextLink], member[.tail]] assign[member[._parent], member[.parent]] assign[member[._state], member[LinkState.HEAD]] end[}] END[}]
Keyword[final] Keyword[void] identifier[_setAsHead] operator[SEP] identifier[LinkedList] identifier[parent] , identifier[Link] identifier[tail] operator[SEP] { identifier[_nextLink] operator[=] identifier[tail] operator[SEP] identifier[_parent] operator[=] identifier[parent] operator[SEP] identifier[_state] operator[=] identifier[LinkState] operator[SEP] identifier[HEAD] operator[SEP] }
public static void accept(SARLQuickfixProvider provider, Issue issue, IssueResolutionAcceptor acceptor) { final SuperTypeRemoveModification modification = new SuperTypeRemoveModification(); modification.setIssue(issue); modification.setTools(provider); acceptor.accept(issue, Messages.SARLQuickfixProvider_0, Messages.SARLQuickfixProvider_17, JavaPluginImages.IMG_CORRECTION_REMOVE, modification, IProposalRelevance.REMOVE_REDUNDANT_SUPER_INTERFACE); }
class class_name[name] begin[{] method[accept, return_type[void], modifier[public static], parameter[provider, issue, acceptor]] begin[{] local_variable[type[SuperTypeRemoveModification], modification] call[modification.setIssue, parameter[member[.issue]]] call[modification.setTools, parameter[member[.provider]]] call[acceptor.accept, parameter[member[.issue], member[Messages.SARLQuickfixProvider_0], member[Messages.SARLQuickfixProvider_17], member[JavaPluginImages.IMG_CORRECTION_REMOVE], member[.modification], member[IProposalRelevance.REMOVE_REDUNDANT_SUPER_INTERFACE]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[accept] operator[SEP] identifier[SARLQuickfixProvider] identifier[provider] , identifier[Issue] identifier[issue] , identifier[IssueResolutionAcceptor] identifier[acceptor] operator[SEP] { Keyword[final] identifier[SuperTypeRemoveModification] identifier[modification] operator[=] Keyword[new] identifier[SuperTypeRemoveModification] operator[SEP] operator[SEP] operator[SEP] identifier[modification] operator[SEP] identifier[setIssue] operator[SEP] identifier[issue] operator[SEP] operator[SEP] identifier[modification] operator[SEP] identifier[setTools] operator[SEP] identifier[provider] operator[SEP] operator[SEP] identifier[acceptor] operator[SEP] identifier[accept] operator[SEP] identifier[issue] , identifier[Messages] operator[SEP] identifier[SARLQuickfixProvider_0] , identifier[Messages] operator[SEP] identifier[SARLQuickfixProvider_17] , identifier[JavaPluginImages] operator[SEP] identifier[IMG_CORRECTION_REMOVE] , identifier[modification] , identifier[IProposalRelevance] operator[SEP] identifier[REMOVE_REDUNDANT_SUPER_INTERFACE] operator[SEP] operator[SEP] }
@Override public boolean accept( final AuditLogEntry entry ) { if ( !acceptedTypes.containsKey( entry.getGenericType() ) ) { return false; } return acceptedTypes.get( entry.getGenericType() ); }
class class_name[name] begin[{] method[accept, return_type[type[boolean]], modifier[public], parameter[entry]] begin[{] if[call[acceptedTypes.containsKey, parameter[call[entry.getGenericType, parameter[]]]]] begin[{] return[literal[false]] else begin[{] None end[}] return[call[acceptedTypes.get, parameter[call[entry.getGenericType, parameter[]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[accept] operator[SEP] Keyword[final] identifier[AuditLogEntry] identifier[entry] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[acceptedTypes] operator[SEP] identifier[containsKey] operator[SEP] identifier[entry] operator[SEP] identifier[getGenericType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] identifier[acceptedTypes] operator[SEP] identifier[get] operator[SEP] identifier[entry] operator[SEP] identifier[getGenericType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static EqualityException newEqualityException(String message, Object... args) { return newEqualityException(null, message, args); }
class class_name[name] begin[{] method[newEqualityException, return_type[type[EqualityException]], modifier[public static], parameter[message, args]] begin[{] return[call[.newEqualityException, parameter[literal[null], member[.message], member[.args]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[EqualityException] identifier[newEqualityException] operator[SEP] identifier[String] identifier[message] , identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[return] identifier[newEqualityException] operator[SEP] Other[null] , identifier[message] , identifier[args] operator[SEP] operator[SEP] }
public void matchListeners(BaseField field, boolean bCloneListeners, boolean bMatchEnabledState, boolean bSyncReferenceFields, boolean bMatchSelectedState) { FieldListener listener = this.getListener(); // Don't add the listeners that already exist in the target record (from the record's addListeners() method). FieldListener fieldListener = field.getListener(); while ((listener != null) && (fieldListener != null)) { // Get through the first listeners (The ones added in init in the addListeners() method) if (!fieldListener.getClass().getName().equals(listener.getClass().getName())) break; // Not the same... STOP. and start looking for matching listeners. if (bMatchEnabledState) fieldListener.setEnabledListener(listener.isEnabledListener()); listener = (FieldListener)listener.getNextListener(); // Skip to the next one in the chain. fieldListener = (FieldListener)fieldListener.getNextListener(); } while (listener != null) { // Clone all the file behaviors (that want to be cloned) int iBehaviorCount = 0; FieldListener thisListener = this.getListener(listener.getClass()); while ((thisListener != null) && (thisListener != listener)) { // There are more than one, count which one it is. iBehaviorCount++; thisListener = (FieldListener)thisListener.getListener(listener.getClass()); } FieldListener newBehavior = null; newBehavior = field.getListener(listener.getClass()); while (iBehaviorCount > 0) { // Get the correct one iBehaviorCount--; if (newBehavior != null) newBehavior = (FieldListener)newBehavior.getListener(listener.getClass()); } if ((bCloneListeners) && (newBehavior == null)) { try { newBehavior = (FieldListener)listener.clone(field); // Clone the field behavior } catch (CloneNotSupportedException ex) { newBehavior = null; } if (newBehavior != null) if (newBehavior.getOwner() == null) // This should have been set, just being careful (ie., next line never called) field.addListener(newBehavior); // Add them to the new query } if ((bMatchEnabledState) && (newBehavior != null)) newBehavior.setEnabledListener(listener.isEnabledListener()); listener = (FieldListener)listener.getNextListener(); // Do the next one in the chain } if ((bSyncReferenceFields) && (field instanceof ReferenceField)) { Record recReference = ((ReferenceField)field).getReferenceRecord(null, false); if (recReference != null) ((ReferenceField)field).setReferenceRecord(recReference); } if (bMatchSelectedState) field.setSelected(this.isSelected()); }
class class_name[name] begin[{] method[matchListeners, return_type[void], modifier[public], parameter[field, bCloneListeners, bMatchEnabledState, bSyncReferenceFields, bMatchSelectedState]] begin[{] local_variable[type[FieldListener], listener] local_variable[type[FieldListener], fieldListener] while[binary_operation[binary_operation[member[.listener], !=, literal[null]], &&, binary_operation[member[.fieldListener], !=, literal[null]]]] begin[{] if[call[fieldListener.getClass, parameter[]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] if[member[.bMatchEnabledState]] begin[{] call[fieldListener.setEnabledListener, parameter[call[listener.isEnabledListener, parameter[]]]] else begin[{] None end[}] assign[member[.listener], Cast(expression=MethodInvocation(arguments=[], member=getNextListener, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=FieldListener, sub_type=None))] assign[member[.fieldListener], Cast(expression=MethodInvocation(arguments=[], member=getNextListener, postfix_operators=[], prefix_operators=[], qualifier=fieldListener, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=FieldListener, sub_type=None))] end[}] while[binary_operation[member[.listener], !=, literal[null]]] begin[{] local_variable[type[int], iBehaviorCount] local_variable[type[FieldListener], thisListener] while[binary_operation[binary_operation[member[.thisListener], !=, literal[null]], &&, binary_operation[member[.thisListener], !=, member[.listener]]]] begin[{] member[.iBehaviorCount] assign[member[.thisListener], Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None)], member=getListener, postfix_operators=[], prefix_operators=[], qualifier=thisListener, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=FieldListener, sub_type=None))] end[}] local_variable[type[FieldListener], newBehavior] assign[member[.newBehavior], call[field.getListener, parameter[call[listener.getClass, parameter[]]]]] while[binary_operation[member[.iBehaviorCount], >, literal[0]]] begin[{] member[.iBehaviorCount] if[binary_operation[member[.newBehavior], !=, literal[null]]] begin[{] assign[member[.newBehavior], Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None)], member=getListener, postfix_operators=[], prefix_operators=[], qualifier=newBehavior, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=FieldListener, sub_type=None))] else begin[{] None end[}] end[}] if[binary_operation[member[.bCloneListeners], &&, binary_operation[member[.newBehavior], ==, literal[null]]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=newBehavior, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=clone, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=FieldListener, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=newBehavior, 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=['CloneNotSupportedException']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.newBehavior], !=, literal[null]]] begin[{] if[binary_operation[call[newBehavior.getOwner, parameter[]], ==, literal[null]]] begin[{] call[field.addListener, parameter[member[.newBehavior]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.bMatchEnabledState], &&, binary_operation[member[.newBehavior], !=, literal[null]]]] begin[{] call[newBehavior.setEnabledListener, parameter[call[listener.isEnabledListener, parameter[]]]] else begin[{] None end[}] assign[member[.listener], Cast(expression=MethodInvocation(arguments=[], member=getNextListener, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=FieldListener, sub_type=None))] end[}] if[binary_operation[member[.bSyncReferenceFields], &&, binary_operation[member[.field], instanceof, type[ReferenceField]]]] begin[{] local_variable[type[Record], recReference] if[binary_operation[member[.recReference], !=, literal[null]]] begin[{] Cast(expression=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ReferenceField, sub_type=None)) else begin[{] None end[}] else begin[{] None end[}] if[member[.bMatchSelectedState]] begin[{] call[field.setSelected, parameter[THIS[call[None.isSelected, parameter[]]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[matchListeners] operator[SEP] identifier[BaseField] identifier[field] , Keyword[boolean] identifier[bCloneListeners] , Keyword[boolean] identifier[bMatchEnabledState] , Keyword[boolean] identifier[bSyncReferenceFields] , Keyword[boolean] identifier[bMatchSelectedState] operator[SEP] { identifier[FieldListener] identifier[listener] operator[=] Keyword[this] operator[SEP] identifier[getListener] operator[SEP] operator[SEP] operator[SEP] identifier[FieldListener] identifier[fieldListener] operator[=] identifier[field] operator[SEP] identifier[getListener] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[listener] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[fieldListener] operator[!=] Other[null] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[fieldListener] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[listener] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[if] operator[SEP] identifier[bMatchEnabledState] operator[SEP] identifier[fieldListener] operator[SEP] identifier[setEnabledListener] operator[SEP] identifier[listener] operator[SEP] identifier[isEnabledListener] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[listener] operator[=] operator[SEP] identifier[FieldListener] operator[SEP] identifier[listener] operator[SEP] identifier[getNextListener] operator[SEP] operator[SEP] operator[SEP] identifier[fieldListener] operator[=] operator[SEP] identifier[FieldListener] operator[SEP] identifier[fieldListener] operator[SEP] identifier[getNextListener] operator[SEP] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] identifier[listener] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[iBehaviorCount] operator[=] Other[0] operator[SEP] identifier[FieldListener] identifier[thisListener] operator[=] Keyword[this] operator[SEP] identifier[getListener] operator[SEP] identifier[listener] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[thisListener] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[thisListener] operator[!=] identifier[listener] operator[SEP] operator[SEP] { identifier[iBehaviorCount] operator[++] operator[SEP] identifier[thisListener] operator[=] operator[SEP] identifier[FieldListener] operator[SEP] identifier[thisListener] operator[SEP] identifier[getListener] operator[SEP] identifier[listener] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[FieldListener] identifier[newBehavior] operator[=] Other[null] operator[SEP] identifier[newBehavior] operator[=] identifier[field] operator[SEP] identifier[getListener] operator[SEP] identifier[listener] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[iBehaviorCount] operator[>] Other[0] operator[SEP] { identifier[iBehaviorCount] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[newBehavior] operator[!=] Other[null] operator[SEP] identifier[newBehavior] operator[=] operator[SEP] identifier[FieldListener] operator[SEP] identifier[newBehavior] operator[SEP] identifier[getListener] operator[SEP] identifier[listener] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[bCloneListeners] operator[SEP] operator[&&] operator[SEP] identifier[newBehavior] operator[==] Other[null] operator[SEP] operator[SEP] { Keyword[try] { identifier[newBehavior] operator[=] operator[SEP] identifier[FieldListener] operator[SEP] identifier[listener] operator[SEP] identifier[clone] operator[SEP] identifier[field] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CloneNotSupportedException] identifier[ex] operator[SEP] { identifier[newBehavior] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[newBehavior] operator[!=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[newBehavior] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] identifier[field] operator[SEP] identifier[addListener] operator[SEP] identifier[newBehavior] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[bMatchEnabledState] operator[SEP] operator[&&] operator[SEP] identifier[newBehavior] operator[!=] Other[null] operator[SEP] operator[SEP] identifier[newBehavior] operator[SEP] identifier[setEnabledListener] operator[SEP] identifier[listener] operator[SEP] identifier[isEnabledListener] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[listener] operator[=] operator[SEP] identifier[FieldListener] operator[SEP] identifier[listener] operator[SEP] identifier[getNextListener] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[bSyncReferenceFields] operator[SEP] operator[&&] operator[SEP] identifier[field] Keyword[instanceof] identifier[ReferenceField] operator[SEP] operator[SEP] { identifier[Record] identifier[recReference] operator[=] operator[SEP] operator[SEP] identifier[ReferenceField] operator[SEP] identifier[field] operator[SEP] operator[SEP] identifier[getReferenceRecord] operator[SEP] Other[null] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[recReference] operator[!=] Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[ReferenceField] operator[SEP] identifier[field] operator[SEP] operator[SEP] identifier[setReferenceRecord] operator[SEP] identifier[recReference] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[bMatchSelectedState] operator[SEP] identifier[field] operator[SEP] identifier[setSelected] operator[SEP] Keyword[this] operator[SEP] identifier[isSelected] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int rowIndex, int vColIndex) { // 'value' is value contained in the cell located at // (rowIndex, vColIndex) if (isSelected) { // cell (and perhaps other cells) are selected } if (hasFocus) { // this cell is the anchor and the table has the focus } JComponent result = label; // Configure the component with the specified value if (!value.toString().equals("")) { result = button; ((JButton) button).setText(value.toString()); } // Set tool tip if desired //setToolTipText((String)value); // Since the renderer is a component, return itself return result; }
class class_name[name] begin[{] method[getTableCellRendererComponent, return_type[type[Component]], modifier[public], parameter[table, value, isSelected, hasFocus, rowIndex, vColIndex]] begin[{] if[member[.isSelected]] begin[{] else begin[{] None end[}] if[member[.hasFocus]] begin[{] else begin[{] None end[}] local_variable[type[JComponent], result] if[call[value.toString, parameter[]]] begin[{] assign[member[.result], member[.button]] Cast(expression=MemberReference(member=button, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JButton, sub_type=None)) else begin[{] None end[}] return[member[.result]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Component] identifier[getTableCellRendererComponent] operator[SEP] identifier[JTable] identifier[table] , identifier[Object] identifier[value] , Keyword[boolean] identifier[isSelected] , Keyword[boolean] identifier[hasFocus] , Keyword[int] identifier[rowIndex] , Keyword[int] identifier[vColIndex] operator[SEP] { Keyword[if] operator[SEP] identifier[isSelected] operator[SEP] { } Keyword[if] operator[SEP] identifier[hasFocus] operator[SEP] { } identifier[JComponent] identifier[result] operator[=] identifier[label] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[result] operator[=] identifier[button] operator[SEP] operator[SEP] operator[SEP] identifier[JButton] operator[SEP] identifier[button] operator[SEP] operator[SEP] identifier[setText] operator[SEP] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
Stream<WavefrontMetricLineData> writeMeter(Meter meter) { long wallTime = clock.wallTime(); Stream.Builder<WavefrontMetricLineData> metrics = Stream.builder(); stream(meter.measure().spliterator(), false) .forEach(measurement -> { Meter.Id id = meter.getId().withTag(measurement.getStatistic()); addMetric(metrics, id, null, wallTime, measurement.getValue()); }); return metrics.build(); }
class class_name[name] begin[{] method[writeMeter, return_type[type[Stream]], modifier[default], parameter[meter]] begin[{] local_variable[type[long], wallTime] local_variable[type[Stream], metrics] call[.stream, parameter[call[meter.measure, parameter[]], literal[false]]] return[call[metrics.build, parameter[]]] end[}] END[}]
identifier[Stream] operator[<] identifier[WavefrontMetricLineData] operator[>] identifier[writeMeter] operator[SEP] identifier[Meter] identifier[meter] operator[SEP] { Keyword[long] identifier[wallTime] operator[=] identifier[clock] operator[SEP] identifier[wallTime] operator[SEP] operator[SEP] operator[SEP] identifier[Stream] operator[SEP] identifier[Builder] operator[<] identifier[WavefrontMetricLineData] operator[>] identifier[metrics] operator[=] identifier[Stream] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] identifier[meter] operator[SEP] identifier[measure] operator[SEP] operator[SEP] operator[SEP] identifier[spliterator] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identifier[measurement] operator[->] { identifier[Meter] operator[SEP] identifier[Id] identifier[id] operator[=] identifier[meter] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[withTag] operator[SEP] identifier[measurement] operator[SEP] identifier[getStatistic] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addMetric] operator[SEP] identifier[metrics] , identifier[id] , Other[null] , identifier[wallTime] , identifier[measurement] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] Keyword[return] identifier[metrics] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
private void addPostParams(final Request request) { if (includeCredentials != null) { request.addPostParam("IncludeCredentials", includeCredentials.toString()); } if (friendlyName != null) { request.addPostParam("FriendlyName", friendlyName); } }
class class_name[name] begin[{] method[addPostParams, return_type[void], modifier[private], parameter[request]] begin[{] if[binary_operation[member[.includeCredentials], !=, literal[null]]] begin[{] call[request.addPostParam, parameter[literal["IncludeCredentials"], call[includeCredentials.toString, parameter[]]]] else begin[{] None end[}] if[binary_operation[member[.friendlyName], !=, literal[null]]] begin[{] call[request.addPostParam, parameter[literal["FriendlyName"], member[.friendlyName]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[addPostParams] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] { Keyword[if] operator[SEP] identifier[includeCredentials] operator[!=] Other[null] operator[SEP] { identifier[request] operator[SEP] identifier[addPostParam] operator[SEP] literal[String] , identifier[includeCredentials] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[friendlyName] operator[!=] Other[null] operator[SEP] { identifier[request] operator[SEP] identifier[addPostParam] operator[SEP] literal[String] , identifier[friendlyName] operator[SEP] operator[SEP] } }
protected boolean isOneShotQuery(CachedQuery cachedQuery) { if (cachedQuery == null) { return true; } cachedQuery.increaseExecuteCount(); if ((mPrepareThreshold == 0 || cachedQuery.getExecuteCount() < mPrepareThreshold) && !getForceBinaryTransfer()) { return true; } return false; }
class class_name[name] begin[{] method[isOneShotQuery, return_type[type[boolean]], modifier[protected], parameter[cachedQuery]] begin[{] if[binary_operation[member[.cachedQuery], ==, literal[null]]] begin[{] return[literal[true]] else begin[{] None end[}] call[cachedQuery.increaseExecuteCount, parameter[]] if[binary_operation[binary_operation[binary_operation[member[.mPrepareThreshold], ==, literal[0]], ||, binary_operation[call[cachedQuery.getExecuteCount, parameter[]], <, member[.mPrepareThreshold]]], &&, call[.getForceBinaryTransfer, parameter[]]]] begin[{] return[literal[true]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[isOneShotQuery] operator[SEP] identifier[CachedQuery] identifier[cachedQuery] operator[SEP] { Keyword[if] operator[SEP] identifier[cachedQuery] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[cachedQuery] operator[SEP] identifier[increaseExecuteCount] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[mPrepareThreshold] operator[==] Other[0] operator[||] identifier[cachedQuery] operator[SEP] identifier[getExecuteCount] operator[SEP] operator[SEP] operator[<] identifier[mPrepareThreshold] operator[SEP] operator[&&] operator[!] identifier[getForceBinaryTransfer] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public PatternAnyEntityExtractor getPatternAnyEntityInfo(UUID appId, String versionId, UUID entityId) { return getPatternAnyEntityInfoWithServiceResponseAsync(appId, versionId, entityId).toBlocking().single().body(); }
class class_name[name] begin[{] method[getPatternAnyEntityInfo, return_type[type[PatternAnyEntityExtractor]], modifier[public], parameter[appId, versionId, entityId]] begin[{] return[call[.getPatternAnyEntityInfoWithServiceResponseAsync, parameter[member[.appId], member[.versionId], member[.entityId]]]] end[}] END[}]
Keyword[public] identifier[PatternAnyEntityExtractor] identifier[getPatternAnyEntityInfo] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[UUID] identifier[entityId] operator[SEP] { Keyword[return] identifier[getPatternAnyEntityInfoWithServiceResponseAsync] operator[SEP] identifier[appId] , identifier[versionId] , identifier[entityId] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }