code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
static String pullFontPathFromStyle(Context context, AttributeSet attrs, int[] attributeId) { if (attributeId == null || attrs == null) return null; final TypedArray typedArray = context.obtainStyledAttributes(attrs, attributeId); if (typedArray != null) { try { // First defined attribute String fontFromAttribute = typedArray.getString(0); if (!TextUtils.isEmpty(fontFromAttribute)) { return fontFromAttribute; } } catch (Exception ignore) { // Failed for some reason. } finally { typedArray.recycle(); } } return null; }
class class_name[name] begin[{] method[pullFontPathFromStyle, return_type[type[String]], modifier[static], parameter[context, attrs, attributeId]] begin[{] if[binary_operation[binary_operation[member[.attributeId], ==, literal[null]], ||, binary_operation[member[.attrs], ==, literal[null]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[TypedArray], typedArray] if[binary_operation[member[.typedArray], !=, literal[null]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getString, postfix_operators=[], prefix_operators=[], qualifier=typedArray, selectors=[], type_arguments=None), name=fontFromAttribute)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=fontFromAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=TextUtils, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=fontFromAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignore, types=['Exception']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=recycle, postfix_operators=[], prefix_operators=[], qualifier=typedArray, selectors=[], type_arguments=None), label=None)], label=None, resources=None) else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[static] identifier[String] identifier[pullFontPathFromStyle] operator[SEP] identifier[Context] identifier[context] , identifier[AttributeSet] identifier[attrs] , Keyword[int] operator[SEP] operator[SEP] identifier[attributeId] operator[SEP] { Keyword[if] operator[SEP] identifier[attributeId] operator[==] Other[null] operator[||] identifier[attrs] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[final] identifier[TypedArray] identifier[typedArray] operator[=] identifier[context] operator[SEP] identifier[obtainStyledAttributes] operator[SEP] identifier[attrs] , identifier[attributeId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[typedArray] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[String] identifier[fontFromAttribute] operator[=] identifier[typedArray] operator[SEP] identifier[getString] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[TextUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[fontFromAttribute] operator[SEP] operator[SEP] { Keyword[return] identifier[fontFromAttribute] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[ignore] operator[SEP] { } Keyword[finally] { identifier[typedArray] operator[SEP] identifier[recycle] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public static String wherePKColumns(Class<?> entityClass, String entityName, boolean useVersion) { StringBuilder sql = new StringBuilder(); boolean hasLogicDelete = hasLogicDeleteColumn(entityClass); sql.append("<where>"); //获取全部列 Set<EntityColumn> columnSet = EntityHelper.getPKColumns(entityClass); //当某个列有主键策略时,不需要考虑他的属性是否为空,因为如果为空,一定会根据主键策略给他生成一个值 for (EntityColumn column : columnSet) { sql.append(" AND ").append(column.getColumnEqualsHolder(entityName)); } if (useVersion) { sql.append(whereVersion(entityClass)); } if (hasLogicDelete) { sql.append(whereLogicDelete(entityClass, false)); } sql.append("</where>"); return sql.toString(); }
class class_name[name] begin[{] method[wherePKColumns, return_type[type[String]], modifier[public static], parameter[entityClass, entityName, useVersion]] begin[{] local_variable[type[StringBuilder], sql] local_variable[type[boolean], hasLogicDelete] call[sql.append, parameter[literal["<where>"]]] local_variable[type[Set], columnSet] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" AND ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sql, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=entityName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getColumnEqualsHolder, postfix_operators=[], prefix_operators=[], qualifier=column, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=columnSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=column)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EntityColumn, sub_type=None))), label=None) if[member[.useVersion]] begin[{] call[sql.append, parameter[call[.whereVersion, parameter[member[.entityClass]]]]] else begin[{] None end[}] if[member[.hasLogicDelete]] begin[{] call[sql.append, parameter[call[.whereLogicDelete, parameter[member[.entityClass], literal[false]]]]] else begin[{] None end[}] call[sql.append, parameter[literal["</where>"]]] return[call[sql.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[wherePKColumns] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[entityClass] , identifier[String] identifier[entityName] , Keyword[boolean] identifier[useVersion] operator[SEP] { identifier[StringBuilder] identifier[sql] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[hasLogicDelete] operator[=] identifier[hasLogicDeleteColumn] operator[SEP] identifier[entityClass] operator[SEP] operator[SEP] identifier[sql] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[EntityColumn] operator[>] identifier[columnSet] operator[=] identifier[EntityHelper] operator[SEP] identifier[getPKColumns] operator[SEP] identifier[entityClass] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[EntityColumn] identifier[column] operator[:] identifier[columnSet] operator[SEP] { identifier[sql] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[column] operator[SEP] identifier[getColumnEqualsHolder] operator[SEP] identifier[entityName] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[useVersion] operator[SEP] { identifier[sql] operator[SEP] identifier[append] operator[SEP] identifier[whereVersion] operator[SEP] identifier[entityClass] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[hasLogicDelete] operator[SEP] { identifier[sql] operator[SEP] identifier[append] operator[SEP] identifier[whereLogicDelete] operator[SEP] identifier[entityClass] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] } identifier[sql] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[sql] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@Override public void writeProject(final File fileName, final CCTask task, final ProjectDef projectDef, final List<File> sources, final Map<String, TargetInfo> targets, final TargetInfo linkTarget) throws IOException, SAXException { String projectName = projectDef.getName(); if (projectName == null) { projectName = fileName.getName(); } final File vcprojFile = new File(fileName + ".vcproj"); if (!projectDef.getOverwrite() && vcprojFile.exists()) { throw new BuildException("Not allowed to overwrite project file " + vcprojFile.toString()); } final File slnFile = new File(fileName + ".sln"); if (!projectDef.getOverwrite() && slnFile.exists()) { throw new BuildException("Not allowed to overwrite project file " + slnFile.toString()); } final CommandLineCompilerConfiguration compilerConfig = getBaseCompilerConfiguration(targets); if (compilerConfig == null) { throw new BuildException("Unable to generate Visual Studio.NET project " + "when Microsoft C++ is not used."); } final OutputStream outStream = new FileOutputStream(fileName + ".vcproj"); final OutputFormat format = new OutputFormat("xml", "UTF-8", true); final XMLSerializer serializer = new XMLSerializer(outStream, format); final ContentHandler content = serializer.asContentHandler(); final String basePath = fileName.getParentFile().getAbsolutePath(); content.startDocument(); for (final CommentDef commentDef : projectDef.getComments()) { final String comment = commentDef.getText(); serializer.comment(comment); } final AttributesImpl emptyAttrs = new AttributesImpl(); final AttributesImpl attributes = new AttributesImpl(); addAttribute(attributes, "ProjectType", "Visual C++"); addAttribute(attributes, "Version", this.version); addAttribute(attributes, "Name", projectName); content.startElement(null, "VisualStudioProject", "VisualStudioProject", attributes); content.startElement(null, "Platforms", "Platforms", emptyAttrs); attributes.clear(); addAttribute(attributes, "Name", "Win32"); content.startElement(null, "Platform", "Platform", attributes); content.endElement(null, "Platform", "Platform"); content.endElement(null, "Platforms", "Platforms"); content.startElement(null, "Configurations", "Configurations", emptyAttrs); // // write debug configuration // writeConfigurationStartTag(content, true, task, compilerConfig); writeCompilerElement(content, true, basePath, compilerConfig); writeLinkerElement(content, true, projectDef.getDependencies(), basePath, linkTarget, targets); content.endElement(null, "Configuration", "Configuration"); // // write release configuration // writeConfigurationStartTag(content, false, task, compilerConfig); writeCompilerElement(content, false, basePath, compilerConfig); writeLinkerElement(content, false, projectDef.getDependencies(), basePath, linkTarget, targets); content.endElement(null, "Configuration", "Configuration"); content.endElement(null, "Configurations", "Configurations"); content.startElement(null, "References", "References", emptyAttrs); content.endElement(null, "References", "References"); content.startElement(null, "Files", "Files", emptyAttrs); final File[] sortedSources = new File[sources.size()]; sources.toArray(sortedSources); Arrays.sort(sortedSources, new Comparator<File>() { @Override public int compare(final File o1, final File o2) { return o1.getName().compareTo(o2.getName()); } }); writeFilteredSources("Source Files", "cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx", basePath, sortedSources, content); writeFilteredSources("Header Files", "h;hpp;hxx;hm;inl;inc;xsd", basePath, sortedSources, content); writeFilteredSources("Resource Files", "rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx", basePath, sortedSources, content); content.endElement(null, "Files", "Files"); content.startElement(null, "Globals", "Globals", emptyAttrs); content.endElement(null, "Globals", "Globals"); content.endElement(null, "VisualStudioProject", "VisualStudioProject"); content.endDocument(); }
class class_name[name] begin[{] method[writeProject, return_type[void], modifier[public], parameter[fileName, task, projectDef, sources, targets, linkTarget]] begin[{] local_variable[type[String], projectName] if[binary_operation[member[.projectName], ==, literal[null]]] begin[{] assign[member[.projectName], call[fileName.getName, parameter[]]] else begin[{] None end[}] local_variable[type[File], vcprojFile] if[binary_operation[call[projectDef.getOverwrite, parameter[]], &&, call[vcprojFile.exists, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Not allowed to overwrite project file "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=vcprojFile, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BuildException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[File], slnFile] if[binary_operation[call[projectDef.getOverwrite, parameter[]], &&, call[slnFile.exists, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Not allowed to overwrite project file "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=slnFile, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BuildException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[CommandLineCompilerConfiguration], compilerConfig] if[binary_operation[member[.compilerConfig], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to generate Visual Studio.NET project "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="when Microsoft C++ is not used."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BuildException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[OutputStream], outStream] local_variable[type[OutputFormat], format] local_variable[type[XMLSerializer], serializer] local_variable[type[ContentHandler], content] local_variable[type[String], basePath] call[content.startDocument, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getText, postfix_operators=[], prefix_operators=[], qualifier=commentDef, selectors=[], type_arguments=None), name=comment)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=comment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=comment, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getComments, postfix_operators=[], prefix_operators=[], qualifier=projectDef, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=commentDef)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=CommentDef, sub_type=None))), label=None) local_variable[type[AttributesImpl], emptyAttrs] local_variable[type[AttributesImpl], attributes] call[.addAttribute, parameter[member[.attributes], literal["ProjectType"], literal["Visual C++"]]] call[.addAttribute, parameter[member[.attributes], literal["Version"], THIS[member[None.version]]]] call[.addAttribute, parameter[member[.attributes], literal["Name"], member[.projectName]]] call[content.startElement, parameter[literal[null], literal["VisualStudioProject"], literal["VisualStudioProject"], member[.attributes]]] call[content.startElement, parameter[literal[null], literal["Platforms"], literal["Platforms"], member[.emptyAttrs]]] call[attributes.clear, parameter[]] call[.addAttribute, parameter[member[.attributes], literal["Name"], literal["Win32"]]] call[content.startElement, parameter[literal[null], literal["Platform"], literal["Platform"], member[.attributes]]] call[content.endElement, parameter[literal[null], literal["Platform"], literal["Platform"]]] call[content.endElement, parameter[literal[null], literal["Platforms"], literal["Platforms"]]] call[content.startElement, parameter[literal[null], literal["Configurations"], literal["Configurations"], member[.emptyAttrs]]] call[.writeConfigurationStartTag, parameter[member[.content], literal[true], member[.task], member[.compilerConfig]]] call[.writeCompilerElement, parameter[member[.content], literal[true], member[.basePath], member[.compilerConfig]]] call[.writeLinkerElement, parameter[member[.content], literal[true], call[projectDef.getDependencies, parameter[]], member[.basePath], member[.linkTarget], member[.targets]]] call[content.endElement, parameter[literal[null], literal["Configuration"], literal["Configuration"]]] call[.writeConfigurationStartTag, parameter[member[.content], literal[false], member[.task], member[.compilerConfig]]] call[.writeCompilerElement, parameter[member[.content], literal[false], member[.basePath], member[.compilerConfig]]] call[.writeLinkerElement, parameter[member[.content], literal[false], call[projectDef.getDependencies, parameter[]], member[.basePath], member[.linkTarget], member[.targets]]] call[content.endElement, parameter[literal[null], literal["Configuration"], literal["Configuration"]]] call[content.endElement, parameter[literal[null], literal["Configurations"], literal["Configurations"]]] call[content.startElement, parameter[literal[null], literal["References"], literal["References"], member[.emptyAttrs]]] call[content.endElement, parameter[literal[null], literal["References"], literal["References"]]] call[content.startElement, parameter[literal[null], literal["Files"], literal["Files"], member[.emptyAttrs]]] local_variable[type[File], sortedSources] call[sources.toArray, parameter[member[.sortedSources]]] call[Arrays.sort, parameter[member[.sortedSources], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=o1, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=o2, selectors=[], type_arguments=None)], member=compareTo, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=compare, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=o1, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=o2, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=int), 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=File, sub_type=None))], dimensions=None, name=Comparator, sub_type=None))]] call[.writeFilteredSources, parameter[literal["Source Files"], literal["cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"], member[.basePath], member[.sortedSources], member[.content]]] call[.writeFilteredSources, parameter[literal["Header Files"], literal["h;hpp;hxx;hm;inl;inc;xsd"], member[.basePath], member[.sortedSources], member[.content]]] call[.writeFilteredSources, parameter[literal["Resource Files"], literal["rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"], member[.basePath], member[.sortedSources], member[.content]]] call[content.endElement, parameter[literal[null], literal["Files"], literal["Files"]]] call[content.startElement, parameter[literal[null], literal["Globals"], literal["Globals"], member[.emptyAttrs]]] call[content.endElement, parameter[literal[null], literal["Globals"], literal["Globals"]]] call[content.endElement, parameter[literal[null], literal["VisualStudioProject"], literal["VisualStudioProject"]]] call[content.endDocument, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[writeProject] operator[SEP] Keyword[final] identifier[File] identifier[fileName] , Keyword[final] identifier[CCTask] identifier[task] , Keyword[final] identifier[ProjectDef] identifier[projectDef] , Keyword[final] identifier[List] operator[<] identifier[File] operator[>] identifier[sources] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[TargetInfo] operator[>] identifier[targets] , Keyword[final] identifier[TargetInfo] identifier[linkTarget] operator[SEP] Keyword[throws] identifier[IOException] , identifier[SAXException] { identifier[String] identifier[projectName] operator[=] identifier[projectDef] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[projectName] operator[==] Other[null] operator[SEP] { identifier[projectName] operator[=] identifier[fileName] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[File] identifier[vcprojFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[fileName] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[projectDef] operator[SEP] identifier[getOverwrite] operator[SEP] operator[SEP] operator[&&] identifier[vcprojFile] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[BuildException] operator[SEP] literal[String] operator[+] identifier[vcprojFile] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[File] identifier[slnFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[fileName] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[projectDef] operator[SEP] identifier[getOverwrite] operator[SEP] operator[SEP] operator[&&] identifier[slnFile] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[BuildException] operator[SEP] literal[String] operator[+] identifier[slnFile] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[CommandLineCompilerConfiguration] identifier[compilerConfig] operator[=] identifier[getBaseCompilerConfiguration] operator[SEP] identifier[targets] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[compilerConfig] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[BuildException] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[final] identifier[OutputStream] identifier[outStream] operator[=] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[fileName] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[OutputFormat] identifier[format] operator[=] Keyword[new] identifier[OutputFormat] operator[SEP] literal[String] , literal[String] , literal[boolean] operator[SEP] operator[SEP] Keyword[final] identifier[XMLSerializer] identifier[serializer] operator[=] Keyword[new] identifier[XMLSerializer] operator[SEP] identifier[outStream] , identifier[format] operator[SEP] operator[SEP] Keyword[final] identifier[ContentHandler] identifier[content] operator[=] identifier[serializer] operator[SEP] identifier[asContentHandler] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[basePath] operator[=] identifier[fileName] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[startDocument] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[CommentDef] identifier[commentDef] operator[:] identifier[projectDef] operator[SEP] identifier[getComments] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[comment] operator[=] identifier[commentDef] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] identifier[serializer] operator[SEP] identifier[comment] operator[SEP] identifier[comment] operator[SEP] operator[SEP] } Keyword[final] identifier[AttributesImpl] identifier[emptyAttrs] operator[=] Keyword[new] identifier[AttributesImpl] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[AttributesImpl] identifier[attributes] operator[=] Keyword[new] identifier[AttributesImpl] operator[SEP] operator[SEP] operator[SEP] identifier[addAttribute] operator[SEP] identifier[attributes] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[addAttribute] operator[SEP] identifier[attributes] , literal[String] , Keyword[this] operator[SEP] identifier[version] operator[SEP] operator[SEP] identifier[addAttribute] operator[SEP] identifier[attributes] , literal[String] , identifier[projectName] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[startElement] operator[SEP] Other[null] , literal[String] , literal[String] , identifier[attributes] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[startElement] operator[SEP] Other[null] , literal[String] , literal[String] , identifier[emptyAttrs] operator[SEP] operator[SEP] identifier[attributes] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[addAttribute] operator[SEP] identifier[attributes] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[startElement] operator[SEP] Other[null] , literal[String] , literal[String] , identifier[attributes] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[endElement] operator[SEP] Other[null] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[endElement] operator[SEP] Other[null] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[startElement] operator[SEP] Other[null] , literal[String] , literal[String] , identifier[emptyAttrs] operator[SEP] operator[SEP] identifier[writeConfigurationStartTag] operator[SEP] identifier[content] , literal[boolean] , identifier[task] , identifier[compilerConfig] operator[SEP] operator[SEP] identifier[writeCompilerElement] operator[SEP] identifier[content] , literal[boolean] , identifier[basePath] , identifier[compilerConfig] operator[SEP] operator[SEP] identifier[writeLinkerElement] operator[SEP] identifier[content] , literal[boolean] , identifier[projectDef] operator[SEP] identifier[getDependencies] operator[SEP] operator[SEP] , identifier[basePath] , identifier[linkTarget] , identifier[targets] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[endElement] operator[SEP] Other[null] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[writeConfigurationStartTag] operator[SEP] identifier[content] , literal[boolean] , identifier[task] , identifier[compilerConfig] operator[SEP] operator[SEP] identifier[writeCompilerElement] operator[SEP] identifier[content] , literal[boolean] , identifier[basePath] , identifier[compilerConfig] operator[SEP] operator[SEP] identifier[writeLinkerElement] operator[SEP] identifier[content] , literal[boolean] , identifier[projectDef] operator[SEP] identifier[getDependencies] operator[SEP] operator[SEP] , identifier[basePath] , identifier[linkTarget] , identifier[targets] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[endElement] operator[SEP] Other[null] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[endElement] operator[SEP] Other[null] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[startElement] operator[SEP] Other[null] , literal[String] , literal[String] , identifier[emptyAttrs] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[endElement] operator[SEP] Other[null] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[startElement] operator[SEP] Other[null] , literal[String] , literal[String] , identifier[emptyAttrs] operator[SEP] operator[SEP] Keyword[final] identifier[File] operator[SEP] operator[SEP] identifier[sortedSources] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[sources] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sources] operator[SEP] identifier[toArray] operator[SEP] identifier[sortedSources] operator[SEP] operator[SEP] identifier[Arrays] operator[SEP] identifier[sort] operator[SEP] identifier[sortedSources] , Keyword[new] identifier[Comparator] operator[<] identifier[File] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compare] operator[SEP] Keyword[final] identifier[File] identifier[o1] , Keyword[final] identifier[File] identifier[o2] operator[SEP] { Keyword[return] identifier[o1] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[o2] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[writeFilteredSources] operator[SEP] literal[String] , literal[String] , identifier[basePath] , identifier[sortedSources] , identifier[content] operator[SEP] operator[SEP] identifier[writeFilteredSources] operator[SEP] literal[String] , literal[String] , identifier[basePath] , identifier[sortedSources] , identifier[content] operator[SEP] operator[SEP] identifier[writeFilteredSources] operator[SEP] literal[String] , literal[String] , identifier[basePath] , identifier[sortedSources] , identifier[content] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[endElement] operator[SEP] Other[null] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[startElement] operator[SEP] Other[null] , literal[String] , literal[String] , identifier[emptyAttrs] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[endElement] operator[SEP] Other[null] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[endElement] operator[SEP] Other[null] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[endDocument] operator[SEP] operator[SEP] operator[SEP] }
public boolean isVisible(TypeFinder typeFinder, IType fromType, IMember target) throws JavaModelException { final int flags = target.getFlags(); if (Flags.isPublic(flags)) { return true; } final String fromTypeName = fromType.getFullyQualifiedName(); final String memberType = target.getDeclaringType().getFullyQualifiedName(); if (Flags.isPrivate(flags)) { return target.getDeclaringType().getFullyQualifiedName().equals(fromTypeName); } if (Flags.isProtected(flags)) { IType t = fromType; while (t != null) { if (memberType.equals(t.getFullyQualifiedName())) { return true; } final String typeName = t.getSuperclassName(); if (Strings.isNullOrEmpty(typeName)) { t = null; } else { t = typeFinder.findType(typeName); } } } final IPackageFragment f1 = target.getDeclaringType().getPackageFragment(); final IPackageFragment f2 = fromType.getPackageFragment(); if (f1.isDefaultPackage()) { return f2.isDefaultPackage(); } return f1.getElementName().equals(f2.getElementName()); }
class class_name[name] begin[{] method[isVisible, return_type[type[boolean]], modifier[public], parameter[typeFinder, fromType, target]] begin[{] local_variable[type[int], flags] if[call[Flags.isPublic, parameter[member[.flags]]]] begin[{] return[literal[true]] else begin[{] None end[}] local_variable[type[String], fromTypeName] local_variable[type[String], memberType] if[call[Flags.isPrivate, parameter[member[.flags]]]] begin[{] return[call[target.getDeclaringType, parameter[]]] else begin[{] None end[}] if[call[Flags.isProtected, parameter[member[.flags]]]] begin[{] local_variable[type[IType], t] while[binary_operation[member[.t], !=, literal[null]]] begin[{] if[call[memberType.equals, parameter[call[t.getFullyQualifiedName, parameter[]]]]] begin[{] return[literal[true]] else begin[{] None end[}] local_variable[type[String], typeName] if[call[Strings.isNullOrEmpty, parameter[member[.typeName]]]] begin[{] assign[member[.t], literal[null]] else begin[{] assign[member[.t], call[typeFinder.findType, parameter[member[.typeName]]]] end[}] end[}] else begin[{] None end[}] local_variable[type[IPackageFragment], f1] local_variable[type[IPackageFragment], f2] if[call[f1.isDefaultPackage, parameter[]]] begin[{] return[call[f2.isDefaultPackage, parameter[]]] else begin[{] None end[}] return[call[f1.getElementName, parameter[]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isVisible] operator[SEP] identifier[TypeFinder] identifier[typeFinder] , identifier[IType] identifier[fromType] , identifier[IMember] identifier[target] operator[SEP] Keyword[throws] identifier[JavaModelException] { Keyword[final] Keyword[int] identifier[flags] operator[=] identifier[target] operator[SEP] identifier[getFlags] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Flags] operator[SEP] identifier[isPublic] operator[SEP] identifier[flags] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[final] identifier[String] identifier[fromTypeName] operator[=] identifier[fromType] operator[SEP] identifier[getFullyQualifiedName] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[memberType] operator[=] identifier[target] operator[SEP] identifier[getDeclaringType] operator[SEP] operator[SEP] operator[SEP] identifier[getFullyQualifiedName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Flags] operator[SEP] identifier[isPrivate] operator[SEP] identifier[flags] operator[SEP] operator[SEP] { Keyword[return] identifier[target] operator[SEP] identifier[getDeclaringType] operator[SEP] operator[SEP] operator[SEP] identifier[getFullyQualifiedName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[fromTypeName] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[Flags] operator[SEP] identifier[isProtected] operator[SEP] identifier[flags] operator[SEP] operator[SEP] { identifier[IType] identifier[t] operator[=] identifier[fromType] operator[SEP] Keyword[while] operator[SEP] identifier[t] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[memberType] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] identifier[getFullyQualifiedName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[final] identifier[String] identifier[typeName] operator[=] identifier[t] operator[SEP] identifier[getSuperclassName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Strings] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[typeName] operator[SEP] operator[SEP] { identifier[t] operator[=] Other[null] operator[SEP] } Keyword[else] { identifier[t] operator[=] identifier[typeFinder] operator[SEP] identifier[findType] operator[SEP] identifier[typeName] operator[SEP] operator[SEP] } } } Keyword[final] identifier[IPackageFragment] identifier[f1] operator[=] identifier[target] operator[SEP] identifier[getDeclaringType] operator[SEP] operator[SEP] operator[SEP] identifier[getPackageFragment] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[IPackageFragment] identifier[f2] operator[=] identifier[fromType] operator[SEP] identifier[getPackageFragment] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[f1] operator[SEP] identifier[isDefaultPackage] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[f2] operator[SEP] identifier[isDefaultPackage] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[f1] operator[SEP] identifier[getElementName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[f2] operator[SEP] identifier[getElementName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(DeprecateWorkflowTypeRequest deprecateWorkflowTypeRequest, ProtocolMarshaller protocolMarshaller) { if (deprecateWorkflowTypeRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deprecateWorkflowTypeRequest.getDomain(), DOMAIN_BINDING); protocolMarshaller.marshall(deprecateWorkflowTypeRequest.getWorkflowType(), WORKFLOWTYPE_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[deprecateWorkflowTypeRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.deprecateWorkflowTypeRequest], ==, 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=getDomain, postfix_operators=[], prefix_operators=[], qualifier=deprecateWorkflowTypeRequest, selectors=[], type_arguments=None), MemberReference(member=DOMAIN_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=getWorkflowType, postfix_operators=[], prefix_operators=[], qualifier=deprecateWorkflowTypeRequest, selectors=[], type_arguments=None), MemberReference(member=WORKFLOWTYPE_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[DeprecateWorkflowTypeRequest] identifier[deprecateWorkflowTypeRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[deprecateWorkflowTypeRequest] 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[deprecateWorkflowTypeRequest] operator[SEP] identifier[getDomain] operator[SEP] operator[SEP] , identifier[DOMAIN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[deprecateWorkflowTypeRequest] operator[SEP] identifier[getWorkflowType] operator[SEP] operator[SEP] , identifier[WORKFLOWTYPE_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
@Override public final String getNamespaceURI(String prefix) { if (prefix.length() == 0) { //default NS return mDefaultNsURI; } if (mNsMapping != null) { String uri = mNsMapping.findUriByPrefix(prefix); if (uri != null) { return uri; } } return (mRootNsContext != null) ? mRootNsContext.getNamespaceURI(prefix) : null; }
class class_name[name] begin[{] method[getNamespaceURI, return_type[type[String]], modifier[final public], parameter[prefix]] begin[{] if[binary_operation[call[prefix.length, parameter[]], ==, literal[0]]] begin[{] return[member[.mDefaultNsURI]] else begin[{] None end[}] if[binary_operation[member[.mNsMapping], !=, literal[null]]] begin[{] local_variable[type[String], uri] if[binary_operation[member[.uri], !=, literal[null]]] begin[{] return[member[.uri]] else begin[{] None end[}] else begin[{] None end[}] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=mRootNsContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[MemberReference(member=prefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getNamespaceURI, postfix_operators=[], prefix_operators=[], qualifier=mRootNsContext, selectors=[], type_arguments=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[String] identifier[getNamespaceURI] operator[SEP] identifier[String] identifier[prefix] operator[SEP] { Keyword[if] operator[SEP] identifier[prefix] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[mDefaultNsURI] operator[SEP] } Keyword[if] operator[SEP] identifier[mNsMapping] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[uri] operator[=] identifier[mNsMapping] operator[SEP] identifier[findUriByPrefix] operator[SEP] identifier[prefix] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[uri] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[uri] operator[SEP] } } Keyword[return] operator[SEP] identifier[mRootNsContext] operator[!=] Other[null] operator[SEP] operator[?] identifier[mRootNsContext] operator[SEP] identifier[getNamespaceURI] operator[SEP] identifier[prefix] operator[SEP] operator[:] Other[null] operator[SEP] }
public static <K, V> void putAll(Map<K, V> to, Map<? extends K, ? extends V> from) { if (to != null && from != null) { to.putAll(from); } }
class class_name[name] begin[{] method[putAll, return_type[void], modifier[public static], parameter[to, from]] begin[{] if[binary_operation[binary_operation[member[.to], !=, literal[null]], &&, binary_operation[member[.from], !=, literal[null]]]] begin[{] call[to.putAll, parameter[member[.from]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] Keyword[void] identifier[putAll] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[to] , identifier[Map] operator[<] operator[?] Keyword[extends] identifier[K] , operator[?] Keyword[extends] identifier[V] operator[>] identifier[from] operator[SEP] { Keyword[if] operator[SEP] identifier[to] operator[!=] Other[null] operator[&&] identifier[from] operator[!=] Other[null] operator[SEP] { identifier[to] operator[SEP] identifier[putAll] operator[SEP] identifier[from] operator[SEP] operator[SEP] } }
public ModelService getModelService(String serviceName){ ModelService service = getDirectoryServiceClient().getService(serviceName, null); return service; }
class class_name[name] begin[{] method[getModelService, return_type[type[ModelService]], modifier[public], parameter[serviceName]] begin[{] local_variable[type[ModelService], service] return[member[.service]] end[}] END[}]
Keyword[public] identifier[ModelService] identifier[getModelService] operator[SEP] identifier[String] identifier[serviceName] operator[SEP] { identifier[ModelService] identifier[service] operator[=] identifier[getDirectoryServiceClient] operator[SEP] operator[SEP] operator[SEP] identifier[getService] operator[SEP] identifier[serviceName] , Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[service] operator[SEP] }
public static boolean toBoolean(final int value, final int trueValue, final int falseValue) { if (value == trueValue) { return true; } if (value == falseValue) { return false; } // no match throw new IllegalArgumentException("The Integer did not match either specified value"); }
class class_name[name] begin[{] method[toBoolean, return_type[type[boolean]], modifier[public static], parameter[value, trueValue, falseValue]] begin[{] if[binary_operation[member[.value], ==, member[.trueValue]]] begin[{] return[literal[true]] else begin[{] None end[}] if[binary_operation[member[.value], ==, member[.falseValue]]] begin[{] return[literal[false]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The Integer did not match either specified value")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[toBoolean] operator[SEP] Keyword[final] Keyword[int] identifier[value] , Keyword[final] Keyword[int] identifier[trueValue] , Keyword[final] Keyword[int] identifier[falseValue] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==] identifier[trueValue] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[value] operator[==] identifier[falseValue] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] }
private static String serviceToPortOrBlank(String serviceName) { String envVarName = toServicePortEnvironmentVariable(serviceName); return getEnvVarOrSystemProperty(envVarName, ""); }
class class_name[name] begin[{] method[serviceToPortOrBlank, return_type[type[String]], modifier[private static], parameter[serviceName]] begin[{] local_variable[type[String], envVarName] return[call[.getEnvVarOrSystemProperty, parameter[member[.envVarName], literal[""]]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[serviceToPortOrBlank] operator[SEP] identifier[String] identifier[serviceName] operator[SEP] { identifier[String] identifier[envVarName] operator[=] identifier[toServicePortEnvironmentVariable] operator[SEP] identifier[serviceName] operator[SEP] operator[SEP] Keyword[return] identifier[getEnvVarOrSystemProperty] operator[SEP] identifier[envVarName] , literal[String] operator[SEP] operator[SEP] }
public NrqlAlertConditionCache nrqlAlertConditions(long policyId) { NrqlAlertConditionCache cache = nrqlConditions.get(policyId); if(cache == null) nrqlConditions.put(policyId, cache = new NrqlAlertConditionCache(policyId)); return cache; }
class class_name[name] begin[{] method[nrqlAlertConditions, return_type[type[NrqlAlertConditionCache]], modifier[public], parameter[policyId]] begin[{] local_variable[type[NrqlAlertConditionCache], cache] if[binary_operation[member[.cache], ==, literal[null]]] begin[{] call[nrqlConditions.put, parameter[member[.policyId], assign[member[.cache], ClassCreator(arguments=[MemberReference(member=policyId, 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=NrqlAlertConditionCache, sub_type=None))]]] else begin[{] None end[}] return[member[.cache]] end[}] END[}]
Keyword[public] identifier[NrqlAlertConditionCache] identifier[nrqlAlertConditions] operator[SEP] Keyword[long] identifier[policyId] operator[SEP] { identifier[NrqlAlertConditionCache] identifier[cache] operator[=] identifier[nrqlConditions] operator[SEP] identifier[get] operator[SEP] identifier[policyId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cache] operator[==] Other[null] operator[SEP] identifier[nrqlConditions] operator[SEP] identifier[put] operator[SEP] identifier[policyId] , identifier[cache] operator[=] Keyword[new] identifier[NrqlAlertConditionCache] operator[SEP] identifier[policyId] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[cache] operator[SEP] }
protected Tracer.SpanBuilder newSpan(HttpRequest<?> request, SpanContext spanContext) { String spanName = resolveSpanName(request); Tracer.SpanBuilder spanBuilder = tracer.buildSpan( spanName ).asChildOf(spanContext); spanBuilder.withTag(TAG_METHOD, request.getMethod().name()); String path = request.getPath(); spanBuilder.withTag(TAG_PATH, path); return spanBuilder; }
class class_name[name] begin[{] method[newSpan, return_type[type[Tracer]], modifier[protected], parameter[request, spanContext]] begin[{] local_variable[type[String], spanName] local_variable[type[Tracer], spanBuilder] call[spanBuilder.withTag, parameter[member[.TAG_METHOD], call[request.getMethod, parameter[]]]] local_variable[type[String], path] call[spanBuilder.withTag, parameter[member[.TAG_PATH], member[.path]]] return[member[.spanBuilder]] end[}] END[}]
Keyword[protected] identifier[Tracer] operator[SEP] identifier[SpanBuilder] identifier[newSpan] operator[SEP] identifier[HttpRequest] operator[<] operator[?] operator[>] identifier[request] , identifier[SpanContext] identifier[spanContext] operator[SEP] { identifier[String] identifier[spanName] operator[=] identifier[resolveSpanName] operator[SEP] identifier[request] operator[SEP] operator[SEP] identifier[Tracer] operator[SEP] identifier[SpanBuilder] identifier[spanBuilder] operator[=] identifier[tracer] operator[SEP] identifier[buildSpan] operator[SEP] identifier[spanName] operator[SEP] operator[SEP] identifier[asChildOf] operator[SEP] identifier[spanContext] operator[SEP] operator[SEP] identifier[spanBuilder] operator[SEP] identifier[withTag] operator[SEP] identifier[TAG_METHOD] , identifier[request] operator[SEP] identifier[getMethod] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[path] operator[=] identifier[request] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[spanBuilder] operator[SEP] identifier[withTag] operator[SEP] identifier[TAG_PATH] , identifier[path] operator[SEP] operator[SEP] Keyword[return] identifier[spanBuilder] operator[SEP] }
public static Closeable closeableFrom(@WillNotClose @Nullable final Clob clob) { return closeableFrom(clob, Clob::free); }
class class_name[name] begin[{] method[closeableFrom, return_type[type[Closeable]], modifier[public static], parameter[clob]] begin[{] return[call[.closeableFrom, parameter[member[.clob], MethodReference(expression=MemberReference(member=Clob, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=free, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Closeable] identifier[closeableFrom] operator[SEP] annotation[@] identifier[WillNotClose] annotation[@] identifier[Nullable] Keyword[final] identifier[Clob] identifier[clob] operator[SEP] { Keyword[return] identifier[closeableFrom] operator[SEP] identifier[clob] , identifier[Clob] operator[::] identifier[free] operator[SEP] operator[SEP] }
public void updateStatus(long time,Object currentValue){ this.currentStatus.setTime(time); this.currentStatus.setLastValue(currentValue); }
class class_name[name] begin[{] method[updateStatus, return_type[void], modifier[public], parameter[time, currentValue]] begin[{] THIS[member[None.currentStatus]call[None.setTime, parameter[member[.time]]]] THIS[member[None.currentStatus]call[None.setLastValue, parameter[member[.currentValue]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[updateStatus] operator[SEP] Keyword[long] identifier[time] , identifier[Object] identifier[currentValue] operator[SEP] { Keyword[this] operator[SEP] identifier[currentStatus] operator[SEP] identifier[setTime] operator[SEP] identifier[time] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[currentStatus] operator[SEP] identifier[setLastValue] operator[SEP] identifier[currentValue] operator[SEP] operator[SEP] }
public NotificationChain basicSetBlock(XBlockExpression newBlock, NotificationChain msgs) { XBlockExpression oldBlock = block; block = newBlock; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PureXbasePackage.MODEL__BLOCK, oldBlock, newBlock); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; }
class class_name[name] begin[{] method[basicSetBlock, return_type[type[NotificationChain]], modifier[public], parameter[newBlock, msgs]] begin[{] local_variable[type[XBlockExpression], oldBlock] assign[member[.block], member[.newBlock]] if[call[.eNotificationRequired, parameter[]]] begin[{] local_variable[type[ENotificationImpl], notification] if[binary_operation[member[.msgs], ==, literal[null]]] begin[{] assign[member[.msgs], member[.notification]] else begin[{] call[msgs.add, parameter[member[.notification]]] end[}] else begin[{] None end[}] return[member[.msgs]] end[}] END[}]
Keyword[public] identifier[NotificationChain] identifier[basicSetBlock] operator[SEP] identifier[XBlockExpression] identifier[newBlock] , identifier[NotificationChain] identifier[msgs] operator[SEP] { identifier[XBlockExpression] identifier[oldBlock] operator[=] identifier[block] operator[SEP] identifier[block] operator[=] identifier[newBlock] operator[SEP] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] { identifier[ENotificationImpl] identifier[notification] operator[=] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[PureXbasePackage] operator[SEP] identifier[MODEL__BLOCK] , identifier[oldBlock] , identifier[newBlock] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[msgs] operator[==] Other[null] operator[SEP] identifier[msgs] operator[=] identifier[notification] operator[SEP] Keyword[else] identifier[msgs] operator[SEP] identifier[add] operator[SEP] identifier[notification] operator[SEP] operator[SEP] } Keyword[return] identifier[msgs] operator[SEP] }
public void addVariable(String name, Class<?> type) { addVariable(name, Typ.getTypeFor(type)); }
class class_name[name] begin[{] method[addVariable, return_type[void], modifier[public], parameter[name, type]] begin[{] call[.addVariable, parameter[member[.name], call[Typ.getTypeFor, parameter[member[.type]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addVariable] operator[SEP] identifier[String] identifier[name] , identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[SEP] { identifier[addVariable] operator[SEP] identifier[name] , identifier[Typ] operator[SEP] identifier[getTypeFor] operator[SEP] identifier[type] operator[SEP] operator[SEP] operator[SEP] }
public static DetailsDialog showErrorDialog (Stage stage, String text) { return showErrorDialog(stage, text, (String) null); }
class class_name[name] begin[{] method[showErrorDialog, return_type[type[DetailsDialog]], modifier[public static], parameter[stage, text]] begin[{] return[call[.showErrorDialog, parameter[member[.stage], member[.text], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[DetailsDialog] identifier[showErrorDialog] operator[SEP] identifier[Stage] identifier[stage] , identifier[String] identifier[text] operator[SEP] { Keyword[return] identifier[showErrorDialog] operator[SEP] identifier[stage] , identifier[text] , operator[SEP] identifier[String] operator[SEP] Other[null] operator[SEP] operator[SEP] }
private void registerInterceptors(HttpClientBuilder clientBuilder) { clientBuilder.addInterceptorFirst(new HttpRequestInterceptor() { public void process(final HttpRequest request, final HttpContext context) throws IOException { if (log.isInfoEnabled()) { RequestLine req = request.getRequestLine(); log.info("> " + req.getMethod() + " " + URLDecoder.decode(req.getUri(), "UTF-8")); } } }); clientBuilder.addInterceptorFirst(new HttpResponseInterceptor() { public void process(final HttpResponse response, final HttpContext context) throws IOException { if (log.isInfoEnabled()) { log.info("< Status: " + response.getStatusLine().getStatusCode()); } validate(response); } }); }
class class_name[name] begin[{] method[registerInterceptors, return_type[void], modifier[private], parameter[clientBuilder]] begin[{] call[clientBuilder.addInterceptorFirst, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[IfStatement(condition=MethodInvocation(arguments=[], member=isInfoEnabled, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getRequestLine, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), name=req)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RequestLine, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="> "), operandr=MethodInvocation(arguments=[], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=req, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), operator=+), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getUri, postfix_operators=[], prefix_operators=[], qualifier=req, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF-8")], member=decode, postfix_operators=[], prefix_operators=[], qualifier=URLDecoder, selectors=[], type_arguments=None), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=process, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=request, type=ReferenceType(arguments=None, dimensions=[], name=HttpRequest, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=context, type=ReferenceType(arguments=None, dimensions=[], name=HttpContext, sub_type=None), varargs=False)], return_type=None, throws=['IOException'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HttpRequestInterceptor, sub_type=None))]] call[clientBuilder.addInterceptorFirst, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[IfStatement(condition=MethodInvocation(arguments=[], member=isInfoEnabled, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="< Status: "), operandr=MethodInvocation(arguments=[], member=getStatusLine, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[MethodInvocation(arguments=[], member=getStatusCode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=validate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=process, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=response, type=ReferenceType(arguments=None, dimensions=[], name=HttpResponse, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=context, type=ReferenceType(arguments=None, dimensions=[], name=HttpContext, sub_type=None), varargs=False)], return_type=None, throws=['IOException'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HttpResponseInterceptor, sub_type=None))]] end[}] END[}]
Keyword[private] Keyword[void] identifier[registerInterceptors] operator[SEP] identifier[HttpClientBuilder] identifier[clientBuilder] operator[SEP] { identifier[clientBuilder] operator[SEP] identifier[addInterceptorFirst] operator[SEP] Keyword[new] identifier[HttpRequestInterceptor] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[process] operator[SEP] Keyword[final] identifier[HttpRequest] identifier[request] , Keyword[final] identifier[HttpContext] identifier[context] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[RequestLine] identifier[req] operator[=] identifier[request] operator[SEP] identifier[getRequestLine] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[req] operator[SEP] identifier[getMethod] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[URLDecoder] operator[SEP] identifier[decode] operator[SEP] identifier[req] operator[SEP] identifier[getUri] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] identifier[clientBuilder] operator[SEP] identifier[addInterceptorFirst] operator[SEP] Keyword[new] identifier[HttpResponseInterceptor] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[process] operator[SEP] Keyword[final] identifier[HttpResponse] identifier[response] , Keyword[final] identifier[HttpContext] identifier[context] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[response] operator[SEP] identifier[getStatusLine] operator[SEP] operator[SEP] operator[SEP] identifier[getStatusCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[validate] operator[SEP] identifier[response] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public static byte[] idToBytes(final int tree_id) { if (tree_id < 1 || tree_id > 65535) { throw new IllegalArgumentException("Missing or invalid tree ID"); } final byte[] id = Bytes.fromInt(tree_id); return Arrays.copyOfRange(id, id.length - TREE_ID_WIDTH, id.length); }
class class_name[name] begin[{] method[idToBytes, return_type[type[byte]], modifier[public static], parameter[tree_id]] begin[{] if[binary_operation[binary_operation[member[.tree_id], <, literal[1]], ||, binary_operation[member[.tree_id], >, literal[65535]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Missing or invalid tree ID")], 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[byte], id] return[call[Arrays.copyOfRange, parameter[member[.id], binary_operation[member[id.length], -, member[.TREE_ID_WIDTH]], member[id.length]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[idToBytes] operator[SEP] Keyword[final] Keyword[int] identifier[tree_id] operator[SEP] { Keyword[if] operator[SEP] identifier[tree_id] operator[<] Other[1] operator[||] identifier[tree_id] operator[>] Other[65535] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[id] operator[=] identifier[Bytes] operator[SEP] identifier[fromInt] operator[SEP] identifier[tree_id] operator[SEP] operator[SEP] Keyword[return] identifier[Arrays] operator[SEP] identifier[copyOfRange] operator[SEP] identifier[id] , identifier[id] operator[SEP] identifier[length] operator[-] identifier[TREE_ID_WIDTH] , identifier[id] operator[SEP] identifier[length] operator[SEP] operator[SEP] }
@SuppressWarnings("rawtypes") public Object execute(final Map<Object, Object> iArgs) { if (indexName == null) throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet"); final ODatabaseRecord database = getDatabase(); final OIndex<?> idx; if (fields == null || fields.length == 0) { if (keyTypes != null) idx = database.getMetadata().getIndexManager() .createIndex(indexName, indexType.toString(), new OSimpleKeyIndexDefinition(keyTypes), null, null); else if (serializerKeyId != 0) { idx = database.getMetadata().getIndexManager() .createIndex(indexName, indexType.toString(), new ORuntimeKeyIndexDefinition(serializerKeyId), null, null); } else idx = database.getMetadata().getIndexManager().createIndex(indexName, indexType.toString(), null, null, null); } else { if (keyTypes == null || keyTypes.length == 0) { idx = oClass.createIndex(indexName, indexType, fields); } else { final OIndexDefinition idxDef = OIndexDefinitionFactory.createIndexDefinition(oClass, Arrays.asList(fields), Arrays.asList(keyTypes)); idx = database.getMetadata().getIndexManager() .createIndex(indexName, indexType.name(), idxDef, oClass.getPolymorphicClusterIds(), null); } } if (idx != null) return idx.getSize(); return null; }
class class_name[name] begin[{] method[execute, return_type[type[Object]], modifier[public], parameter[iArgs]] begin[{] if[binary_operation[member[.indexName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot execute the command because it has not been parsed yet")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OCommandExecutionException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[ODatabaseRecord], database] local_variable[type[OIndex], idx] if[binary_operation[binary_operation[member[.fields], ==, literal[null]], ||, binary_operation[member[fields.length], ==, literal[0]]]] begin[{] if[binary_operation[member[.keyTypes], !=, literal[null]]] begin[{] assign[member[.idx], call[database.getMetadata, parameter[]]] else begin[{] if[binary_operation[member[.serializerKeyId], !=, literal[0]]] begin[{] assign[member[.idx], call[database.getMetadata, parameter[]]] else begin[{] assign[member[.idx], call[database.getMetadata, parameter[]]] end[}] end[}] else begin[{] if[binary_operation[binary_operation[member[.keyTypes], ==, literal[null]], ||, binary_operation[member[keyTypes.length], ==, literal[0]]]] begin[{] assign[member[.idx], call[oClass.createIndex, parameter[member[.indexName], member[.indexType], member[.fields]]]] else begin[{] local_variable[type[OIndexDefinition], idxDef] assign[member[.idx], call[database.getMetadata, parameter[]]] end[}] end[}] if[binary_operation[member[.idx], !=, literal[null]]] begin[{] return[call[idx.getSize, parameter[]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Object] identifier[execute] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[iArgs] operator[SEP] { Keyword[if] operator[SEP] identifier[indexName] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[OCommandExecutionException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[ODatabaseRecord] identifier[database] operator[=] identifier[getDatabase] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[OIndex] operator[<] operator[?] operator[>] identifier[idx] operator[SEP] Keyword[if] operator[SEP] identifier[fields] operator[==] Other[null] operator[||] identifier[fields] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[keyTypes] operator[!=] Other[null] operator[SEP] identifier[idx] operator[=] identifier[database] operator[SEP] identifier[getMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getIndexManager] operator[SEP] operator[SEP] operator[SEP] identifier[createIndex] operator[SEP] identifier[indexName] , identifier[indexType] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Keyword[new] identifier[OSimpleKeyIndexDefinition] operator[SEP] identifier[keyTypes] operator[SEP] , Other[null] , Other[null] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[serializerKeyId] operator[!=] Other[0] operator[SEP] { identifier[idx] operator[=] identifier[database] operator[SEP] identifier[getMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getIndexManager] operator[SEP] operator[SEP] operator[SEP] identifier[createIndex] operator[SEP] identifier[indexName] , identifier[indexType] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Keyword[new] identifier[ORuntimeKeyIndexDefinition] operator[SEP] identifier[serializerKeyId] operator[SEP] , Other[null] , Other[null] operator[SEP] operator[SEP] } Keyword[else] identifier[idx] operator[=] identifier[database] operator[SEP] identifier[getMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getIndexManager] operator[SEP] operator[SEP] operator[SEP] identifier[createIndex] operator[SEP] identifier[indexName] , identifier[indexType] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Other[null] , Other[null] , Other[null] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[keyTypes] operator[==] Other[null] operator[||] identifier[keyTypes] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { identifier[idx] operator[=] identifier[oClass] operator[SEP] identifier[createIndex] operator[SEP] identifier[indexName] , identifier[indexType] , identifier[fields] operator[SEP] operator[SEP] } Keyword[else] { Keyword[final] identifier[OIndexDefinition] identifier[idxDef] operator[=] identifier[OIndexDefinitionFactory] operator[SEP] identifier[createIndexDefinition] operator[SEP] identifier[oClass] , identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[fields] operator[SEP] , identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[keyTypes] operator[SEP] operator[SEP] operator[SEP] identifier[idx] operator[=] identifier[database] operator[SEP] identifier[getMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getIndexManager] operator[SEP] operator[SEP] operator[SEP] identifier[createIndex] operator[SEP] identifier[indexName] , identifier[indexType] operator[SEP] identifier[name] operator[SEP] operator[SEP] , identifier[idxDef] , identifier[oClass] operator[SEP] identifier[getPolymorphicClusterIds] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[idx] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[idx] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
public static void initEscapeClosesDialogs() { final AWTEventListener awtEventListener = new AWTEventListener() { /** {@inheritDoc} */ @Override public void eventDispatched(final AWTEvent event) { if (event instanceof KeyEvent && ((KeyEvent) event).getKeyCode() == KeyEvent.VK_ESCAPE && event.getID() == KeyEvent.KEY_PRESSED) { escapePressed(); } } }; Toolkit.getDefaultToolkit().addAWTEventListener(awtEventListener, AWTEvent.KEY_EVENT_MASK); }
class class_name[name] begin[{] method[initEscapeClosesDialogs, return_type[void], modifier[public static], parameter[]] begin[{] local_variable[type[AWTEventListener], awtEventListener] call[Toolkit.getDefaultToolkit, parameter[]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[initEscapeClosesDialogs] operator[SEP] operator[SEP] { Keyword[final] identifier[AWTEventListener] identifier[awtEventListener] operator[=] Keyword[new] identifier[AWTEventListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eventDispatched] operator[SEP] Keyword[final] identifier[AWTEvent] identifier[event] operator[SEP] { Keyword[if] operator[SEP] identifier[event] Keyword[instanceof] identifier[KeyEvent] operator[&&] operator[SEP] operator[SEP] identifier[KeyEvent] operator[SEP] identifier[event] operator[SEP] operator[SEP] identifier[getKeyCode] operator[SEP] operator[SEP] operator[==] identifier[KeyEvent] operator[SEP] identifier[VK_ESCAPE] operator[&&] identifier[event] operator[SEP] identifier[getID] operator[SEP] operator[SEP] operator[==] identifier[KeyEvent] operator[SEP] identifier[KEY_PRESSED] operator[SEP] { identifier[escapePressed] operator[SEP] operator[SEP] operator[SEP] } } } operator[SEP] identifier[Toolkit] operator[SEP] identifier[getDefaultToolkit] operator[SEP] operator[SEP] operator[SEP] identifier[addAWTEventListener] operator[SEP] identifier[awtEventListener] , identifier[AWTEvent] operator[SEP] identifier[KEY_EVENT_MASK] operator[SEP] operator[SEP] }
public java.util.List<StartRequest> getStartWorkspaceRequests() { if (startWorkspaceRequests == null) { startWorkspaceRequests = new com.amazonaws.internal.SdkInternalList<StartRequest>(); } return startWorkspaceRequests; }
class class_name[name] begin[{] method[getStartWorkspaceRequests, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.startWorkspaceRequests], ==, literal[null]]] begin[{] assign[member[.startWorkspaceRequests], ClassCreator(arguments=[], 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=StartRequest, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.startWorkspaceRequests]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[StartRequest] operator[>] identifier[getStartWorkspaceRequests] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[startWorkspaceRequests] operator[==] Other[null] operator[SEP] { identifier[startWorkspaceRequests] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[StartRequest] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[startWorkspaceRequests] operator[SEP] }
@Override public Map<String, List<CloudInstance>> getCloudInstances(CloudInstanceRepository repository) { DescribeInstancesResult instanceResult; if (null == settings.getFilters() || settings.getFilters().isEmpty() ) { instanceResult = ec2Client.describeInstances(); } else { instanceResult = ec2Client.describeInstances(buildFilterRequest(settings.getFilters())); } DescribeAutoScalingInstancesResult autoScaleResult = autoScalingClient.describeAutoScalingInstances(); List<AutoScalingInstanceDetails> autoScalingInstanceDetails = autoScaleResult.getAutoScalingInstances(); Map<String, String> autoScaleMap = new HashMap<>(); for (AutoScalingInstanceDetails ai : autoScalingInstanceDetails) { autoScaleMap.put(ai.getInstanceId(), ai.getAutoScalingGroupName()); } Map<String, List<Instance>> ownerInstanceMap = new HashMap<>(); List<Instance> instanceList = new ArrayList<>(); List<Reservation> reservations = instanceResult.getReservations(); for (Reservation currRes : reservations) { List<Instance> currInstanceList = currRes.getInstances(); if (CollectionUtils.isEmpty(ownerInstanceMap.get(currRes.getOwnerId()))) { ownerInstanceMap.put(currRes.getOwnerId(), currRes.getInstances()); } else { ownerInstanceMap.get(currRes.getOwnerId()).addAll(currRes.getInstances()); } instanceList.addAll(currInstanceList); } Map<String, List<CloudInstance>> returnList = new HashMap<>(); int i = 0; for (String acct : ownerInstanceMap.keySet()) { ArrayList<CloudInstance> rawDataList = new ArrayList<>(); for (Instance currInstance : ownerInstanceMap.get(acct)) { i = i + 1; LOGGER.info("Collecting instance details for " + i + " of " + instanceList.size() + ". Instance ID=" + currInstance.getInstanceId()); CloudInstance object = getCloudInstanceDetails(acct, currInstance, autoScaleMap, repository); rawDataList.add(object); } if (CollectionUtils.isEmpty(returnList.get(acct))) { returnList.put(acct, rawDataList); } else { returnList.get(acct).addAll(rawDataList); } } return returnList; }
class class_name[name] begin[{] method[getCloudInstances, return_type[type[Map]], modifier[public], parameter[repository]] begin[{] local_variable[type[DescribeInstancesResult], instanceResult] if[binary_operation[binary_operation[literal[null], ==, call[settings.getFilters, parameter[]]], ||, call[settings.getFilters, parameter[]]]] begin[{] assign[member[.instanceResult], call[ec2Client.describeInstances, parameter[]]] else begin[{] assign[member[.instanceResult], call[ec2Client.describeInstances, parameter[call[.buildFilterRequest, parameter[call[settings.getFilters, parameter[]]]]]]] end[}] local_variable[type[DescribeAutoScalingInstancesResult], autoScaleResult] local_variable[type[List], autoScalingInstanceDetails] local_variable[type[Map], autoScaleMap] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getInstanceId, postfix_operators=[], prefix_operators=[], qualifier=ai, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getAutoScalingGroupName, postfix_operators=[], prefix_operators=[], qualifier=ai, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=autoScaleMap, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=autoScalingInstanceDetails, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ai)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AutoScalingInstanceDetails, sub_type=None))), label=None) local_variable[type[Map], ownerInstanceMap] local_variable[type[List], instanceList] local_variable[type[List], reservations] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getInstances, postfix_operators=[], prefix_operators=[], qualifier=currRes, selectors=[], type_arguments=None), name=currInstanceList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Instance, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOwnerId, postfix_operators=[], prefix_operators=[], qualifier=currRes, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=ownerInstanceMap, selectors=[], type_arguments=None)], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=CollectionUtils, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOwnerId, postfix_operators=[], prefix_operators=[], qualifier=currRes, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=ownerInstanceMap, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getInstances, postfix_operators=[], prefix_operators=[], qualifier=currRes, selectors=[], type_arguments=None)], member=addAll, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOwnerId, postfix_operators=[], prefix_operators=[], qualifier=currRes, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getInstances, postfix_operators=[], prefix_operators=[], qualifier=currRes, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=ownerInstanceMap, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=currInstanceList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=instanceList, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=reservations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=currRes)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Reservation, sub_type=None))), label=None) local_variable[type[Map], returnList] local_variable[type[int], i] ForStatement(body=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=[], dimensions=None, name=ArrayList, sub_type=None)), name=rawDataList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CloudInstance, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, 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), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Collecting instance details for "), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" of "), operator=+), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=instanceList, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=". Instance ID="), operator=+), operandr=MethodInvocation(arguments=[], member=getInstanceId, postfix_operators=[], prefix_operators=[], qualifier=currInstance, selectors=[], type_arguments=None), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=acct, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=currInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=autoScaleMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=repository, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCloudInstanceDetails, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=object)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CloudInstance, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=rawDataList, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=acct, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=ownerInstanceMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=currInstance)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Instance, sub_type=None))), label=None), IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=acct, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=returnList, selectors=[], type_arguments=None)], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=CollectionUtils, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=acct, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=returnList, selectors=[MethodInvocation(arguments=[MemberReference(member=rawDataList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addAll, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=acct, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rawDataList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=returnList, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=ownerInstanceMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=acct)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.returnList]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[CloudInstance] operator[>] operator[>] identifier[getCloudInstances] operator[SEP] identifier[CloudInstanceRepository] identifier[repository] operator[SEP] { identifier[DescribeInstancesResult] identifier[instanceResult] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[settings] operator[SEP] identifier[getFilters] operator[SEP] operator[SEP] operator[||] identifier[settings] operator[SEP] identifier[getFilters] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[instanceResult] operator[=] identifier[ec2Client] operator[SEP] identifier[describeInstances] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[instanceResult] operator[=] identifier[ec2Client] operator[SEP] identifier[describeInstances] operator[SEP] identifier[buildFilterRequest] operator[SEP] identifier[settings] operator[SEP] identifier[getFilters] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[DescribeAutoScalingInstancesResult] identifier[autoScaleResult] operator[=] identifier[autoScalingClient] operator[SEP] identifier[describeAutoScalingInstances] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[AutoScalingInstanceDetails] operator[>] identifier[autoScalingInstanceDetails] operator[=] identifier[autoScaleResult] operator[SEP] identifier[getAutoScalingInstances] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[autoScaleMap] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[AutoScalingInstanceDetails] identifier[ai] operator[:] identifier[autoScalingInstanceDetails] operator[SEP] { identifier[autoScaleMap] operator[SEP] identifier[put] operator[SEP] identifier[ai] operator[SEP] identifier[getInstanceId] operator[SEP] operator[SEP] , identifier[ai] operator[SEP] identifier[getAutoScalingGroupName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[Instance] operator[>] operator[>] identifier[ownerInstanceMap] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Instance] operator[>] identifier[instanceList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Reservation] operator[>] identifier[reservations] operator[=] identifier[instanceResult] operator[SEP] identifier[getReservations] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Reservation] identifier[currRes] operator[:] identifier[reservations] operator[SEP] { identifier[List] operator[<] identifier[Instance] operator[>] identifier[currInstanceList] operator[=] identifier[currRes] operator[SEP] identifier[getInstances] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[CollectionUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[ownerInstanceMap] operator[SEP] identifier[get] operator[SEP] identifier[currRes] operator[SEP] identifier[getOwnerId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[ownerInstanceMap] operator[SEP] identifier[put] operator[SEP] identifier[currRes] operator[SEP] identifier[getOwnerId] operator[SEP] operator[SEP] , identifier[currRes] operator[SEP] identifier[getInstances] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[ownerInstanceMap] operator[SEP] identifier[get] operator[SEP] identifier[currRes] operator[SEP] identifier[getOwnerId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[currRes] operator[SEP] identifier[getInstances] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[instanceList] operator[SEP] identifier[addAll] operator[SEP] identifier[currInstanceList] operator[SEP] operator[SEP] } identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[CloudInstance] operator[>] operator[>] identifier[returnList] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[acct] operator[:] identifier[ownerInstanceMap] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[ArrayList] operator[<] identifier[CloudInstance] operator[>] identifier[rawDataList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Instance] identifier[currInstance] operator[:] identifier[ownerInstanceMap] operator[SEP] identifier[get] operator[SEP] identifier[acct] operator[SEP] operator[SEP] { identifier[i] operator[=] identifier[i] operator[+] Other[1] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[i] operator[+] literal[String] operator[+] identifier[instanceList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[currInstance] operator[SEP] identifier[getInstanceId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[CloudInstance] identifier[object] operator[=] identifier[getCloudInstanceDetails] operator[SEP] identifier[acct] , identifier[currInstance] , identifier[autoScaleMap] , identifier[repository] operator[SEP] operator[SEP] identifier[rawDataList] operator[SEP] identifier[add] operator[SEP] identifier[object] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[CollectionUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[returnList] operator[SEP] identifier[get] operator[SEP] identifier[acct] operator[SEP] operator[SEP] operator[SEP] { identifier[returnList] operator[SEP] identifier[put] operator[SEP] identifier[acct] , identifier[rawDataList] operator[SEP] operator[SEP] } Keyword[else] { identifier[returnList] operator[SEP] identifier[get] operator[SEP] identifier[acct] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[rawDataList] operator[SEP] operator[SEP] } } Keyword[return] identifier[returnList] operator[SEP] }
public String deleteRequest(String endpoint) throws SmartsheetException { return passthroughRequest(HttpMethod.DELETE, endpoint, null, null); }
class class_name[name] begin[{] method[deleteRequest, return_type[type[String]], modifier[public], parameter[endpoint]] begin[{] return[call[.passthroughRequest, parameter[member[HttpMethod.DELETE], member[.endpoint], literal[null], literal[null]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[deleteRequest] operator[SEP] identifier[String] identifier[endpoint] operator[SEP] Keyword[throws] identifier[SmartsheetException] { Keyword[return] identifier[passthroughRequest] operator[SEP] identifier[HttpMethod] operator[SEP] identifier[DELETE] , identifier[endpoint] , Other[null] , Other[null] operator[SEP] operator[SEP] }
@Override public Geldbetrag remainder(double divisor) { if (isInfinite(divisor)) { return Geldbetrag.valueOf(0, currency); } return remainder(toBigDecimal(divisor)); }
class class_name[name] begin[{] method[remainder, return_type[type[Geldbetrag]], modifier[public], parameter[divisor]] begin[{] if[call[.isInfinite, parameter[member[.divisor]]]] begin[{] return[call[Geldbetrag.valueOf, parameter[literal[0], member[.currency]]]] else begin[{] None end[}] return[call[.remainder, parameter[call[.toBigDecimal, parameter[member[.divisor]]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Geldbetrag] identifier[remainder] operator[SEP] Keyword[double] identifier[divisor] operator[SEP] { Keyword[if] operator[SEP] identifier[isInfinite] operator[SEP] identifier[divisor] operator[SEP] operator[SEP] { Keyword[return] identifier[Geldbetrag] operator[SEP] identifier[valueOf] operator[SEP] Other[0] , identifier[currency] operator[SEP] operator[SEP] } Keyword[return] identifier[remainder] operator[SEP] identifier[toBigDecimal] operator[SEP] identifier[divisor] operator[SEP] operator[SEP] operator[SEP] }
public static List<String> split( final String str ) { String s = str; if (s != null) { s = s.trim(); } List<String> list = new ArrayList<String>(); if (s == null || s.length() == 0) { return list; } String[] tokens = s.split( "[ \t\n\r\f]" ); // NOTE: tokens[i] may be an empty string "". // excludes empty strings. int n_tokens = tokens.length; for (int i = 0; i < n_tokens; i++) { if (tokens[i].length() > 0) { list.add( tokens[i] ); } } return list; }
class class_name[name] begin[{] method[split, return_type[type[List]], modifier[public static], parameter[str]] begin[{] local_variable[type[String], s] if[binary_operation[member[.s], !=, literal[null]]] begin[{] assign[member[.s], call[s.trim, parameter[]]] else begin[{] None end[}] local_variable[type[List], list] if[binary_operation[binary_operation[member[.s], ==, literal[null]], ||, binary_operation[call[s.length, parameter[]], ==, literal[0]]]] begin[{] return[member[.list]] else begin[{] None end[}] local_variable[type[String], tokens] local_variable[type[int], n_tokens] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n_tokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.list]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[split] operator[SEP] Keyword[final] identifier[String] identifier[str] operator[SEP] { identifier[String] identifier[s] operator[=] identifier[str] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[!=] Other[null] operator[SEP] { identifier[s] operator[=] identifier[s] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[String] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[||] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[list] operator[SEP] } identifier[String] operator[SEP] operator[SEP] identifier[tokens] operator[=] identifier[s] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[n_tokens] operator[=] identifier[tokens] operator[SEP] identifier[length] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n_tokens] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[tokens] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[tokens] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[list] operator[SEP] }
public Properties getSSLPropertiesOnThread() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.entry(tc, "getSSLPropertiesOnThread"); SecurityManager sm = System.getSecurityManager(); if (sm != null) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Performing Java 2 Security Permission Check ..."); Tr.debug(tc, "Expecting : " + GET_SSLCONFIG.toString()); } sm.checkPermission(GET_SSLCONFIG); } Properties props = ThreadManager.getInstance().getPropertiesOnThread(); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { String debug = "Thread properties are NULL."; if (props != null) { debug = props.getProperty(Constants.SSLPROP_ALIAS); if (null == debug) { debug = props.toString(); } } Tr.exit(tc, "getSSLPropertiesOnThread", new Object[] { debug }); } return props; }
class class_name[name] begin[{] method[getSSLPropertiesOnThread, return_type[type[Properties]], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["getSSLPropertiesOnThread"]]] else begin[{] None end[}] local_variable[type[SecurityManager], sm] if[binary_operation[member[.sm], !=, literal[null]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], literal["Performing Java 2 Security Permission Check ..."]]] call[Tr.debug, parameter[member[.tc], binary_operation[literal["Expecting : "], +, call[GET_SSLCONFIG.toString, parameter[]]]]] else begin[{] None end[}] call[sm.checkPermission, parameter[member[.GET_SSLCONFIG]]] else begin[{] None end[}] local_variable[type[Properties], props] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] local_variable[type[String], debug] if[binary_operation[member[.props], !=, literal[null]]] begin[{] assign[member[.debug], call[props.getProperty, parameter[member[Constants.SSLPROP_ALIAS]]]] if[binary_operation[literal[null], ==, member[.debug]]] begin[{] assign[member[.debug], call[props.toString, parameter[]]] else begin[{] None end[}] else begin[{] None end[}] call[Tr.exit, parameter[member[.tc], literal["getSSLPropertiesOnThread"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=debug, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] return[member[.props]] end[}] END[}]
Keyword[public] identifier[Properties] identifier[getSSLPropertiesOnThread] 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[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[SecurityManager] identifier[sm] operator[=] identifier[System] operator[SEP] identifier[getSecurityManager] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sm] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[GET_SSLCONFIG] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[sm] operator[SEP] identifier[checkPermission] operator[SEP] identifier[GET_SSLCONFIG] operator[SEP] operator[SEP] } identifier[Properties] identifier[props] operator[=] identifier[ThreadManager] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getPropertiesOnThread] 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[String] identifier[debug] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[props] operator[!=] Other[null] operator[SEP] { identifier[debug] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] identifier[Constants] operator[SEP] identifier[SSLPROP_ALIAS] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[debug] operator[SEP] { identifier[debug] operator[=] identifier[props] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } } identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[debug] } operator[SEP] operator[SEP] } Keyword[return] identifier[props] operator[SEP] }
public static Object getField(Class senderClass, Object receiver, String messageName) throws Throwable { try { return InvokerHelper.getAttribute(receiver, messageName); } catch (GroovyRuntimeException gre) { throw unwrap(gre); } }
class class_name[name] begin[{] method[getField, return_type[type[Object]], modifier[public static], parameter[senderClass, receiver, messageName]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=receiver, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=messageName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=InvokerHelper, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=gre, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unwrap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=gre, types=['GroovyRuntimeException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[getField] operator[SEP] identifier[Class] identifier[senderClass] , identifier[Object] identifier[receiver] , identifier[String] identifier[messageName] operator[SEP] Keyword[throws] identifier[Throwable] { Keyword[try] { Keyword[return] identifier[InvokerHelper] operator[SEP] identifier[getAttribute] operator[SEP] identifier[receiver] , identifier[messageName] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[GroovyRuntimeException] identifier[gre] operator[SEP] { Keyword[throw] identifier[unwrap] operator[SEP] identifier[gre] operator[SEP] operator[SEP] } }
public static Multipart multipart(String url, int connectTimeout, int readTimeout) { return new Multipart(url, connectTimeout, connectTimeout); }
class class_name[name] begin[{] method[multipart, return_type[type[Multipart]], modifier[public static], parameter[url, connectTimeout, readTimeout]] begin[{] return[ClassCreator(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=connectTimeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=connectTimeout, 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=Multipart, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Multipart] identifier[multipart] operator[SEP] identifier[String] identifier[url] , Keyword[int] identifier[connectTimeout] , Keyword[int] identifier[readTimeout] operator[SEP] { Keyword[return] Keyword[new] identifier[Multipart] operator[SEP] identifier[url] , identifier[connectTimeout] , identifier[connectTimeout] operator[SEP] operator[SEP] }
public static double round(double input, int decimals) { final double p = Math.pow(10, decimals); return Math.round(input * p) / p; }
class class_name[name] begin[{] method[round, return_type[type[double]], modifier[public static], parameter[input, decimals]] begin[{] local_variable[type[double], p] return[binary_operation[call[Math.round, parameter[binary_operation[member[.input], *, member[.p]]]], /, member[.p]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[round] operator[SEP] Keyword[double] identifier[input] , Keyword[int] identifier[decimals] operator[SEP] { Keyword[final] Keyword[double] identifier[p] operator[=] identifier[Math] operator[SEP] identifier[pow] operator[SEP] Other[10] , identifier[decimals] operator[SEP] operator[SEP] Keyword[return] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[input] operator[*] identifier[p] operator[SEP] operator[/] identifier[p] operator[SEP] }
public static base_responses create(nitro_service client, systembackup resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { systembackup createresources[] = new systembackup[resources.length]; for (int i=0;i<resources.length;i++){ createresources[i] = new systembackup(); createresources[i].filename = resources[i].filename; createresources[i].level = resources[i].level; createresources[i].comment = resources[i].comment; } result = perform_operation_bulk_request(client, createresources,"create"); } return result; }
class class_name[name] begin[{] method[create, return_type[type[base_responses]], modifier[public static], parameter[client, resources]] begin[{] local_variable[type[base_responses], result] if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, binary_operation[member[resources.length], >, literal[0]]]] begin[{] local_variable[type[systembackup], createresources] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=createresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=systembackup, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=createresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=filename, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=filename, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=createresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=level, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=level, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=createresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=comment, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=comment, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=resources, 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) assign[member[.result], call[.perform_operation_bulk_request, parameter[member[.client], member[.createresources], literal["create"]]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_responses] identifier[create] operator[SEP] identifier[nitro_service] identifier[client] , identifier[systembackup] identifier[resources] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[base_responses] identifier[result] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[resources] operator[!=] Other[null] operator[&&] identifier[resources] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[systembackup] identifier[createresources] operator[SEP] operator[SEP] operator[=] Keyword[new] identifier[systembackup] operator[SEP] identifier[resources] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[resources] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[createresources] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[new] identifier[systembackup] operator[SEP] operator[SEP] operator[SEP] identifier[createresources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[filename] operator[=] identifier[resources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[filename] operator[SEP] identifier[createresources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[level] operator[=] identifier[resources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[level] operator[SEP] identifier[createresources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[comment] operator[=] identifier[resources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[comment] operator[SEP] } identifier[result] operator[=] identifier[perform_operation_bulk_request] operator[SEP] identifier[client] , identifier[createresources] , literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public static double getScaleFactor(IAtomContainer container, double bondLength) { double currentAverageBondLength = getBondLengthMedian(container); if (currentAverageBondLength == 0 || Double.isNaN(currentAverageBondLength)) return 1; return bondLength / currentAverageBondLength; }
class class_name[name] begin[{] method[getScaleFactor, return_type[type[double]], modifier[public static], parameter[container, bondLength]] begin[{] local_variable[type[double], currentAverageBondLength] if[binary_operation[binary_operation[member[.currentAverageBondLength], ==, literal[0]], ||, call[Double.isNaN, parameter[member[.currentAverageBondLength]]]]] begin[{] return[literal[1]] else begin[{] None end[}] return[binary_operation[member[.bondLength], /, member[.currentAverageBondLength]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[getScaleFactor] operator[SEP] identifier[IAtomContainer] identifier[container] , Keyword[double] identifier[bondLength] operator[SEP] { Keyword[double] identifier[currentAverageBondLength] operator[=] identifier[getBondLengthMedian] operator[SEP] identifier[container] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentAverageBondLength] operator[==] Other[0] operator[||] identifier[Double] operator[SEP] identifier[isNaN] operator[SEP] identifier[currentAverageBondLength] operator[SEP] operator[SEP] Keyword[return] Other[1] operator[SEP] Keyword[return] identifier[bondLength] operator[/] identifier[currentAverageBondLength] operator[SEP] }
public int doEndTag() throws JspException { // if there was an error, exit if (_fatalError) { localRelease(); return EVAL_PAGE; } // get the request and response ServletRequest req = pageContext.getRequest(); ServletResponse resp = pageContext.getResponse(); if (_innerErrors != null) { req.setAttribute(CONTAINER_ERRORS,_innerErrors); } String realURI = getRealURI((HttpServletRequest) req,_templatePage); if (!templateExists(realURI)) { String s = Bundle.getString("TempExcp_MissingTemplate", new Object[]{_templatePage}); registerTagError(s,null); reportErrors(); localRelease(); return SKIP_BODY; } RequestDispatcher rd = req.getRequestDispatcher(realURI); if (rd == null) { String s = Bundle.getString("Temp_RequestDispatcherReturnNull",new Object[]{"realURI"}); registerTagError(s,null); reportErrors(); localRelease(); return SKIP_PAGE; } try { // dispatch to the template itself... JspWriter out = pageContext.getOut(); out.flush(); // We have to make sure that the Page Flow framework doesn't use the Servlet Include path as the request // URI while we're rendering a template page. This is so that rendered URLs are relative to the current // page, not the included template page. InternalUtils.setIgnoreIncludeServletPath( req, true ); try { rd.include(req,resp); } finally { InternalUtils.setIgnoreIncludeServletPath( req, false ); } } catch (IOException e) { String s = Bundle.getString("TempExcp_ExceptIncludeTemplate", new Object[]{"IOException", _templatePage}); registerTagError(s,null); reportErrors(); localRelease(); return SKIP_PAGE; } catch (ServletException se) { System.err.println("Servlet Excepiton"); // Report the servlet exception String s = Bundle.getString("TempLog_ServletException", new Object[]{se.getMessage()}); registerTagError(s,null); // walk the servlet hierarchy Throwable t = se.getRootCause(); if (t == null) { s = Bundle.getString("TempLog_ServletError", new Object[] {_templatePage, se.getMessage() }); registerTagError(s,null); reportErrors(); localRelease(); return SKIP_PAGE; } // Walk all of the errors while (t != null && (t instanceof ServletException || t instanceof JspException)) { s = Bundle.getString("TempLog_Cause", new Object[] {t.getClass().getName(), t.getMessage() }); logger.error(s); if (t.getMessage() == null) { logger.error("Unwinding Servlet Exception",t); t.printStackTrace(); } if (t instanceof ServletException) t = ((ServletException) t).getRootCause(); else t = ((JspException) t).getRootCause(); } if (t == null) { s = Bundle.getString("TempLog_ServletError", new Object[] {_templatePage, se.getMessage() }); registerTagError(s,null); reportErrors(); logger.error(s); localRelease(); return SKIP_PAGE; } if (t instanceof AssertionError) { s = Bundle.getString("TempLog_AssertCause", new Object[] {t.getStackTrace().toString(), }); registerTagError(s,null); } else { s = Bundle.getString("TempLog_Cause", new Object[] {t.getClass().getName(), t.getMessage() }); registerTagError(s,null); } s = Bundle.getString("TempExcp_ExceptIncludeTemplate", new Object[]{"ServletException", _templatePage}); registerTagError(s,null); reportErrors(); localRelease(); return SKIP_PAGE; } // skip the page because on this pass we forwarded to the template // for rendering... req.setAttribute(TEMPLATE_SECTIONS,_savedContext); localRelease(); return SKIP_PAGE; }
class class_name[name] begin[{] method[doEndTag, return_type[type[int]], modifier[public], parameter[]] begin[{] if[member[._fatalError]] begin[{] call[.localRelease, parameter[]] return[member[.EVAL_PAGE]] else begin[{] None end[}] local_variable[type[ServletRequest], req] local_variable[type[ServletResponse], resp] if[binary_operation[member[._innerErrors], !=, literal[null]]] begin[{] call[req.setAttribute, parameter[member[.CONTAINER_ERRORS], member[._innerErrors]]] else begin[{] None end[}] local_variable[type[String], realURI] if[call[.templateExists, parameter[member[.realURI]]]] begin[{] local_variable[type[String], s] call[.registerTagError, parameter[member[.s], literal[null]]] call[.reportErrors, parameter[]] call[.localRelease, parameter[]] return[member[.SKIP_BODY]] else begin[{] None end[}] local_variable[type[RequestDispatcher], rd] if[binary_operation[member[.rd], ==, literal[null]]] begin[{] local_variable[type[String], s] call[.registerTagError, parameter[member[.s], literal[null]]] call[.reportErrors, parameter[]] call[.localRelease, parameter[]] return[member[.SKIP_PAGE]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getOut, postfix_operators=[], prefix_operators=[], qualifier=pageContext, selectors=[], type_arguments=None), name=out)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JspWriter, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=req, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setIgnoreIncludeServletPath, postfix_operators=[], prefix_operators=[], qualifier=InternalUtils, selectors=[], type_arguments=None), label=None), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=req, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=include, postfix_operators=[], prefix_operators=[], qualifier=rd, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=req, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setIgnoreIncludeServletPath, postfix_operators=[], prefix_operators=[], qualifier=InternalUtils, selectors=[], type_arguments=None), label=None)], label=None, resources=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TempExcp_ExceptIncludeTemplate"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="IOException"), MemberReference(member=_templatePage, 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=getString, postfix_operators=[], prefix_operators=[], qualifier=Bundle, selectors=[], type_arguments=None), name=s)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=registerTagError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=reportErrors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=localRelease, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=SKIP_PAGE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Servlet Excepiton")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TempLog_ServletException"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=se, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=getString, postfix_operators=[], prefix_operators=[], qualifier=Bundle, selectors=[], type_arguments=None), name=s)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=registerTagError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getRootCause, postfix_operators=[], prefix_operators=[], qualifier=se, selectors=[], type_arguments=None), name=t)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Throwable, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TempLog_ServletError"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=_templatePage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=se, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=getString, postfix_operators=[], prefix_operators=[], qualifier=Bundle, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=registerTagError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=reportErrors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=localRelease, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=SKIP_PAGE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TempLog_Cause"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=getString, postfix_operators=[], prefix_operators=[], qualifier=Bundle, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unwinding Servlet Exception"), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ServletException, sub_type=None), operator=instanceof), else_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JspException, sub_type=None))), label=None), label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ServletException, sub_type=None))), label=None))]), condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ServletException, sub_type=None), operator=instanceof), operandr=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=JspException, sub_type=None), operator=instanceof), operator=||), operator=&&), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TempLog_ServletError"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=_templatePage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=se, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=getString, postfix_operators=[], prefix_operators=[], qualifier=Bundle, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=registerTagError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=reportErrors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=localRelease, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=SKIP_PAGE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=AssertionError, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TempLog_Cause"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=getString, postfix_operators=[], prefix_operators=[], qualifier=Bundle, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=registerTagError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TempLog_AssertCause"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getStackTrace, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=getString, postfix_operators=[], prefix_operators=[], qualifier=Bundle, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=registerTagError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TempExcp_ExceptIncludeTemplate"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ServletException"), MemberReference(member=_templatePage, 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=getString, postfix_operators=[], prefix_operators=[], qualifier=Bundle, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=registerTagError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=reportErrors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=localRelease, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=SKIP_PAGE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=se, types=['ServletException']))], finally_block=None, label=None, resources=None) call[req.setAttribute, parameter[member[.TEMPLATE_SECTIONS], member[._savedContext]]] call[.localRelease, parameter[]] return[member[.SKIP_PAGE]] end[}] END[}]
Keyword[public] Keyword[int] identifier[doEndTag] operator[SEP] operator[SEP] Keyword[throws] identifier[JspException] { Keyword[if] operator[SEP] identifier[_fatalError] operator[SEP] { identifier[localRelease] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[EVAL_PAGE] operator[SEP] } identifier[ServletRequest] identifier[req] operator[=] identifier[pageContext] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] identifier[ServletResponse] identifier[resp] operator[=] identifier[pageContext] operator[SEP] identifier[getResponse] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_innerErrors] operator[!=] Other[null] operator[SEP] { identifier[req] operator[SEP] identifier[setAttribute] operator[SEP] identifier[CONTAINER_ERRORS] , identifier[_innerErrors] operator[SEP] operator[SEP] } identifier[String] identifier[realURI] operator[=] identifier[getRealURI] operator[SEP] operator[SEP] identifier[HttpServletRequest] operator[SEP] identifier[req] , identifier[_templatePage] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[templateExists] operator[SEP] identifier[realURI] operator[SEP] operator[SEP] { identifier[String] identifier[s] operator[=] identifier[Bundle] operator[SEP] identifier[getString] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[_templatePage] } operator[SEP] operator[SEP] identifier[registerTagError] operator[SEP] identifier[s] , Other[null] operator[SEP] operator[SEP] identifier[reportErrors] operator[SEP] operator[SEP] operator[SEP] identifier[localRelease] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[SKIP_BODY] operator[SEP] } identifier[RequestDispatcher] identifier[rd] operator[=] identifier[req] operator[SEP] identifier[getRequestDispatcher] operator[SEP] identifier[realURI] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rd] operator[==] Other[null] operator[SEP] { identifier[String] identifier[s] operator[=] identifier[Bundle] operator[SEP] identifier[getString] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] } operator[SEP] operator[SEP] identifier[registerTagError] operator[SEP] identifier[s] , Other[null] operator[SEP] operator[SEP] identifier[reportErrors] operator[SEP] operator[SEP] operator[SEP] identifier[localRelease] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[SKIP_PAGE] operator[SEP] } Keyword[try] { identifier[JspWriter] identifier[out] operator[=] identifier[pageContext] operator[SEP] identifier[getOut] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[InternalUtils] operator[SEP] identifier[setIgnoreIncludeServletPath] operator[SEP] identifier[req] , literal[boolean] operator[SEP] operator[SEP] Keyword[try] { identifier[rd] operator[SEP] identifier[include] operator[SEP] identifier[req] , identifier[resp] operator[SEP] operator[SEP] } Keyword[finally] { identifier[InternalUtils] operator[SEP] identifier[setIgnoreIncludeServletPath] operator[SEP] identifier[req] , literal[boolean] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[String] identifier[s] operator[=] identifier[Bundle] operator[SEP] identifier[getString] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] , identifier[_templatePage] } operator[SEP] operator[SEP] identifier[registerTagError] operator[SEP] identifier[s] , Other[null] operator[SEP] operator[SEP] identifier[reportErrors] operator[SEP] operator[SEP] operator[SEP] identifier[localRelease] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[SKIP_PAGE] operator[SEP] } Keyword[catch] operator[SEP] identifier[ServletException] identifier[se] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[s] operator[=] identifier[Bundle] operator[SEP] identifier[getString] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[se] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[registerTagError] operator[SEP] identifier[s] , Other[null] operator[SEP] operator[SEP] identifier[Throwable] identifier[t] operator[=] identifier[se] operator[SEP] identifier[getRootCause] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] { identifier[s] operator[=] identifier[Bundle] operator[SEP] identifier[getString] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[_templatePage] , identifier[se] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[registerTagError] operator[SEP] identifier[s] , Other[null] operator[SEP] operator[SEP] identifier[reportErrors] operator[SEP] operator[SEP] operator[SEP] identifier[localRelease] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[SKIP_PAGE] operator[SEP] } Keyword[while] operator[SEP] identifier[t] operator[!=] Other[null] operator[&&] operator[SEP] identifier[t] Keyword[instanceof] identifier[ServletException] operator[||] identifier[t] Keyword[instanceof] identifier[JspException] operator[SEP] operator[SEP] { identifier[s] operator[=] identifier[Bundle] operator[SEP] identifier[getString] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[t] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[t] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[error] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[t] operator[SEP] operator[SEP] identifier[t] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[ServletException] operator[SEP] identifier[t] operator[=] operator[SEP] operator[SEP] identifier[ServletException] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[getRootCause] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[t] operator[=] operator[SEP] operator[SEP] identifier[JspException] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[getRootCause] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] { identifier[s] operator[=] identifier[Bundle] operator[SEP] identifier[getString] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[_templatePage] , identifier[se] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[registerTagError] operator[SEP] identifier[s] , Other[null] operator[SEP] operator[SEP] identifier[reportErrors] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[error] operator[SEP] identifier[s] operator[SEP] operator[SEP] identifier[localRelease] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[SKIP_PAGE] operator[SEP] } Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[AssertionError] operator[SEP] { identifier[s] operator[=] identifier[Bundle] operator[SEP] identifier[getString] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[t] operator[SEP] identifier[getStackTrace] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , } operator[SEP] operator[SEP] identifier[registerTagError] operator[SEP] identifier[s] , Other[null] operator[SEP] operator[SEP] } Keyword[else] { identifier[s] operator[=] identifier[Bundle] operator[SEP] identifier[getString] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[t] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[t] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[registerTagError] operator[SEP] identifier[s] , Other[null] operator[SEP] operator[SEP] } identifier[s] operator[=] identifier[Bundle] operator[SEP] identifier[getString] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] , identifier[_templatePage] } operator[SEP] operator[SEP] identifier[registerTagError] operator[SEP] identifier[s] , Other[null] operator[SEP] operator[SEP] identifier[reportErrors] operator[SEP] operator[SEP] operator[SEP] identifier[localRelease] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[SKIP_PAGE] operator[SEP] } identifier[req] operator[SEP] identifier[setAttribute] operator[SEP] identifier[TEMPLATE_SECTIONS] , identifier[_savedContext] operator[SEP] operator[SEP] identifier[localRelease] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[SKIP_PAGE] operator[SEP] }
public long get() throws MemcachedException, InterruptedException, TimeoutException { Object result = this.memcachedClient.get(this.key); if (result == null) { throw new MemcachedClientException("key is not existed."); } else { if (result instanceof Long) return (Long) result; else return Long.valueOf(((String) result).trim()); } }
class class_name[name] begin[{] method[get, return_type[type[long]], modifier[public], parameter[]] begin[{] local_variable[type[Object], result] if[binary_operation[member[.result], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="key is not existed.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MemcachedClientException, sub_type=None)), label=None) else begin[{] if[binary_operation[member[.result], instanceof, type[Long]]] begin[{] return[Cast(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))] else begin[{] return[call[Long.valueOf, parameter[Cast(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))]]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[long] identifier[get] operator[SEP] operator[SEP] Keyword[throws] identifier[MemcachedException] , identifier[InterruptedException] , identifier[TimeoutException] { identifier[Object] identifier[result] operator[=] Keyword[this] operator[SEP] identifier[memcachedClient] operator[SEP] identifier[get] operator[SEP] Keyword[this] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[MemcachedClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[result] Keyword[instanceof] identifier[Long] operator[SEP] Keyword[return] operator[SEP] identifier[Long] operator[SEP] identifier[result] operator[SEP] Keyword[else] Keyword[return] identifier[Long] operator[SEP] identifier[valueOf] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[result] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public boolean isIdentical(CmsProperty property) { boolean isEqual; // compare the name if (m_name == null) { isEqual = (property.getName() == null); } else { isEqual = m_name.equals(property.getName()); } // compare the structure value if (m_structureValue == null) { isEqual &= (property.getStructureValue() == null); } else { isEqual &= m_structureValue.equals(property.getStructureValue()); } // compare the resource value if (m_resourceValue == null) { isEqual &= (property.getResourceValue() == null); } else { isEqual &= m_resourceValue.equals(property.getResourceValue()); } return isEqual; }
class class_name[name] begin[{] method[isIdentical, return_type[type[boolean]], modifier[public], parameter[property]] begin[{] local_variable[type[boolean], isEqual] if[binary_operation[member[.m_name], ==, literal[null]]] begin[{] assign[member[.isEqual], binary_operation[call[property.getName, parameter[]], ==, literal[null]]] else begin[{] assign[member[.isEqual], call[m_name.equals, parameter[call[property.getName, parameter[]]]]] end[}] if[binary_operation[member[.m_structureValue], ==, literal[null]]] begin[{] assign[member[.isEqual], binary_operation[call[property.getStructureValue, parameter[]], ==, literal[null]]] else begin[{] assign[member[.isEqual], call[m_structureValue.equals, parameter[call[property.getStructureValue, parameter[]]]]] end[}] if[binary_operation[member[.m_resourceValue], ==, literal[null]]] begin[{] assign[member[.isEqual], binary_operation[call[property.getResourceValue, parameter[]], ==, literal[null]]] else begin[{] assign[member[.isEqual], call[m_resourceValue.equals, parameter[call[property.getResourceValue, parameter[]]]]] end[}] return[member[.isEqual]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isIdentical] operator[SEP] identifier[CmsProperty] identifier[property] operator[SEP] { Keyword[boolean] identifier[isEqual] operator[SEP] Keyword[if] operator[SEP] identifier[m_name] operator[==] Other[null] operator[SEP] { identifier[isEqual] operator[=] operator[SEP] identifier[property] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] operator[SEP] } Keyword[else] { identifier[isEqual] operator[=] identifier[m_name] operator[SEP] identifier[equals] operator[SEP] identifier[property] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[m_structureValue] operator[==] Other[null] operator[SEP] { identifier[isEqual] operator[&=] operator[SEP] identifier[property] operator[SEP] identifier[getStructureValue] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] operator[SEP] } Keyword[else] { identifier[isEqual] operator[&=] identifier[m_structureValue] operator[SEP] identifier[equals] operator[SEP] identifier[property] operator[SEP] identifier[getStructureValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[m_resourceValue] operator[==] Other[null] operator[SEP] { identifier[isEqual] operator[&=] operator[SEP] identifier[property] operator[SEP] identifier[getResourceValue] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] operator[SEP] } Keyword[else] { identifier[isEqual] operator[&=] identifier[m_resourceValue] operator[SEP] identifier[equals] operator[SEP] identifier[property] operator[SEP] identifier[getResourceValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[isEqual] operator[SEP] }
@Action(name = "Modify Instance Attribute", outputs = { @Output(Outputs.RETURN_CODE), @Output(Outputs.RETURN_RESULT), @Output(Outputs.EXCEPTION) }, responses = { @Response(text = Outputs.SUCCESS, field = Outputs.RETURN_CODE, value = Outputs.SUCCESS_RETURN_CODE, matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.RESOLVED), @Response(text = Outputs.FAILURE, field = Outputs.RETURN_CODE, value = Outputs.FAILURE_RETURN_CODE, matchType = MatchType.COMPARE_EQUAL, responseType = ResponseType.ERROR) } ) public Map<String, String> execute(@Param(value = ENDPOINT, required = true) String endpoint, @Param(value = IDENTITY, required = true) String identity, @Param(value = CREDENTIAL, required = true, encrypted = true) String credential, @Param(value = PROXY_HOST) String proxyHost, @Param(value = PROXY_PORT) String proxyPort, @Param(value = PROXY_USERNAME) String proxyUsername, @Param(value = PROXY_PASSWORD, encrypted = true) String proxyPassword, @Param(value = HEADERS) String headers, @Param(value = QUERY_PARAMS) String queryParams, @Param(value = VERSION) String version, @Param(value = DELIMITER) String delimiter, @Param(value = ATTRIBUTE) String attribute, @Param(value = ATTRIBUTE_VALUE) String attributeValue, @Param(value = BLOCK_DEVICE_MAPPING_DEVICE_NAMES_STRING) String blockDeviceMappingDeviceNamesString, @Param(value = BLOCK_DEVICE_MAPPING_VIRTUAL_NAMES_STRING) String blockDeviceMappingVirtualNamesString, @Param(value = DELETE_ON_TERMINATIONS_STRING) String deleteOnTerminationsString, @Param(value = VOLUME_IDS_STRING) String volumeIdsString, @Param(value = NO_DEVICES_STRING) String noDevicesString, @Param(value = LOWER_CASE_DISABLE_API_TERMINATION) String disableApiTermination, @Param(value = EBS_OPTIMIZED) String ebsOptimized, @Param(value = ENA_SUPPORT) String enaSupport, @Param(value = SECURITY_GROUP_IDS_STRING) String securityGroupIdsString, @Param(value = INSTANCE_ID, required = true) String instanceId, @Param(value = LOWER_CASE_INSTANCE_INITIATED_SHUTDOWN_BEHAVIOR) String instanceInitiatedShutdownBehavior, @Param(value = INSTANCE_TYPE) String instanceType, @Param(value = LOWER_CASE_KERNEL) String kernel, @Param(value = LOWER_CASE_RAMDISK) String ramdisk, @Param(value = SOURCE_DESTINATION_CHECK) String sourceDestinationCheck, @Param(value = SRIOV_NET_SUPPORT) String sriovNetSupport, @Param(value = LOWER_CASE_USER_DATA) String userData) { try { version = getDefaultStringInput(version, INSTANCES_DEFAULT_API_VERSION); final CommonInputs commonInputs = new CommonInputs.Builder() .withEndpoint(endpoint, EC2_API, EMPTY) .withIdentity(identity) .withCredential(credential) .withProxyHost(proxyHost) .withProxyPort(proxyPort) .withProxyUsername(proxyUsername) .withProxyPassword(proxyPassword) .withHeaders(headers) .withQueryParams(queryParams) .withVersion(version) .withDelimiter(delimiter) .withAction(MODIFY_INSTANCE_ATTRIBUTE) .withApiService(EC2_API) .withRequestUri(EMPTY) .withRequestPayload(EMPTY) .withHttpClientMethod(HTTP_CLIENT_METHOD_GET) .build(); final CustomInputs customInputs = new CustomInputs.Builder() .withInstanceId(instanceId) .withInstanceType(instanceType) .build(); EbsInputs ebsInputs = new EbsInputs.Builder() .withEbsOptimized(ebsOptimized) .withBlockDeviceMappingDeviceNamesString(blockDeviceMappingDeviceNamesString) .withBlockDeviceMappingVirtualNamesString(blockDeviceMappingVirtualNamesString) .withDeleteOnTerminationsString(deleteOnTerminationsString) .withVolumeIdsString(volumeIdsString) .withNoDevicesString(noDevicesString) .build(); IamInputs iamInputs = new IamInputs.Builder().withSecurityGroupIdsString(securityGroupIdsString).build(); InstanceInputs instanceInputs = new InstanceInputs.Builder() .withAttribute(attribute) .withAttributeValue(attributeValue) .withDisableApiTermination(disableApiTermination) .withEnaSupport(enaSupport) .withInstanceInitiatedShutdownBehavior(instanceInitiatedShutdownBehavior) .withKernel(kernel) .withRamdisk(ramdisk) .withSourceDestinationCheck(sourceDestinationCheck) .withSriovNetSupport(sriovNetSupport) .withUserData(userData) .build(); return new QueryApiExecutor().execute(commonInputs, customInputs, ebsInputs, iamInputs, instanceInputs); } catch (Exception e) { return ExceptionProcessor.getExceptionResult(e); } }
class class_name[name] begin[{] method[execute, return_type[type[Map]], modifier[public], parameter[endpoint, identity, credential, proxyHost, proxyPort, proxyUsername, proxyPassword, headers, queryParams, version, delimiter, attribute, attributeValue, blockDeviceMappingDeviceNamesString, blockDeviceMappingVirtualNamesString, deleteOnTerminationsString, volumeIdsString, noDevicesString, disableApiTermination, ebsOptimized, enaSupport, securityGroupIdsString, instanceId, instanceInitiatedShutdownBehavior, instanceType, kernel, ramdisk, sourceDestinationCheck, sriovNetSupport, userData]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=INSTANCES_DEFAULT_API_VERSION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDefaultStringInput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=endpoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=EC2_API, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=EMPTY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withEndpoint, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=identity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withIdentity, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=credential, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withCredential, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=proxyHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withProxyHost, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=proxyPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withProxyPort, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=proxyUsername, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withProxyUsername, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=proxyPassword, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withProxyPassword, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=headers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withHeaders, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=queryParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withQueryParams, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withVersion, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=delimiter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withDelimiter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=MODIFY_INSTANCE_ATTRIBUTE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withAction, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=EC2_API, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withApiService, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=EMPTY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withRequestUri, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=EMPTY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withRequestPayload, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=HTTP_CLIENT_METHOD_GET, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withHttpClientMethod, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=CommonInputs, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None))), name=commonInputs)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=CommonInputs, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=instanceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withInstanceId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=instanceType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withInstanceType, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=CustomInputs, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None))), name=customInputs)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=CustomInputs, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=ebsOptimized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withEbsOptimized, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=blockDeviceMappingDeviceNamesString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withBlockDeviceMappingDeviceNamesString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=blockDeviceMappingVirtualNamesString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withBlockDeviceMappingVirtualNamesString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=deleteOnTerminationsString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withDeleteOnTerminationsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=volumeIdsString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withVolumeIdsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=noDevicesString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withNoDevicesString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=EbsInputs, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None))), name=ebsInputs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EbsInputs, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=securityGroupIdsString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withSecurityGroupIdsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=IamInputs, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None))), name=iamInputs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IamInputs, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=attribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withAttribute, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=attributeValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withAttributeValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=disableApiTermination, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withDisableApiTermination, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=enaSupport, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withEnaSupport, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=instanceInitiatedShutdownBehavior, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withInstanceInitiatedShutdownBehavior, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=kernel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withKernel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=ramdisk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withRamdisk, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=sourceDestinationCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withSourceDestinationCheck, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=sriovNetSupport, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withSriovNetSupport, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=userData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withUserData, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=InstanceInputs, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None))), name=instanceInputs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InstanceInputs, sub_type=None)), ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=commonInputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=customInputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ebsInputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=iamInputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=instanceInputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=execute, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=QueryApiExecutor, sub_type=None)), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getExceptionResult, postfix_operators=[], prefix_operators=[], qualifier=ExceptionProcessor, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Action] operator[SEP] identifier[name] operator[=] literal[String] , identifier[outputs] operator[=] { annotation[@] identifier[Output] operator[SEP] identifier[Outputs] operator[SEP] identifier[RETURN_CODE] operator[SEP] , annotation[@] identifier[Output] operator[SEP] identifier[Outputs] operator[SEP] identifier[RETURN_RESULT] operator[SEP] , annotation[@] identifier[Output] operator[SEP] identifier[Outputs] operator[SEP] identifier[EXCEPTION] operator[SEP] } , identifier[responses] operator[=] { annotation[@] identifier[Response] operator[SEP] identifier[text] operator[=] identifier[Outputs] operator[SEP] identifier[SUCCESS] , identifier[field] operator[=] identifier[Outputs] operator[SEP] identifier[RETURN_CODE] , identifier[value] operator[=] identifier[Outputs] operator[SEP] identifier[SUCCESS_RETURN_CODE] , identifier[matchType] operator[=] identifier[MatchType] operator[SEP] identifier[COMPARE_EQUAL] , identifier[responseType] operator[=] identifier[ResponseType] operator[SEP] identifier[RESOLVED] operator[SEP] , annotation[@] identifier[Response] operator[SEP] identifier[text] operator[=] identifier[Outputs] operator[SEP] identifier[FAILURE] , identifier[field] operator[=] identifier[Outputs] operator[SEP] identifier[RETURN_CODE] , identifier[value] operator[=] identifier[Outputs] operator[SEP] identifier[FAILURE_RETURN_CODE] , identifier[matchType] operator[=] identifier[MatchType] operator[SEP] identifier[COMPARE_EQUAL] , identifier[responseType] operator[=] identifier[ResponseType] operator[SEP] identifier[ERROR] operator[SEP] } operator[SEP] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[execute] operator[SEP] annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[ENDPOINT] , identifier[required] operator[=] literal[boolean] operator[SEP] identifier[String] identifier[endpoint] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[IDENTITY] , identifier[required] operator[=] literal[boolean] operator[SEP] identifier[String] identifier[identity] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[CREDENTIAL] , identifier[required] operator[=] literal[boolean] , identifier[encrypted] operator[=] literal[boolean] operator[SEP] identifier[String] identifier[credential] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[PROXY_HOST] operator[SEP] identifier[String] identifier[proxyHost] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[PROXY_PORT] operator[SEP] identifier[String] identifier[proxyPort] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[PROXY_USERNAME] operator[SEP] identifier[String] identifier[proxyUsername] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[PROXY_PASSWORD] , identifier[encrypted] operator[=] literal[boolean] operator[SEP] identifier[String] identifier[proxyPassword] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[HEADERS] operator[SEP] identifier[String] identifier[headers] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[QUERY_PARAMS] operator[SEP] identifier[String] identifier[queryParams] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[VERSION] operator[SEP] identifier[String] identifier[version] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[DELIMITER] operator[SEP] identifier[String] identifier[delimiter] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[ATTRIBUTE] operator[SEP] identifier[String] identifier[attribute] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[ATTRIBUTE_VALUE] operator[SEP] identifier[String] identifier[attributeValue] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[BLOCK_DEVICE_MAPPING_DEVICE_NAMES_STRING] operator[SEP] identifier[String] identifier[blockDeviceMappingDeviceNamesString] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[BLOCK_DEVICE_MAPPING_VIRTUAL_NAMES_STRING] operator[SEP] identifier[String] identifier[blockDeviceMappingVirtualNamesString] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[DELETE_ON_TERMINATIONS_STRING] operator[SEP] identifier[String] identifier[deleteOnTerminationsString] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[VOLUME_IDS_STRING] operator[SEP] identifier[String] identifier[volumeIdsString] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[NO_DEVICES_STRING] operator[SEP] identifier[String] identifier[noDevicesString] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[LOWER_CASE_DISABLE_API_TERMINATION] operator[SEP] identifier[String] identifier[disableApiTermination] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[EBS_OPTIMIZED] operator[SEP] identifier[String] identifier[ebsOptimized] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[ENA_SUPPORT] operator[SEP] identifier[String] identifier[enaSupport] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[SECURITY_GROUP_IDS_STRING] operator[SEP] identifier[String] identifier[securityGroupIdsString] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[INSTANCE_ID] , identifier[required] operator[=] literal[boolean] operator[SEP] identifier[String] identifier[instanceId] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[LOWER_CASE_INSTANCE_INITIATED_SHUTDOWN_BEHAVIOR] operator[SEP] identifier[String] identifier[instanceInitiatedShutdownBehavior] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[INSTANCE_TYPE] operator[SEP] identifier[String] identifier[instanceType] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[LOWER_CASE_KERNEL] operator[SEP] identifier[String] identifier[kernel] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[LOWER_CASE_RAMDISK] operator[SEP] identifier[String] identifier[ramdisk] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[SOURCE_DESTINATION_CHECK] operator[SEP] identifier[String] identifier[sourceDestinationCheck] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[SRIOV_NET_SUPPORT] operator[SEP] identifier[String] identifier[sriovNetSupport] , annotation[@] identifier[Param] operator[SEP] identifier[value] operator[=] identifier[LOWER_CASE_USER_DATA] operator[SEP] identifier[String] identifier[userData] operator[SEP] { Keyword[try] { identifier[version] operator[=] identifier[getDefaultStringInput] operator[SEP] identifier[version] , identifier[INSTANCES_DEFAULT_API_VERSION] operator[SEP] operator[SEP] Keyword[final] identifier[CommonInputs] identifier[commonInputs] operator[=] Keyword[new] identifier[CommonInputs] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[withEndpoint] operator[SEP] identifier[endpoint] , identifier[EC2_API] , identifier[EMPTY] operator[SEP] operator[SEP] identifier[withIdentity] operator[SEP] identifier[identity] operator[SEP] operator[SEP] identifier[withCredential] operator[SEP] identifier[credential] operator[SEP] operator[SEP] identifier[withProxyHost] operator[SEP] identifier[proxyHost] operator[SEP] operator[SEP] identifier[withProxyPort] operator[SEP] identifier[proxyPort] operator[SEP] operator[SEP] identifier[withProxyUsername] operator[SEP] identifier[proxyUsername] operator[SEP] operator[SEP] identifier[withProxyPassword] operator[SEP] identifier[proxyPassword] operator[SEP] operator[SEP] identifier[withHeaders] operator[SEP] identifier[headers] operator[SEP] operator[SEP] identifier[withQueryParams] operator[SEP] identifier[queryParams] operator[SEP] operator[SEP] identifier[withVersion] operator[SEP] identifier[version] operator[SEP] operator[SEP] identifier[withDelimiter] operator[SEP] identifier[delimiter] operator[SEP] operator[SEP] identifier[withAction] operator[SEP] identifier[MODIFY_INSTANCE_ATTRIBUTE] operator[SEP] operator[SEP] identifier[withApiService] operator[SEP] identifier[EC2_API] operator[SEP] operator[SEP] identifier[withRequestUri] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] identifier[withRequestPayload] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] identifier[withHttpClientMethod] operator[SEP] identifier[HTTP_CLIENT_METHOD_GET] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[CustomInputs] identifier[customInputs] operator[=] Keyword[new] identifier[CustomInputs] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[withInstanceId] operator[SEP] identifier[instanceId] operator[SEP] operator[SEP] identifier[withInstanceType] operator[SEP] identifier[instanceType] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[EbsInputs] identifier[ebsInputs] operator[=] Keyword[new] identifier[EbsInputs] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[withEbsOptimized] operator[SEP] identifier[ebsOptimized] operator[SEP] operator[SEP] identifier[withBlockDeviceMappingDeviceNamesString] operator[SEP] identifier[blockDeviceMappingDeviceNamesString] operator[SEP] operator[SEP] identifier[withBlockDeviceMappingVirtualNamesString] operator[SEP] identifier[blockDeviceMappingVirtualNamesString] operator[SEP] operator[SEP] identifier[withDeleteOnTerminationsString] operator[SEP] identifier[deleteOnTerminationsString] operator[SEP] operator[SEP] identifier[withVolumeIdsString] operator[SEP] identifier[volumeIdsString] operator[SEP] operator[SEP] identifier[withNoDevicesString] operator[SEP] identifier[noDevicesString] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[IamInputs] identifier[iamInputs] operator[=] Keyword[new] identifier[IamInputs] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[withSecurityGroupIdsString] operator[SEP] identifier[securityGroupIdsString] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[InstanceInputs] identifier[instanceInputs] operator[=] Keyword[new] identifier[InstanceInputs] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[withAttribute] operator[SEP] identifier[attribute] operator[SEP] operator[SEP] identifier[withAttributeValue] operator[SEP] identifier[attributeValue] operator[SEP] operator[SEP] identifier[withDisableApiTermination] operator[SEP] identifier[disableApiTermination] operator[SEP] operator[SEP] identifier[withEnaSupport] operator[SEP] identifier[enaSupport] operator[SEP] operator[SEP] identifier[withInstanceInitiatedShutdownBehavior] operator[SEP] identifier[instanceInitiatedShutdownBehavior] operator[SEP] operator[SEP] identifier[withKernel] operator[SEP] identifier[kernel] operator[SEP] operator[SEP] identifier[withRamdisk] operator[SEP] identifier[ramdisk] operator[SEP] operator[SEP] identifier[withSourceDestinationCheck] operator[SEP] identifier[sourceDestinationCheck] operator[SEP] operator[SEP] identifier[withSriovNetSupport] operator[SEP] identifier[sriovNetSupport] operator[SEP] operator[SEP] identifier[withUserData] operator[SEP] identifier[userData] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[QueryApiExecutor] operator[SEP] operator[SEP] operator[SEP] identifier[execute] operator[SEP] identifier[commonInputs] , identifier[customInputs] , identifier[ebsInputs] , identifier[iamInputs] , identifier[instanceInputs] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] identifier[ExceptionProcessor] operator[SEP] identifier[getExceptionResult] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
private AffineTransform calcTransform(Rectangle2D screen, Bounds world) { // scale to limiting dimension double xs = screen.getWidth() / (world.getRight() - world.getLeft()); double ys = screen.getHeight() / (world.getLower() - world.getUpper()); AffineTransform cat = new AffineTransform(); cat.setToScale(xs, ys); cat.translate(-world.getLeft(), -world.getUpper()); if (debugTransform) { System.out.println("TPanel calcTransform = "); System.out.println(" screen = " + screen); System.out.println(" world = " + world); System.out.println(" transform = " + cat.getScaleX() + " " + cat.getShearX() + " " + cat.getTranslateX()); System.out.println(" " + cat.getShearY() + " " + cat.getScaleY() + " " + cat.getTranslateY()); Point2D src = new Point2D.Double(world.getLeft(), world.getUpper()); Point2D dst = new Point2D.Double(0.0, 0.0); System.out.println(" upper left pt = " + src); System.out.println(" transform = " + cat.transform(src, dst)); src = new Point2D.Double(world.getRight(), world.getLower()); System.out.println(" lower right pt = " + src); System.out.println(" transform = " + cat.transform(src, dst)); } return cat; }
class class_name[name] begin[{] method[calcTransform, return_type[type[AffineTransform]], modifier[private], parameter[screen, world]] begin[{] local_variable[type[double], xs] local_variable[type[double], ys] local_variable[type[AffineTransform], cat] call[cat.setToScale, parameter[member[.xs], member[.ys]]] call[cat.translate, parameter[call[world.getLeft, parameter[]], call[world.getUpper, parameter[]]]] if[member[.debugTransform]] begin[{] call[System.out.println, parameter[literal["TPanel calcTransform = "]]] call[System.out.println, parameter[binary_operation[literal[" screen = "], +, member[.screen]]]] call[System.out.println, parameter[binary_operation[literal[" world = "], +, member[.world]]]] call[System.out.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal[" transform = "], +, call[cat.getScaleX, parameter[]]], +, literal[" "]], +, call[cat.getShearX, parameter[]]], +, literal[" "]], +, call[cat.getTranslateX, parameter[]]]]] call[System.out.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal[" "], +, call[cat.getShearY, parameter[]]], +, literal[" "]], +, call[cat.getScaleY, parameter[]]], +, literal[" "]], +, call[cat.getTranslateY, parameter[]]]]] local_variable[type[Point2D], src] local_variable[type[Point2D], dst] call[System.out.println, parameter[binary_operation[literal[" upper left pt = "], +, member[.src]]]] call[System.out.println, parameter[binary_operation[literal[" transform = "], +, call[cat.transform, parameter[member[.src], member[.dst]]]]]] assign[member[.src], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getRight, postfix_operators=[], prefix_operators=[], qualifier=world, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getLower, postfix_operators=[], prefix_operators=[], qualifier=world, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Point2D, sub_type=ReferenceType(arguments=None, dimensions=None, name=Double, sub_type=None)))] call[System.out.println, parameter[binary_operation[literal[" lower right pt = "], +, member[.src]]]] call[System.out.println, parameter[binary_operation[literal[" transform = "], +, call[cat.transform, parameter[member[.src], member[.dst]]]]]] else begin[{] None end[}] return[member[.cat]] end[}] END[}]
Keyword[private] identifier[AffineTransform] identifier[calcTransform] operator[SEP] identifier[Rectangle2D] identifier[screen] , identifier[Bounds] identifier[world] operator[SEP] { Keyword[double] identifier[xs] operator[=] identifier[screen] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[/] operator[SEP] identifier[world] operator[SEP] identifier[getRight] operator[SEP] operator[SEP] operator[-] identifier[world] operator[SEP] identifier[getLeft] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[ys] operator[=] identifier[screen] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[/] operator[SEP] identifier[world] operator[SEP] identifier[getLower] operator[SEP] operator[SEP] operator[-] identifier[world] operator[SEP] identifier[getUpper] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[AffineTransform] identifier[cat] operator[=] Keyword[new] identifier[AffineTransform] operator[SEP] operator[SEP] operator[SEP] identifier[cat] operator[SEP] identifier[setToScale] operator[SEP] identifier[xs] , identifier[ys] operator[SEP] operator[SEP] identifier[cat] operator[SEP] identifier[translate] operator[SEP] operator[-] identifier[world] operator[SEP] identifier[getLeft] operator[SEP] operator[SEP] , operator[-] identifier[world] operator[SEP] identifier[getUpper] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[debugTransform] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[screen] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[world] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[cat] operator[SEP] identifier[getScaleX] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[cat] operator[SEP] identifier[getShearX] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[cat] operator[SEP] identifier[getTranslateX] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[cat] operator[SEP] identifier[getShearY] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[cat] operator[SEP] identifier[getScaleY] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[cat] operator[SEP] identifier[getTranslateY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Point2D] identifier[src] operator[=] Keyword[new] identifier[Point2D] operator[SEP] identifier[Double] operator[SEP] identifier[world] operator[SEP] identifier[getLeft] operator[SEP] operator[SEP] , identifier[world] operator[SEP] identifier[getUpper] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Point2D] identifier[dst] operator[=] Keyword[new] identifier[Point2D] operator[SEP] identifier[Double] operator[SEP] literal[Float] , literal[Float] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[src] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[cat] operator[SEP] identifier[transform] operator[SEP] identifier[src] , identifier[dst] operator[SEP] operator[SEP] operator[SEP] identifier[src] operator[=] Keyword[new] identifier[Point2D] operator[SEP] identifier[Double] operator[SEP] identifier[world] operator[SEP] identifier[getRight] operator[SEP] operator[SEP] , identifier[world] operator[SEP] identifier[getLower] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[src] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[cat] operator[SEP] identifier[transform] operator[SEP] identifier[src] , identifier[dst] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[cat] operator[SEP] }
public static Pattern name(String namespaceUri, String localName) { if (namespaceUri == null || localName == null) { throw new IllegalArgumentException("neither namespaceUri nor localName can be null"); } return new RegexPattern(namespaceUri, localName); }
class class_name[name] begin[{] method[name, return_type[type[Pattern]], modifier[public static], parameter[namespaceUri, localName]] begin[{] if[binary_operation[binary_operation[member[.namespaceUri], ==, literal[null]], ||, binary_operation[member[.localName], ==, literal[null]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="neither namespaceUri nor localName can 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[}] return[ClassCreator(arguments=[MemberReference(member=namespaceUri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=localName, 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=RegexPattern, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Pattern] identifier[name] operator[SEP] identifier[String] identifier[namespaceUri] , identifier[String] identifier[localName] operator[SEP] { Keyword[if] operator[SEP] identifier[namespaceUri] operator[==] Other[null] operator[||] identifier[localName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[RegexPattern] operator[SEP] identifier[namespaceUri] , identifier[localName] operator[SEP] operator[SEP] }
public void addItem(Item item, Transaction tran) throws OutOfCacheSpace, StreamIsFull, ProtocolException, TransactionException, PersistenceException, SevereMessageStoreException { super.addItem(item, tran); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "addItem"); if (item instanceof SchemaStoreItem) { addToIndex((SchemaStoreItem)item); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "JSchema added to store: " + ((SchemaStoreItem)item).getSchema().getID()); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "addItem"); }
class class_name[name] begin[{] method[addItem, return_type[void], modifier[public], parameter[item, tran]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tran, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addItem, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["addItem"]]] else begin[{] None end[}] if[binary_operation[member[.item], instanceof, type[SchemaStoreItem]]] begin[{] call[.addToIndex, parameter[Cast(expression=MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SchemaStoreItem, sub_type=None))]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[THIS[], member[.tc], binary_operation[literal["JSchema added to store: "], +, Cast(expression=MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SchemaStoreItem, sub_type=None))]]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["addItem"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addItem] operator[SEP] identifier[Item] identifier[item] , identifier[Transaction] identifier[tran] operator[SEP] Keyword[throws] identifier[OutOfCacheSpace] , identifier[StreamIsFull] , identifier[ProtocolException] , identifier[TransactionException] , identifier[PersistenceException] , identifier[SevereMessageStoreException] { Keyword[super] operator[SEP] identifier[addItem] operator[SEP] identifier[item] , identifier[tran] 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[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[item] Keyword[instanceof] identifier[SchemaStoreItem] operator[SEP] { identifier[addToIndex] operator[SEP] operator[SEP] identifier[SchemaStoreItem] operator[SEP] identifier[item] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] operator[SEP] operator[SEP] identifier[SchemaStoreItem] operator[SEP] identifier[item] operator[SEP] operator[SEP] identifier[getSchema] operator[SEP] operator[SEP] operator[SEP] identifier[getID] 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] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public boolean merge(final PluginXmlAccess other) { boolean _xblockexpression = false; { String _path = this.getPath(); String _path_1 = other.getPath(); boolean _notEquals = (!Objects.equal(_path, _path_1)); if (_notEquals) { String _path_2 = this.getPath(); String _plus = ("Merging plugin.xml files with different paths: " + _path_2); String _plus_1 = (_plus + ", "); String _path_3 = other.getPath(); String _plus_2 = (_plus_1 + _path_3); PluginXmlAccess.LOG.warn(_plus_2); } _xblockexpression = this.entries.addAll(other.entries); } return _xblockexpression; }
class class_name[name] begin[{] method[merge, return_type[type[boolean]], modifier[public], parameter[other]] begin[{] local_variable[type[boolean], _xblockexpression] local_variable[type[String], _path] local_variable[type[String], _path_1] local_variable[type[boolean], _notEquals] if[member[._notEquals]] begin[{] local_variable[type[String], _path_2] local_variable[type[String], _plus] local_variable[type[String], _plus_1] local_variable[type[String], _path_3] local_variable[type[String], _plus_2] call[PluginXmlAccess.LOG.warn, parameter[member[._plus_2]]] else begin[{] None end[}] assign[member[._xblockexpression], THIS[member[None.entries]call[None.addAll, parameter[member[other.entries]]]]] return[member[._xblockexpression]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[merge] operator[SEP] Keyword[final] identifier[PluginXmlAccess] identifier[other] operator[SEP] { Keyword[boolean] identifier[_xblockexpression] operator[=] literal[boolean] operator[SEP] { identifier[String] identifier[_path] operator[=] Keyword[this] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[_path_1] operator[=] identifier[other] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[_notEquals] operator[=] operator[SEP] operator[!] identifier[Objects] operator[SEP] identifier[equal] operator[SEP] identifier[_path] , identifier[_path_1] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_notEquals] operator[SEP] { identifier[String] identifier[_path_2] operator[=] Keyword[this] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[_plus] operator[=] operator[SEP] literal[String] operator[+] identifier[_path_2] operator[SEP] operator[SEP] identifier[String] identifier[_plus_1] operator[=] operator[SEP] identifier[_plus] operator[+] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[_path_3] operator[=] identifier[other] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[_plus_2] operator[=] operator[SEP] identifier[_plus_1] operator[+] identifier[_path_3] operator[SEP] operator[SEP] identifier[PluginXmlAccess] operator[SEP] identifier[LOG] operator[SEP] identifier[warn] operator[SEP] identifier[_plus_2] operator[SEP] operator[SEP] } identifier[_xblockexpression] operator[=] Keyword[this] operator[SEP] identifier[entries] operator[SEP] identifier[addAll] operator[SEP] identifier[other] operator[SEP] identifier[entries] operator[SEP] operator[SEP] } Keyword[return] identifier[_xblockexpression] operator[SEP] }
public EList<JvmAnnotationValue> getExplicitValues() { if (explicitValues == null) { explicitValues = new EObjectContainmentEList<JvmAnnotationValue>(JvmAnnotationValue.class, this, TypesPackage.JVM_ANNOTATION_REFERENCE__EXPLICIT_VALUES); } return explicitValues; }
class class_name[name] begin[{] method[getExplicitValues, return_type[type[EList]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.explicitValues], ==, literal[null]]] begin[{] assign[member[.explicitValues], ClassCreator(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JvmAnnotationValue, sub_type=None)), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=JVM_ANNOTATION_REFERENCE__EXPLICIT_VALUES, postfix_operators=[], prefix_operators=[], qualifier=TypesPackage, 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=JvmAnnotationValue, sub_type=None))], dimensions=None, name=EObjectContainmentEList, sub_type=None))] else begin[{] None end[}] return[member[.explicitValues]] end[}] END[}]
Keyword[public] identifier[EList] operator[<] identifier[JvmAnnotationValue] operator[>] identifier[getExplicitValues] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[explicitValues] operator[==] Other[null] operator[SEP] { identifier[explicitValues] operator[=] Keyword[new] identifier[EObjectContainmentEList] operator[<] identifier[JvmAnnotationValue] operator[>] operator[SEP] identifier[JvmAnnotationValue] operator[SEP] Keyword[class] , Keyword[this] , identifier[TypesPackage] operator[SEP] identifier[JVM_ANNOTATION_REFERENCE__EXPLICIT_VALUES] operator[SEP] operator[SEP] } Keyword[return] identifier[explicitValues] operator[SEP] }
@Override public T transformElement(Tuple2<Object, BSONObject> tuple, DeepJobConfig<T, ? extends DeepJobConfig> config) { try { return (T) UtilMongoDB.getObjectFromBson(config.getEntityClass(), tuple._2()); } catch (Exception e) { LOG.error("Cannot convert BSON: ", e); throw new DeepTransformException("Could not transform from Bson to Entity " + e.getMessage(), e); } }
class class_name[name] begin[{] method[transformElement, return_type[type[T]], modifier[public], parameter[tuple, config]] begin[{] TryStatement(block=[ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEntityClass, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=_2, postfix_operators=[], prefix_operators=[], qualifier=tuple, selectors=[], type_arguments=None)], member=getObjectFromBson, postfix_operators=[], prefix_operators=[], qualifier=UtilMongoDB, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot convert BSON: "), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not transform from Bson to Entity "), 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=DeepTransformException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[T] identifier[transformElement] operator[SEP] identifier[Tuple2] operator[<] identifier[Object] , identifier[BSONObject] operator[>] identifier[tuple] , identifier[DeepJobConfig] operator[<] identifier[T] , operator[?] Keyword[extends] identifier[DeepJobConfig] operator[>] identifier[config] operator[SEP] { Keyword[try] { Keyword[return] operator[SEP] identifier[T] operator[SEP] identifier[UtilMongoDB] operator[SEP] identifier[getObjectFromBson] operator[SEP] identifier[config] operator[SEP] identifier[getEntityClass] operator[SEP] operator[SEP] , identifier[tuple] operator[SEP] identifier[_2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[DeepTransformException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public static Pattern longest(final Pattern... patterns) { return new Pattern() { @Override public int match(CharSequence src, int begin, int end) { int r = MISMATCH; for (Pattern pattern : patterns) { int l = pattern.match(src, begin, end); if (l > r) r = l; } return r; } }; }
class class_name[name] begin[{] method[longest, return_type[type[Pattern]], modifier[public static], parameter[patterns]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=MISMATCH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=r)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=begin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=pattern, selectors=[], type_arguments=None), name=l)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=patterns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pattern)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Pattern, sub_type=None))), label=None), ReturnStatement(expression=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=match, parameters=[FormalParameter(annotations=[], modifiers=set(), name=src, type=ReferenceType(arguments=None, dimensions=[], name=CharSequence, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=begin, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=end, type=BasicType(dimensions=[], name=int), varargs=False)], return_type=BasicType(dimensions=[], name=int), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Pattern, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Pattern] identifier[longest] operator[SEP] Keyword[final] identifier[Pattern] operator[...] identifier[patterns] operator[SEP] { Keyword[return] Keyword[new] identifier[Pattern] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[match] operator[SEP] identifier[CharSequence] identifier[src] , Keyword[int] identifier[begin] , Keyword[int] identifier[end] operator[SEP] { Keyword[int] identifier[r] operator[=] identifier[MISMATCH] operator[SEP] Keyword[for] operator[SEP] identifier[Pattern] identifier[pattern] operator[:] identifier[patterns] operator[SEP] { Keyword[int] identifier[l] operator[=] identifier[pattern] operator[SEP] identifier[match] operator[SEP] identifier[src] , identifier[begin] , identifier[end] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[l] operator[>] identifier[r] operator[SEP] identifier[r] operator[=] identifier[l] operator[SEP] } Keyword[return] identifier[r] operator[SEP] } } operator[SEP] }
public static void main(String[] args) { // Set the logging level to statistics: LoggingConfiguration.setStatistics(); // Generate a random data set. // Note: ELKI has a nice data generator class, use that instead. double[][] data = new double[1000][2]; for(int i = 0; i < data.length; i++) { for(int j = 0; j < data[i].length; j++) { data[i][j] = Math.random(); } } // Adapter to load data from an existing array. DatabaseConnection dbc = new ArrayAdapterDatabaseConnection(data); // Create a database (which may contain multiple relations!) Database db = new StaticArrayDatabase(dbc, null); // Load the data into the database (do NOT forget to initialize...) db.initialize(); // Relation containing the number vectors: Relation<NumberVector> rel = db.getRelation(TypeUtil.NUMBER_VECTOR_FIELD); // We know that the ids must be a continuous range: DBIDRange ids = (DBIDRange) rel.getDBIDs(); // K-means should be used with squared Euclidean (least squares): SquaredEuclideanDistanceFunction dist = SquaredEuclideanDistanceFunction.STATIC; // Default initialization, using global random: // To fix the random seed, use: new RandomFactory(seed); RandomUniformGeneratedInitialMeans init = new RandomUniformGeneratedInitialMeans(RandomFactory.DEFAULT); // Textbook k-means clustering: KMeansLloyd<NumberVector> km = new KMeansLloyd<>(dist, // 3 /* k - number of partitions */, // 0 /* maximum number of iterations: no limit */, init); // K-means will automatically choose a numerical relation from the data set: // But we could make it explicit (if there were more than one numeric // relation!): km.run(db, rel); Clustering<KMeansModel> c = km.run(db); // Output all clusters: int i = 0; for(Cluster<KMeansModel> clu : c.getAllClusters()) { // K-means will name all clusters "Cluster" in lack of noise support: System.out.println("#" + i + ": " + clu.getNameAutomatic()); System.out.println("Size: " + clu.size()); System.out.println("Center: " + clu.getModel().getPrototype().toString()); // Iterate over objects: System.out.print("Objects: "); for(DBIDIter it = clu.getIDs().iter(); it.valid(); it.advance()) { // To get the vector use: // NumberVector v = rel.get(it); // Offset within our DBID range: "line number" final int offset = ids.getOffset(it); System.out.print(" " + offset); // Do NOT rely on using "internalGetIndex()" directly! } System.out.println(); ++i; } }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] call[LoggingConfiguration.setStatistics, parameter[]] local_variable[type[double], data] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[], member=random, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=data, 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) local_variable[type[DatabaseConnection], dbc] local_variable[type[Database], db] call[db.initialize, parameter[]] local_variable[type[Relation], rel] local_variable[type[DBIDRange], ids] local_variable[type[SquaredEuclideanDistanceFunction], dist] local_variable[type[RandomUniformGeneratedInitialMeans], init] local_variable[type[KMeansLloyd], km] local_variable[type[Clustering], c] local_variable[type[int], i] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="#"), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=getNameAutomatic, postfix_operators=[], prefix_operators=[], qualifier=clu, selectors=[], type_arguments=None), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Size: "), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=clu, selectors=[], type_arguments=None), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Center: "), operandr=MethodInvocation(arguments=[], member=getModel, postfix_operators=[], prefix_operators=[], qualifier=clu, selectors=[MethodInvocation(arguments=[], member=getPrototype, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Objects: ")], member=print, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=it, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOffset, postfix_operators=[], prefix_operators=[], qualifier=ids, selectors=[], type_arguments=None), name=offset)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), operandr=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=print, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=valid, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=getIDs, postfix_operators=[], prefix_operators=[], qualifier=clu, selectors=[MethodInvocation(arguments=[], member=iter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=it)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DBIDIter, sub_type=None)), update=[MethodInvocation(arguments=[], member=advance, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAllClusters, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=clu)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=KMeansModel, sub_type=None))], dimensions=[], name=Cluster, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { identifier[LoggingConfiguration] operator[SEP] identifier[setStatistics] operator[SEP] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[=] Keyword[new] Keyword[double] operator[SEP] Other[1000] operator[SEP] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[data] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[data] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[data] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[Math] operator[SEP] identifier[random] operator[SEP] operator[SEP] operator[SEP] } } identifier[DatabaseConnection] identifier[dbc] operator[=] Keyword[new] identifier[ArrayAdapterDatabaseConnection] operator[SEP] identifier[data] operator[SEP] operator[SEP] identifier[Database] identifier[db] operator[=] Keyword[new] identifier[StaticArrayDatabase] operator[SEP] identifier[dbc] , Other[null] operator[SEP] operator[SEP] identifier[db] operator[SEP] identifier[initialize] operator[SEP] operator[SEP] operator[SEP] identifier[Relation] operator[<] identifier[NumberVector] operator[>] identifier[rel] operator[=] identifier[db] operator[SEP] identifier[getRelation] operator[SEP] identifier[TypeUtil] operator[SEP] identifier[NUMBER_VECTOR_FIELD] operator[SEP] operator[SEP] identifier[DBIDRange] identifier[ids] operator[=] operator[SEP] identifier[DBIDRange] operator[SEP] identifier[rel] operator[SEP] identifier[getDBIDs] operator[SEP] operator[SEP] operator[SEP] identifier[SquaredEuclideanDistanceFunction] identifier[dist] operator[=] identifier[SquaredEuclideanDistanceFunction] operator[SEP] identifier[STATIC] operator[SEP] identifier[RandomUniformGeneratedInitialMeans] identifier[init] operator[=] Keyword[new] identifier[RandomUniformGeneratedInitialMeans] operator[SEP] identifier[RandomFactory] operator[SEP] identifier[DEFAULT] operator[SEP] operator[SEP] identifier[KMeansLloyd] operator[<] identifier[NumberVector] operator[>] identifier[km] operator[=] Keyword[new] identifier[KMeansLloyd] operator[<] operator[>] operator[SEP] identifier[dist] , Other[3] , Other[0] , identifier[init] operator[SEP] operator[SEP] identifier[Clustering] operator[<] identifier[KMeansModel] operator[>] identifier[c] operator[=] identifier[km] operator[SEP] identifier[run] operator[SEP] identifier[db] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Cluster] operator[<] identifier[KMeansModel] operator[>] identifier[clu] operator[:] identifier[c] operator[SEP] identifier[getAllClusters] operator[SEP] operator[SEP] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[i] operator[+] literal[String] operator[+] identifier[clu] operator[SEP] identifier[getNameAutomatic] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[clu] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[clu] operator[SEP] identifier[getModel] operator[SEP] operator[SEP] operator[SEP] identifier[getPrototype] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[DBIDIter] identifier[it] operator[=] identifier[clu] operator[SEP] identifier[getIDs] operator[SEP] operator[SEP] operator[SEP] identifier[iter] operator[SEP] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[valid] operator[SEP] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[advance] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[offset] operator[=] identifier[ids] operator[SEP] identifier[getOffset] operator[SEP] identifier[it] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] literal[String] operator[+] identifier[offset] operator[SEP] operator[SEP] } identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] } }
protected void parseNegOp(TokenList tokens, Sequence sequence) { if( tokens.size == 0 ) return; TokenList.Token token = tokens.first; while( token != null ) { TokenList.Token next = token.next; escape: if( token.getSymbol() == Symbol.MINUS ) { if( token.previous != null && token.previous.getType() != Type.SYMBOL) break escape; if( token.previous != null && token.previous.getType() == Type.SYMBOL && (token.previous.symbol == Symbol.TRANSPOSE)) break escape; if( token.next == null || token.next.getType() == Type.SYMBOL) break escape; if( token.next.getType() != Type.VARIABLE ) throw new RuntimeException("Crap bug rethink this function"); // create the operation Operation.Info info = Operation.neg(token.next.getVariable(),functions.getManagerTemp()); // add the operation to the sequence sequence.addOperation(info.op); // update the token list TokenList.Token t = new TokenList.Token(info.output); tokens.insert(token.next,t); tokens.remove(token.next); tokens.remove(token); next = t; } token = next; } }
class class_name[name] begin[{] method[parseNegOp, return_type[void], modifier[protected], parameter[tokens, sequence]] begin[{] if[binary_operation[member[tokens.size], ==, literal[0]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[TokenList], token] while[binary_operation[member[.token], !=, literal[null]]] begin[{] local_variable[type[TokenList], next] if[binary_operation[call[token.getSymbol, parameter[]], ==, member[Symbol.MINUS]]] begin[{] if[binary_operation[binary_operation[member[token.previous], !=, literal[null]], &&, binary_operation[call[token.previous.getType, parameter[]], !=, member[Type.SYMBOL]]]] begin[{] BreakStatement(goto=escape, label=None) else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[member[token.previous], !=, literal[null]], &&, binary_operation[call[token.previous.getType, parameter[]], ==, member[Type.SYMBOL]]], &&, binary_operation[member[token.previous.symbol], ==, member[Symbol.TRANSPOSE]]]] begin[{] BreakStatement(goto=escape, label=None) else begin[{] None end[}] if[binary_operation[binary_operation[member[token.next], ==, literal[null]], ||, binary_operation[call[token.next.getType, parameter[]], ==, member[Type.SYMBOL]]]] begin[{] BreakStatement(goto=escape, label=None) else begin[{] None end[}] if[binary_operation[call[token.next.getType, parameter[]], !=, member[Type.VARIABLE]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Crap bug rethink this function")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Operation], info] call[sequence.addOperation, parameter[member[info.op]]] local_variable[type[TokenList], t] call[tokens.insert, parameter[member[token.next], member[.t]]] call[tokens.remove, parameter[member[token.next]]] call[tokens.remove, parameter[member[.token]]] assign[member[.next], member[.t]] else begin[{] None end[}] assign[member[.token], member[.next]] end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[parseNegOp] operator[SEP] identifier[TokenList] identifier[tokens] , identifier[Sequence] identifier[sequence] operator[SEP] { Keyword[if] operator[SEP] identifier[tokens] operator[SEP] identifier[size] operator[==] Other[0] operator[SEP] Keyword[return] operator[SEP] identifier[TokenList] operator[SEP] identifier[Token] identifier[token] operator[=] identifier[tokens] operator[SEP] identifier[first] operator[SEP] Keyword[while] operator[SEP] identifier[token] operator[!=] Other[null] operator[SEP] { identifier[TokenList] operator[SEP] identifier[Token] identifier[next] operator[=] identifier[token] operator[SEP] identifier[next] operator[SEP] identifier[escape] operator[:] Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[getSymbol] operator[SEP] operator[SEP] operator[==] identifier[Symbol] operator[SEP] identifier[MINUS] operator[SEP] { Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[previous] operator[!=] Other[null] operator[&&] identifier[token] operator[SEP] identifier[previous] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[!=] identifier[Type] operator[SEP] identifier[SYMBOL] operator[SEP] Keyword[break] identifier[escape] operator[SEP] Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[previous] operator[!=] Other[null] operator[&&] identifier[token] operator[SEP] identifier[previous] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[Type] operator[SEP] identifier[SYMBOL] operator[&&] operator[SEP] identifier[token] operator[SEP] identifier[previous] operator[SEP] identifier[symbol] operator[==] identifier[Symbol] operator[SEP] identifier[TRANSPOSE] operator[SEP] operator[SEP] Keyword[break] identifier[escape] operator[SEP] Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[next] operator[==] Other[null] operator[||] identifier[token] operator[SEP] identifier[next] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[Type] operator[SEP] identifier[SYMBOL] operator[SEP] Keyword[break] identifier[escape] operator[SEP] Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[next] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[!=] identifier[Type] operator[SEP] identifier[VARIABLE] operator[SEP] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Operation] operator[SEP] identifier[Info] identifier[info] operator[=] identifier[Operation] operator[SEP] identifier[neg] operator[SEP] identifier[token] operator[SEP] identifier[next] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] , identifier[functions] operator[SEP] identifier[getManagerTemp] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sequence] operator[SEP] identifier[addOperation] operator[SEP] identifier[info] operator[SEP] identifier[op] operator[SEP] operator[SEP] identifier[TokenList] operator[SEP] identifier[Token] identifier[t] operator[=] Keyword[new] identifier[TokenList] operator[SEP] identifier[Token] operator[SEP] identifier[info] operator[SEP] identifier[output] operator[SEP] operator[SEP] identifier[tokens] operator[SEP] identifier[insert] operator[SEP] identifier[token] operator[SEP] identifier[next] , identifier[t] operator[SEP] operator[SEP] identifier[tokens] operator[SEP] identifier[remove] operator[SEP] identifier[token] operator[SEP] identifier[next] operator[SEP] operator[SEP] identifier[tokens] operator[SEP] identifier[remove] operator[SEP] identifier[token] operator[SEP] operator[SEP] identifier[next] operator[=] identifier[t] operator[SEP] } identifier[token] operator[=] identifier[next] operator[SEP] } }
public static <T> T doAs(final SecurityIdentity securityIdentity, final InetAddress remoteAddress, final PrivilegedAction<T> action) { return doAs(false, securityIdentity, remoteAddress, action); }
class class_name[name] begin[{] method[doAs, return_type[type[T]], modifier[public static], parameter[securityIdentity, remoteAddress, action]] begin[{] return[call[.doAs, parameter[literal[false], member[.securityIdentity], member[.remoteAddress], member[.action]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[doAs] operator[SEP] Keyword[final] identifier[SecurityIdentity] identifier[securityIdentity] , Keyword[final] identifier[InetAddress] identifier[remoteAddress] , Keyword[final] identifier[PrivilegedAction] operator[<] identifier[T] operator[>] identifier[action] operator[SEP] { Keyword[return] identifier[doAs] operator[SEP] literal[boolean] , identifier[securityIdentity] , identifier[remoteAddress] , identifier[action] operator[SEP] operator[SEP] }
@Override protected String buildForm(String msg) { StringBuilder svc = new StringBuilder(); svc.append(this.server); svc.append("/"); svc.append(this.threddsname); String form = String.format(this.downloadform, svc.toString(), msg ); return form; }
class class_name[name] begin[{] method[buildForm, return_type[type[String]], modifier[protected], parameter[msg]] begin[{] local_variable[type[StringBuilder], svc] call[svc.append, parameter[THIS[member[None.server]]]] call[svc.append, parameter[literal["/"]]] call[svc.append, parameter[THIS[member[None.threddsname]]]] local_variable[type[String], form] return[member[.form]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[String] identifier[buildForm] operator[SEP] identifier[String] identifier[msg] operator[SEP] { identifier[StringBuilder] identifier[svc] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[svc] operator[SEP] identifier[append] operator[SEP] Keyword[this] operator[SEP] identifier[server] operator[SEP] operator[SEP] identifier[svc] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[svc] operator[SEP] identifier[append] operator[SEP] Keyword[this] operator[SEP] identifier[threddsname] operator[SEP] operator[SEP] identifier[String] identifier[form] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] Keyword[this] operator[SEP] identifier[downloadform] , identifier[svc] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[msg] operator[SEP] operator[SEP] Keyword[return] identifier[form] operator[SEP] }
public void read() throws IOException { System.out.println("DwgFile.read() executed ..."); setDwgVersion(); if (dwgVersion.equals("R13")) { dwgReader = new DwgFileV14Reader(); dwgReader.read(this); } else if (dwgVersion.equals("R14")) { dwgReader = new DwgFileV14Reader(); dwgReader.read(this); } else if (dwgVersion.equals("R15")) { dwgReader = new DwgFileV15Reader(); dwgReader.read(this); } else if (dwgVersion.equals("Unknown")) { throw new IOException("DWG version of the file is not supported."); } }
class class_name[name] begin[{] method[read, return_type[void], modifier[public], parameter[]] begin[{] call[System.out.println, parameter[literal["DwgFile.read() executed ..."]]] call[.setDwgVersion, parameter[]] if[call[dwgVersion.equals, parameter[literal["R13"]]]] begin[{] assign[member[.dwgReader], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DwgFileV14Reader, sub_type=None))] call[dwgReader.read, parameter[THIS[]]] else begin[{] if[call[dwgVersion.equals, parameter[literal["R14"]]]] begin[{] assign[member[.dwgReader], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DwgFileV14Reader, sub_type=None))] call[dwgReader.read, parameter[THIS[]]] else begin[{] if[call[dwgVersion.equals, parameter[literal["R15"]]]] begin[{] assign[member[.dwgReader], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DwgFileV15Reader, sub_type=None))] call[dwgReader.read, parameter[THIS[]]] else begin[{] if[call[dwgVersion.equals, parameter[literal["Unknown"]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DWG version of the file is not supported.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[read] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[setDwgVersion] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dwgVersion] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[dwgReader] operator[=] Keyword[new] identifier[DwgFileV14Reader] operator[SEP] operator[SEP] operator[SEP] identifier[dwgReader] operator[SEP] identifier[read] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[dwgVersion] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[dwgReader] operator[=] Keyword[new] identifier[DwgFileV14Reader] operator[SEP] operator[SEP] operator[SEP] identifier[dwgReader] operator[SEP] identifier[read] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[dwgVersion] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[dwgReader] operator[=] Keyword[new] identifier[DwgFileV15Reader] operator[SEP] operator[SEP] operator[SEP] identifier[dwgReader] operator[SEP] identifier[read] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[dwgVersion] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
public MPCoreConnection getSystemConnection() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, "getSystemConnection"); SibTr.exit(tc, "getSystemConnection", _connectionToMP); } return _connectionToMP; }
class class_name[name] begin[{] method[getSystemConnection, return_type[type[MPCoreConnection]], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["getSystemConnection"]]] call[SibTr.exit, parameter[member[.tc], literal["getSystemConnection"], member[._connectionToMP]]] else begin[{] None end[}] return[member[._connectionToMP]] end[}] END[}]
Keyword[public] identifier[MPCoreConnection] identifier[getSystemConnection] 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[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[_connectionToMP] operator[SEP] operator[SEP] } Keyword[return] identifier[_connectionToMP] operator[SEP] }
@Override public Double getDouble( final String key, final Double defaultValue ) { return formatDouble( key, getFormattedPropValue( key ), defaultValue ); }
class class_name[name] begin[{] method[getDouble, return_type[type[Double]], modifier[public], parameter[key, defaultValue]] begin[{] return[call[.formatDouble, parameter[member[.key], call[.getFormattedPropValue, parameter[member[.key]]], member[.defaultValue]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Double] identifier[getDouble] operator[SEP] Keyword[final] identifier[String] identifier[key] , Keyword[final] identifier[Double] identifier[defaultValue] operator[SEP] { Keyword[return] identifier[formatDouble] operator[SEP] identifier[key] , identifier[getFormattedPropValue] operator[SEP] identifier[key] operator[SEP] , identifier[defaultValue] operator[SEP] operator[SEP] }
public static PreparedStatement setStrings(PreparedStatement stmt, String... params) throws SQLException { return setStrings(1, stmt, params); }
class class_name[name] begin[{] method[setStrings, return_type[type[PreparedStatement]], modifier[public static], parameter[stmt, params]] begin[{] return[call[.setStrings, parameter[literal[1], member[.stmt], member[.params]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PreparedStatement] identifier[setStrings] operator[SEP] identifier[PreparedStatement] identifier[stmt] , identifier[String] operator[...] identifier[params] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[return] identifier[setStrings] operator[SEP] Other[1] , identifier[stmt] , identifier[params] operator[SEP] operator[SEP] }
@Override public String encodeDiff(final RevisionCodecData codecData, final Diff diff) throws UnsupportedEncodingException, EncodingException { String sEncoding; byte[] bData = encode(codecData, diff); if (MODE_ZIP_COMPRESSION) { Deflater compresser = new Deflater(); compresser.setInput(bData); compresser.finish(); byte[] output = new byte[1000]; ByteArrayOutputStream stream = new ByteArrayOutputStream(); int cLength; do { cLength = compresser.deflate(output); stream.write(output, 0, cLength); } while (cLength == 1000); output = stream.toByteArray(); if (bData.length + 1 < output.length) { sEncoding = Base64.encodeBase64String(bData); } else { sEncoding = "_" + Base64.encodeBase64String(output); } } else { sEncoding = Base64.encodeBase64String(bData); } return sEncoding; }
class class_name[name] begin[{] method[encodeDiff, return_type[type[String]], modifier[public], parameter[codecData, diff]] begin[{] local_variable[type[String], sEncoding] local_variable[type[byte], bData] if[member[.MODE_ZIP_COMPRESSION]] begin[{] local_variable[type[Deflater], compresser] call[compresser.setInput, parameter[member[.bData]]] call[compresser.finish, parameter[]] local_variable[type[byte], output] local_variable[type[ByteArrayOutputStream], stream] local_variable[type[int], cLength] do[binary_operation[member[.cLength], ==, literal[1000]]] begin[{] assign[member[.cLength], call[compresser.deflate, parameter[member[.output]]]] call[stream.write, parameter[member[.output], literal[0], member[.cLength]]] end[}] assign[member[.output], call[stream.toByteArray, parameter[]]] if[binary_operation[binary_operation[member[bData.length], +, literal[1]], <, member[output.length]]] begin[{] assign[member[.sEncoding], call[Base64.encodeBase64String, parameter[member[.bData]]]] else begin[{] assign[member[.sEncoding], binary_operation[literal["_"], +, call[Base64.encodeBase64String, parameter[member[.output]]]]] end[}] else begin[{] assign[member[.sEncoding], call[Base64.encodeBase64String, parameter[member[.bData]]]] end[}] return[member[.sEncoding]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[encodeDiff] operator[SEP] Keyword[final] identifier[RevisionCodecData] identifier[codecData] , Keyword[final] identifier[Diff] identifier[diff] operator[SEP] Keyword[throws] identifier[UnsupportedEncodingException] , identifier[EncodingException] { identifier[String] identifier[sEncoding] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bData] operator[=] identifier[encode] operator[SEP] identifier[codecData] , identifier[diff] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[MODE_ZIP_COMPRESSION] operator[SEP] { identifier[Deflater] identifier[compresser] operator[=] Keyword[new] identifier[Deflater] operator[SEP] operator[SEP] operator[SEP] identifier[compresser] operator[SEP] identifier[setInput] operator[SEP] identifier[bData] operator[SEP] operator[SEP] identifier[compresser] operator[SEP] identifier[finish] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[output] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[1000] operator[SEP] operator[SEP] identifier[ByteArrayOutputStream] identifier[stream] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[cLength] operator[SEP] Keyword[do] { identifier[cLength] operator[=] identifier[compresser] operator[SEP] identifier[deflate] operator[SEP] identifier[output] operator[SEP] operator[SEP] identifier[stream] operator[SEP] identifier[write] operator[SEP] identifier[output] , Other[0] , identifier[cLength] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] identifier[cLength] operator[==] Other[1000] operator[SEP] operator[SEP] identifier[output] operator[=] identifier[stream] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bData] operator[SEP] identifier[length] operator[+] Other[1] operator[<] identifier[output] operator[SEP] identifier[length] operator[SEP] { identifier[sEncoding] operator[=] identifier[Base64] operator[SEP] identifier[encodeBase64String] operator[SEP] identifier[bData] operator[SEP] operator[SEP] } Keyword[else] { identifier[sEncoding] operator[=] literal[String] operator[+] identifier[Base64] operator[SEP] identifier[encodeBase64String] operator[SEP] identifier[output] operator[SEP] operator[SEP] } } Keyword[else] { identifier[sEncoding] operator[=] identifier[Base64] operator[SEP] identifier[encodeBase64String] operator[SEP] identifier[bData] operator[SEP] operator[SEP] } Keyword[return] identifier[sEncoding] operator[SEP] }
public static <E, T, U extends T, V extends T> T inject(Collection<E> self, U initialValue, @ClosureParams(value=FromString.class,options="U,E") Closure<V> closure) { // cast with explicit weaker generics for now to keep jdk6 happy, TODO: find better fix return (T) inject((Iterator) self.iterator(), initialValue, closure); }
class class_name[name] begin[{] method[inject, return_type[type[T]], modifier[public static], parameter[self, initialValue, closure]] begin[{] return[Cast(expression=MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=self, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Iterator, sub_type=None)), MemberReference(member=initialValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=closure, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=inject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] , identifier[T] , identifier[U] Keyword[extends] identifier[T] , identifier[V] Keyword[extends] identifier[T] operator[>] identifier[T] identifier[inject] operator[SEP] identifier[Collection] operator[<] identifier[E] operator[>] identifier[self] , identifier[U] identifier[initialValue] , annotation[@] identifier[ClosureParams] operator[SEP] identifier[value] operator[=] identifier[FromString] operator[SEP] Keyword[class] , identifier[options] operator[=] literal[String] operator[SEP] identifier[Closure] operator[<] identifier[V] operator[>] identifier[closure] operator[SEP] { Keyword[return] operator[SEP] identifier[T] operator[SEP] identifier[inject] operator[SEP] operator[SEP] identifier[Iterator] operator[SEP] identifier[self] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] , identifier[initialValue] , identifier[closure] operator[SEP] operator[SEP] }
public static Span currentSpan(Object spanProvider) { SpanProvider sp = asFacet(SpanProvider.class, spanProvider); Span span = (sp == null ? null : sp.currentSpan()); return span; }
class class_name[name] begin[{] method[currentSpan, return_type[type[Span]], modifier[public static], parameter[spanProvider]] begin[{] local_variable[type[SpanProvider], sp] local_variable[type[Span], span] return[member[.span]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Span] identifier[currentSpan] operator[SEP] identifier[Object] identifier[spanProvider] operator[SEP] { identifier[SpanProvider] identifier[sp] operator[=] identifier[asFacet] operator[SEP] identifier[SpanProvider] operator[SEP] Keyword[class] , identifier[spanProvider] operator[SEP] operator[SEP] identifier[Span] identifier[span] operator[=] operator[SEP] identifier[sp] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[sp] operator[SEP] identifier[currentSpan] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[span] operator[SEP] }
@Deprecated public static String encode(String s) { s = java.net.URLEncoder.encode(s); if (s.indexOf('+') != -1) s = StringUtil.replace(s, "+", "%20", false); return s; }
class class_name[name] begin[{] method[encode, return_type[type[String]], modifier[public static], parameter[s]] begin[{] assign[member[.s], call[java.net.URLEncoder.encode, parameter[member[.s]]]] if[binary_operation[call[s.indexOf, parameter[literal['+']]], !=, literal[1]]] begin[{] assign[member[.s], call[StringUtil.replace, parameter[member[.s], literal["+"], literal["%20"], literal[false]]]] else begin[{] None end[}] return[member[.s]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] identifier[String] identifier[encode] operator[SEP] identifier[String] identifier[s] operator[SEP] { identifier[s] operator[=] identifier[java] operator[SEP] identifier[net] operator[SEP] identifier[URLEncoder] operator[SEP] identifier[encode] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] identifier[s] operator[=] identifier[StringUtil] operator[SEP] identifier[replace] operator[SEP] identifier[s] , literal[String] , literal[String] , literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[s] operator[SEP] }
public Path getParent() { String path = uri.getPath(); int lastSlash = path.lastIndexOf('/'); int start = hasWindowsDrive(path, true) ? 3 : 0; if ((path.length() == start) || // empty path (lastSlash == start && path.length() == start+1)) { // at root return null; } String parent; if (lastSlash==-1) { parent = CUR_DIR; } else { int end = hasWindowsDrive(path, true) ? 3 : 0; parent = path.substring(0, lastSlash==end?end+1:lastSlash); } return new Path(uri.getScheme(), uri.getAuthority(), parent); }
class class_name[name] begin[{] method[getParent, return_type[type[Path]], modifier[public], parameter[]] begin[{] local_variable[type[String], path] local_variable[type[int], lastSlash] local_variable[type[int], start] if[binary_operation[binary_operation[call[path.length, parameter[]], ==, member[.start]], ||, binary_operation[binary_operation[member[.lastSlash], ==, member[.start]], &&, binary_operation[call[path.length, parameter[]], ==, binary_operation[member[.start], +, literal[1]]]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], parent] if[binary_operation[member[.lastSlash], ==, literal[1]]] begin[{] assign[member[.parent], member[.CUR_DIR]] else begin[{] local_variable[type[int], end] assign[member[.parent], call[path.substring, parameter[literal[0], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=lastSlash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), if_false=MemberReference(member=lastSlash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=BinaryOperation(operandl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]]] end[}] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getScheme, postfix_operators=[], prefix_operators=[], qualifier=uri, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getAuthority, postfix_operators=[], prefix_operators=[], qualifier=uri, selectors=[], type_arguments=None), MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Path, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Path] identifier[getParent] operator[SEP] operator[SEP] { identifier[String] identifier[path] operator[=] identifier[uri] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[lastSlash] operator[=] identifier[path] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[start] operator[=] identifier[hasWindowsDrive] operator[SEP] identifier[path] , literal[boolean] operator[SEP] operator[?] Other[3] operator[:] Other[0] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] identifier[start] operator[SEP] operator[||] operator[SEP] identifier[lastSlash] operator[==] identifier[start] operator[&&] identifier[path] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] identifier[start] operator[+] Other[1] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[String] identifier[parent] operator[SEP] Keyword[if] operator[SEP] identifier[lastSlash] operator[==] operator[-] Other[1] operator[SEP] { identifier[parent] operator[=] identifier[CUR_DIR] operator[SEP] } Keyword[else] { Keyword[int] identifier[end] operator[=] identifier[hasWindowsDrive] operator[SEP] identifier[path] , literal[boolean] operator[SEP] operator[?] Other[3] operator[:] Other[0] operator[SEP] identifier[parent] operator[=] identifier[path] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[lastSlash] operator[==] identifier[end] operator[?] identifier[end] operator[+] Other[1] operator[:] identifier[lastSlash] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[Path] operator[SEP] identifier[uri] operator[SEP] identifier[getScheme] operator[SEP] operator[SEP] , identifier[uri] operator[SEP] identifier[getAuthority] operator[SEP] operator[SEP] , identifier[parent] operator[SEP] operator[SEP] }
public void marshall(Tag tag, ProtocolMarshaller protocolMarshaller) { if (tag == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(tag.getKey(), KEY_BINDING); protocolMarshaller.marshall(tag.getValue(), VALUE_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[tag, protocolMarshaller]] begin[{] if[binary_operation[member[.tag], ==, 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=getKey, postfix_operators=[], prefix_operators=[], qualifier=tag, selectors=[], type_arguments=None), MemberReference(member=KEY_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=getValue, postfix_operators=[], prefix_operators=[], qualifier=tag, selectors=[], type_arguments=None), MemberReference(member=VALUE_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[Tag] identifier[tag] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[tag] 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[tag] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[KEY_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[tag] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] , identifier[VALUE_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] } }
@SafeVarargs public static <T> Function<Throwable, T> get(Class<? extends Throwable>... ignoredThrowableTypes) { return get(null, ignoredThrowableTypes); }
class class_name[name] begin[{] method[get, return_type[type[Function]], modifier[public static], parameter[ignoredThrowableTypes]] begin[{] return[call[.get, parameter[literal[null], member[.ignoredThrowableTypes]]]] end[}] END[}]
annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Function] operator[<] identifier[Throwable] , identifier[T] operator[>] identifier[get] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Throwable] operator[>] operator[...] identifier[ignoredThrowableTypes] operator[SEP] { Keyword[return] identifier[get] operator[SEP] Other[null] , identifier[ignoredThrowableTypes] operator[SEP] operator[SEP] }
public double getStandardDeviationA() { if(standardDeviationA == null) { standardDeviationA = Math.sqrt(observationA.getMoments().get(2)); } return standardDeviationA; }
class class_name[name] begin[{] method[getStandardDeviationA, return_type[type[double]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.standardDeviationA], ==, literal[null]]] begin[{] assign[member[.standardDeviationA], call[Math.sqrt, parameter[call[observationA.getMoments, parameter[]]]]] else begin[{] None end[}] return[member[.standardDeviationA]] end[}] END[}]
Keyword[public] Keyword[double] identifier[getStandardDeviationA] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[standardDeviationA] operator[==] Other[null] operator[SEP] { identifier[standardDeviationA] operator[=] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[observationA] operator[SEP] identifier[getMoments] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[standardDeviationA] operator[SEP] }
@Override public java.util.concurrent.Future<AddPermissionResult> addPermissionAsync(String queueUrl, String label, java.util.List<String> aWSAccountIds, java.util.List<String> actions, com.amazonaws.handlers.AsyncHandler<AddPermissionRequest, AddPermissionResult> asyncHandler) { return addPermissionAsync(new AddPermissionRequest().withQueueUrl(queueUrl).withLabel(label).withAWSAccountIds(aWSAccountIds).withActions(actions), asyncHandler); }
class class_name[name] begin[{] method[addPermissionAsync, return_type[type[java]], modifier[public], parameter[queueUrl, label, aWSAccountIds, actions, asyncHandler]] begin[{] return[call[.addPermissionAsync, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=queueUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withQueueUrl, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=label, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withLabel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=aWSAccountIds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withAWSAccountIds, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=actions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withActions, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=AddPermissionRequest, sub_type=None)), member[.asyncHandler]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[concurrent] operator[SEP] identifier[Future] operator[<] identifier[AddPermissionResult] operator[>] identifier[addPermissionAsync] operator[SEP] identifier[String] identifier[queueUrl] , identifier[String] identifier[label] , identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[aWSAccountIds] , identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[actions] , identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[handlers] operator[SEP] identifier[AsyncHandler] operator[<] identifier[AddPermissionRequest] , identifier[AddPermissionResult] operator[>] identifier[asyncHandler] operator[SEP] { Keyword[return] identifier[addPermissionAsync] operator[SEP] Keyword[new] identifier[AddPermissionRequest] operator[SEP] operator[SEP] operator[SEP] identifier[withQueueUrl] operator[SEP] identifier[queueUrl] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] identifier[label] operator[SEP] operator[SEP] identifier[withAWSAccountIds] operator[SEP] identifier[aWSAccountIds] operator[SEP] operator[SEP] identifier[withActions] operator[SEP] identifier[actions] operator[SEP] , identifier[asyncHandler] operator[SEP] operator[SEP] }
@Override public CommerceWishListItem create(long commerceWishListItemId) { CommerceWishListItem commerceWishListItem = new CommerceWishListItemImpl(); commerceWishListItem.setNew(true); commerceWishListItem.setPrimaryKey(commerceWishListItemId); commerceWishListItem.setCompanyId(companyProvider.getCompanyId()); return commerceWishListItem; }
class class_name[name] begin[{] method[create, return_type[type[CommerceWishListItem]], modifier[public], parameter[commerceWishListItemId]] begin[{] local_variable[type[CommerceWishListItem], commerceWishListItem] call[commerceWishListItem.setNew, parameter[literal[true]]] call[commerceWishListItem.setPrimaryKey, parameter[member[.commerceWishListItemId]]] call[commerceWishListItem.setCompanyId, parameter[call[companyProvider.getCompanyId, parameter[]]]] return[member[.commerceWishListItem]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommerceWishListItem] identifier[create] operator[SEP] Keyword[long] identifier[commerceWishListItemId] operator[SEP] { identifier[CommerceWishListItem] identifier[commerceWishListItem] operator[=] Keyword[new] identifier[CommerceWishListItemImpl] operator[SEP] operator[SEP] operator[SEP] identifier[commerceWishListItem] operator[SEP] identifier[setNew] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[commerceWishListItem] operator[SEP] identifier[setPrimaryKey] operator[SEP] identifier[commerceWishListItemId] operator[SEP] operator[SEP] identifier[commerceWishListItem] operator[SEP] identifier[setCompanyId] operator[SEP] identifier[companyProvider] operator[SEP] identifier[getCompanyId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[commerceWishListItem] operator[SEP] }
public void popTypeVariables (int count) { int n = argumentsSize, i = n - count; argumentsSize = i; while (i < n) arguments[i++] = null; }
class class_name[name] begin[{] method[popTypeVariables, return_type[void], modifier[public], parameter[count]] begin[{] local_variable[type[int], n] assign[member[.argumentsSize], member[.i]] while[binary_operation[member[.i], <, member[.n]]] begin[{] assign[member[.arguments], literal[null]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[popTypeVariables] operator[SEP] Keyword[int] identifier[count] operator[SEP] { Keyword[int] identifier[n] operator[=] identifier[argumentsSize] , identifier[i] operator[=] identifier[n] operator[-] identifier[count] operator[SEP] identifier[argumentsSize] operator[=] identifier[i] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[arguments] operator[SEP] identifier[i] operator[++] operator[SEP] operator[=] Other[null] operator[SEP] }
@Override public byte[] decrypt(EncryptedData dataToDecrypt, KeyParameter aesKey) throws KeyCrypterException { checkNotNull(dataToDecrypt); checkNotNull(aesKey); try { ParametersWithIV keyWithIv = new ParametersWithIV(new KeyParameter(aesKey.getKey()), dataToDecrypt.initialisationVector); // Decrypt the message. BufferedBlockCipher cipher = new PaddedBufferedBlockCipher(new CBCBlockCipher(new AESEngine())); cipher.init(false, keyWithIv); byte[] cipherBytes = dataToDecrypt.encryptedBytes; byte[] decryptedBytes = new byte[cipher.getOutputSize(cipherBytes.length)]; final int length1 = cipher.processBytes(cipherBytes, 0, cipherBytes.length, decryptedBytes, 0); final int length2 = cipher.doFinal(decryptedBytes, length1); return Arrays.copyOf(decryptedBytes, length1 + length2); } catch (InvalidCipherTextException e) { throw new KeyCrypterException.InvalidCipherText("Could not decrypt bytes", e); } catch (RuntimeException e) { throw new KeyCrypterException("Could not decrypt bytes", e); } }
class class_name[name] begin[{] method[decrypt, return_type[type[byte]], modifier[public], parameter[dataToDecrypt, aesKey]] begin[{] call[.checkNotNull, parameter[member[.dataToDecrypt]]] call[.checkNotNull, parameter[member[.aesKey]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=aesKey, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=KeyParameter, sub_type=None)), MemberReference(member=initialisationVector, postfix_operators=[], prefix_operators=[], qualifier=dataToDecrypt, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParametersWithIV, sub_type=None)), name=keyWithIv)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ParametersWithIV, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AESEngine, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CBCBlockCipher, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PaddedBufferedBlockCipher, sub_type=None)), name=cipher)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BufferedBlockCipher, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=keyWithIv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=init, postfix_operators=[], prefix_operators=[], qualifier=cipher, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=encryptedBytes, postfix_operators=[], prefix_operators=[], qualifier=dataToDecrypt, selectors=[]), name=cipherBytes)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MethodInvocation(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=cipherBytes, selectors=[])], member=getOutputSize, postfix_operators=[], prefix_operators=[], qualifier=cipher, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=decryptedBytes)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=cipherBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=cipherBytes, selectors=[]), MemberReference(member=decryptedBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=processBytes, postfix_operators=[], prefix_operators=[], qualifier=cipher, selectors=[], type_arguments=None), name=length1)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=decryptedBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=length1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doFinal, postfix_operators=[], prefix_operators=[], qualifier=cipher, selectors=[], type_arguments=None), name=length2)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=decryptedBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=length1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=copyOf, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not decrypt bytes"), 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=KeyCrypterException, sub_type=ReferenceType(arguments=None, dimensions=None, name=InvalidCipherText, sub_type=None))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InvalidCipherTextException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not decrypt bytes"), 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=KeyCrypterException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RuntimeException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[decrypt] operator[SEP] identifier[EncryptedData] identifier[dataToDecrypt] , identifier[KeyParameter] identifier[aesKey] operator[SEP] Keyword[throws] identifier[KeyCrypterException] { identifier[checkNotNull] operator[SEP] identifier[dataToDecrypt] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[aesKey] operator[SEP] operator[SEP] Keyword[try] { identifier[ParametersWithIV] identifier[keyWithIv] operator[=] Keyword[new] identifier[ParametersWithIV] operator[SEP] Keyword[new] identifier[KeyParameter] operator[SEP] identifier[aesKey] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] , identifier[dataToDecrypt] operator[SEP] identifier[initialisationVector] operator[SEP] operator[SEP] identifier[BufferedBlockCipher] identifier[cipher] operator[=] Keyword[new] identifier[PaddedBufferedBlockCipher] operator[SEP] Keyword[new] identifier[CBCBlockCipher] operator[SEP] Keyword[new] identifier[AESEngine] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[cipher] operator[SEP] identifier[init] operator[SEP] literal[boolean] , identifier[keyWithIv] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[cipherBytes] operator[=] identifier[dataToDecrypt] operator[SEP] identifier[encryptedBytes] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[decryptedBytes] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[cipher] operator[SEP] identifier[getOutputSize] operator[SEP] identifier[cipherBytes] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[length1] operator[=] identifier[cipher] operator[SEP] identifier[processBytes] operator[SEP] identifier[cipherBytes] , Other[0] , identifier[cipherBytes] operator[SEP] identifier[length] , identifier[decryptedBytes] , Other[0] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[length2] operator[=] identifier[cipher] operator[SEP] identifier[doFinal] operator[SEP] identifier[decryptedBytes] , identifier[length1] operator[SEP] operator[SEP] Keyword[return] identifier[Arrays] operator[SEP] identifier[copyOf] operator[SEP] identifier[decryptedBytes] , identifier[length1] operator[+] identifier[length2] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvalidCipherTextException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[KeyCrypterException] operator[SEP] identifier[InvalidCipherText] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[KeyCrypterException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
List<JaversProperty> getManagedProperties(Predicate<JaversProperty> query) { return Lists.positiveFilter(managedProperties, query); }
class class_name[name] begin[{] method[getManagedProperties, return_type[type[List]], modifier[default], parameter[query]] begin[{] return[call[Lists.positiveFilter, parameter[member[.managedProperties], member[.query]]]] end[}] END[}]
identifier[List] operator[<] identifier[JaversProperty] operator[>] identifier[getManagedProperties] operator[SEP] identifier[Predicate] operator[<] identifier[JaversProperty] operator[>] identifier[query] operator[SEP] { Keyword[return] identifier[Lists] operator[SEP] identifier[positiveFilter] operator[SEP] identifier[managedProperties] , identifier[query] operator[SEP] operator[SEP] }
public void marshall(ListLocationsRequest listLocationsRequest, ProtocolMarshaller protocolMarshaller) { if (listLocationsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(listLocationsRequest.getMaxResults(), MAXRESULTS_BINDING); protocolMarshaller.marshall(listLocationsRequest.getNextToken(), NEXTTOKEN_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[listLocationsRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.listLocationsRequest], ==, 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=getMaxResults, postfix_operators=[], prefix_operators=[], qualifier=listLocationsRequest, selectors=[], type_arguments=None), MemberReference(member=MAXRESULTS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNextToken, postfix_operators=[], prefix_operators=[], qualifier=listLocationsRequest, selectors=[], type_arguments=None), MemberReference(member=NEXTTOKEN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], 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[ListLocationsRequest] identifier[listLocationsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[listLocationsRequest] 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[listLocationsRequest] operator[SEP] identifier[getMaxResults] operator[SEP] operator[SEP] , identifier[MAXRESULTS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listLocationsRequest] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
@Override public UpdatePolicyResult updatePolicy(UpdatePolicyRequest request) { request = beforeClientExecution(request); return executeUpdatePolicy(request); }
class class_name[name] begin[{] method[updatePolicy, return_type[type[UpdatePolicyResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeUpdatePolicy, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[UpdatePolicyResult] identifier[updatePolicy] operator[SEP] identifier[UpdatePolicyRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeUpdatePolicy] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
private static void removeMatch(final AccumulateNode accNode, final Accumulate accumulate, final RightTuple rightTuple, final LeftTuple match, final InternalWorkingMemory wm, final AccumulateMemory am, final AccumulateContext accctx, final boolean reaccumulate) { // save the matching tuple LeftTuple leftTuple = match.getLeftParent(); // removing link between left and right match.unlinkFromLeftParent(); match.unlinkFromRightParent(); // if there is a subnetwork, we need to unwrap the object from inside the tuple InternalFactHandle handle = rightTuple.getFactHandle(); LeftTuple tuple = leftTuple; if (accNode.isUnwrapRightObject()) { tuple = (LeftTuple) rightTuple; handle = rightTuple.getFactHandleForEvaluation(); } if (accumulate.supportsReverse()) { // just reverse this single match accumulate.reverse(am.workingMemoryContext, accctx.context, tuple, handle, wm); } else { // otherwise need to recalculate all matches for the given leftTuple if (reaccumulate) { reaccumulateForLeftTuple(accNode, accumulate, leftTuple, wm, am, accctx); } } }
class class_name[name] begin[{] method[removeMatch, return_type[void], modifier[private static], parameter[accNode, accumulate, rightTuple, match, wm, am, accctx, reaccumulate]] begin[{] local_variable[type[LeftTuple], leftTuple] call[match.unlinkFromLeftParent, parameter[]] call[match.unlinkFromRightParent, parameter[]] local_variable[type[InternalFactHandle], handle] local_variable[type[LeftTuple], tuple] if[call[accNode.isUnwrapRightObject, parameter[]]] begin[{] assign[member[.tuple], Cast(expression=MemberReference(member=rightTuple, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LeftTuple, sub_type=None))] assign[member[.handle], call[rightTuple.getFactHandleForEvaluation, parameter[]]] else begin[{] None end[}] if[call[accumulate.supportsReverse, parameter[]]] begin[{] call[accumulate.reverse, parameter[member[am.workingMemoryContext], member[accctx.context], member[.tuple], member[.handle], member[.wm]]] else begin[{] if[member[.reaccumulate]] begin[{] call[.reaccumulateForLeftTuple, parameter[member[.accNode], member[.accumulate], member[.leftTuple], member[.wm], member[.am], member[.accctx]]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[removeMatch] operator[SEP] Keyword[final] identifier[AccumulateNode] identifier[accNode] , Keyword[final] identifier[Accumulate] identifier[accumulate] , Keyword[final] identifier[RightTuple] identifier[rightTuple] , Keyword[final] identifier[LeftTuple] identifier[match] , Keyword[final] identifier[InternalWorkingMemory] identifier[wm] , Keyword[final] identifier[AccumulateMemory] identifier[am] , Keyword[final] identifier[AccumulateContext] identifier[accctx] , Keyword[final] Keyword[boolean] identifier[reaccumulate] operator[SEP] { identifier[LeftTuple] identifier[leftTuple] operator[=] identifier[match] operator[SEP] identifier[getLeftParent] operator[SEP] operator[SEP] operator[SEP] identifier[match] operator[SEP] identifier[unlinkFromLeftParent] operator[SEP] operator[SEP] operator[SEP] identifier[match] operator[SEP] identifier[unlinkFromRightParent] operator[SEP] operator[SEP] operator[SEP] identifier[InternalFactHandle] identifier[handle] operator[=] identifier[rightTuple] operator[SEP] identifier[getFactHandle] operator[SEP] operator[SEP] operator[SEP] identifier[LeftTuple] identifier[tuple] operator[=] identifier[leftTuple] operator[SEP] Keyword[if] operator[SEP] identifier[accNode] operator[SEP] identifier[isUnwrapRightObject] operator[SEP] operator[SEP] operator[SEP] { identifier[tuple] operator[=] operator[SEP] identifier[LeftTuple] operator[SEP] identifier[rightTuple] operator[SEP] identifier[handle] operator[=] identifier[rightTuple] operator[SEP] identifier[getFactHandleForEvaluation] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[accumulate] operator[SEP] identifier[supportsReverse] operator[SEP] operator[SEP] operator[SEP] { identifier[accumulate] operator[SEP] identifier[reverse] operator[SEP] identifier[am] operator[SEP] identifier[workingMemoryContext] , identifier[accctx] operator[SEP] identifier[context] , identifier[tuple] , identifier[handle] , identifier[wm] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[reaccumulate] operator[SEP] { identifier[reaccumulateForLeftTuple] operator[SEP] identifier[accNode] , identifier[accumulate] , identifier[leftTuple] , identifier[wm] , identifier[am] , identifier[accctx] operator[SEP] operator[SEP] } } }
@SuppressWarnings("unchecked") public static <T> Id<T> newId(final Class<T> type, final Class<? extends Annotation> annotationClass) { return (Id<T>) newId((Type) type, annotationClass); }
class class_name[name] begin[{] method[newId, return_type[type[Id]], modifier[public static], parameter[type, annotationClass]] begin[{] return[Cast(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Type, sub_type=None)), MemberReference(member=annotationClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Id, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Id] operator[<] identifier[T] operator[>] identifier[newId] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Annotation] operator[>] identifier[annotationClass] operator[SEP] { Keyword[return] operator[SEP] identifier[Id] operator[<] identifier[T] operator[>] operator[SEP] identifier[newId] operator[SEP] operator[SEP] identifier[Type] operator[SEP] identifier[type] , identifier[annotationClass] operator[SEP] operator[SEP] }
public boolean exists(long featureId, String database, String table) { boolean exists = false; Map<String, Map<Long, FeatureShape>> tables = databases.get(database); if (tables != null) { Map<Long, FeatureShape> featureIds = tables.get(table); if (featureIds != null) { FeatureShape shapes = featureIds.get(featureId); exists = shapes != null && shapes.hasShapes(); } } return exists; }
class class_name[name] begin[{] method[exists, return_type[type[boolean]], modifier[public], parameter[featureId, database, table]] begin[{] local_variable[type[boolean], exists] local_variable[type[Map], tables] if[binary_operation[member[.tables], !=, literal[null]]] begin[{] local_variable[type[Map], featureIds] if[binary_operation[member[.featureIds], !=, literal[null]]] begin[{] local_variable[type[FeatureShape], shapes] assign[member[.exists], binary_operation[binary_operation[member[.shapes], !=, literal[null]], &&, call[shapes.hasShapes, parameter[]]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.exists]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[exists] operator[SEP] Keyword[long] identifier[featureId] , identifier[String] identifier[database] , identifier[String] identifier[table] operator[SEP] { Keyword[boolean] identifier[exists] operator[=] literal[boolean] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[Long] , identifier[FeatureShape] operator[>] operator[>] identifier[tables] operator[=] identifier[databases] operator[SEP] identifier[get] operator[SEP] identifier[database] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tables] operator[!=] Other[null] operator[SEP] { identifier[Map] operator[<] identifier[Long] , identifier[FeatureShape] operator[>] identifier[featureIds] operator[=] identifier[tables] operator[SEP] identifier[get] operator[SEP] identifier[table] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[featureIds] operator[!=] Other[null] operator[SEP] { identifier[FeatureShape] identifier[shapes] operator[=] identifier[featureIds] operator[SEP] identifier[get] operator[SEP] identifier[featureId] operator[SEP] operator[SEP] identifier[exists] operator[=] identifier[shapes] operator[!=] Other[null] operator[&&] identifier[shapes] operator[SEP] identifier[hasShapes] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[exists] operator[SEP] }
public void unregisterService(Database database, String serviceName, String instanceName, String deviceName) throws DevFailed { String[] services = new String[0]; // Get service property DbDatum data = get_property(database, TangoConst.CONTROL_SYSTEM, TangoConst.SERVICE_PROP_NAME); if (!data.is_empty()) services = data.extractStringArray(); // Build what to be remove and searched String target = serviceName + "/" + instanceName; target = target.toLowerCase(); // Search if already exists boolean exists = false; Vector<String> v = new Vector<String>(); for (String service : services) { String line = service.toLowerCase(); int idx = line.indexOf(':'); if (idx>0) line = line.substring(0, idx); if (line.equals(target)) // Found exists = true; else v.add(service); } if (exists) { // Copy vector to String array services = new String[v.size()]; for (int i = 0 ; i<v.size() ; i++) services[i] = v.get(i); // And finally put property data = new DbDatum(TangoConst.SERVICE_PROP_NAME); data.insert(services); put_property(database, TangoConst.CONTROL_SYSTEM, new DbDatum[]{data}); } }
class class_name[name] begin[{] method[unregisterService, return_type[void], modifier[public], parameter[database, serviceName, instanceName, deviceName]] begin[{] local_variable[type[String], services] local_variable[type[DbDatum], data] if[call[data.is_empty, parameter[]]] begin[{] assign[member[.services], call[data.extractStringArray, parameter[]]] else begin[{] None end[}] local_variable[type[String], target] assign[member[.target], call[target.toLowerCase, parameter[]]] local_variable[type[boolean], exists] local_variable[type[Vector], v] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=toLowerCase, postfix_operators=[], prefix_operators=[], qualifier=service, selectors=[], type_arguments=None), name=line)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=':')], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), name=idx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=idx, 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=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None)), label=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=target, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), else_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=service, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=exists, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=services, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=service)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) if[member[.exists]] begin[{] assign[member[.services], ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=services, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, 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=v, 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) assign[member[.data], ClassCreator(arguments=[MemberReference(member=SERVICE_PROP_NAME, postfix_operators=[], prefix_operators=[], qualifier=TangoConst, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DbDatum, sub_type=None))] call[data.insert, parameter[member[.services]]] call[.put_property, parameter[member[.database], member[TangoConst.CONTROL_SYSTEM], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DbDatum, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[unregisterService] operator[SEP] identifier[Database] identifier[database] , identifier[String] identifier[serviceName] , identifier[String] identifier[instanceName] , identifier[String] identifier[deviceName] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[String] operator[SEP] operator[SEP] identifier[services] operator[=] Keyword[new] identifier[String] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[DbDatum] identifier[data] operator[=] identifier[get_property] operator[SEP] identifier[database] , identifier[TangoConst] operator[SEP] identifier[CONTROL_SYSTEM] , identifier[TangoConst] operator[SEP] identifier[SERVICE_PROP_NAME] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[data] operator[SEP] identifier[is_empty] operator[SEP] operator[SEP] operator[SEP] identifier[services] operator[=] identifier[data] operator[SEP] identifier[extractStringArray] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[target] operator[=] identifier[serviceName] operator[+] literal[String] operator[+] identifier[instanceName] operator[SEP] identifier[target] operator[=] identifier[target] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[exists] operator[=] literal[boolean] operator[SEP] identifier[Vector] operator[<] identifier[String] operator[>] identifier[v] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[service] operator[:] identifier[services] operator[SEP] { identifier[String] identifier[line] operator[=] identifier[service] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[idx] operator[=] identifier[line] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[>] Other[0] operator[SEP] identifier[line] operator[=] identifier[line] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[idx] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[equals] operator[SEP] identifier[target] operator[SEP] operator[SEP] identifier[exists] operator[=] literal[boolean] operator[SEP] Keyword[else] identifier[v] operator[SEP] identifier[add] operator[SEP] identifier[service] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[exists] operator[SEP] { identifier[services] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[v] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[v] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[services] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[v] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[data] operator[=] Keyword[new] identifier[DbDatum] operator[SEP] identifier[TangoConst] operator[SEP] identifier[SERVICE_PROP_NAME] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[insert] operator[SEP] identifier[services] operator[SEP] operator[SEP] identifier[put_property] operator[SEP] identifier[database] , identifier[TangoConst] operator[SEP] identifier[CONTROL_SYSTEM] , Keyword[new] identifier[DbDatum] operator[SEP] operator[SEP] { identifier[data] } operator[SEP] operator[SEP] } }
public static long parseLong(Object val) { if (val instanceof String) { return Long.parseLong((String) val); } else if (val instanceof Number) { return ((Number) val).longValue(); } else { if (val == null) { throw new NullPointerException("Input is null"); } else { throw new ISE("Unknown type [%s]", val.getClass()); } } }
class class_name[name] begin[{] method[parseLong, return_type[type[long]], modifier[public static], parameter[val]] begin[{] if[binary_operation[member[.val], instanceof, type[String]]] begin[{] return[call[Long.parseLong, parameter[Cast(expression=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))]]] else begin[{] if[binary_operation[member[.val], instanceof, type[Number]]] begin[{] return[Cast(expression=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None))] else begin[{] if[binary_operation[member[.val], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Input is 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[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown type [%s]"), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=val, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ISE, sub_type=None)), label=None) end[}] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[parseLong] operator[SEP] identifier[Object] identifier[val] operator[SEP] { Keyword[if] operator[SEP] identifier[val] Keyword[instanceof] identifier[String] operator[SEP] { Keyword[return] identifier[Long] operator[SEP] identifier[parseLong] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[val] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[val] Keyword[instanceof] identifier[Number] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[Number] operator[SEP] identifier[val] operator[SEP] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[val] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[ISE] operator[SEP] literal[String] , identifier[val] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
public void delete(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) { deleteWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion).toBlocking().last().body(); }
class class_name[name] begin[{] method[delete, return_type[void], modifier[public], parameter[resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion]] begin[{] call[.deleteWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.resourceProviderNamespace], member[.parentResourcePath], member[.resourceType], member[.resourceName], member[.apiVersion]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[delete] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[resourceProviderNamespace] , identifier[String] identifier[parentResourcePath] , identifier[String] identifier[resourceType] , identifier[String] identifier[resourceName] , identifier[String] identifier[apiVersion] operator[SEP] { identifier[deleteWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[resourceProviderNamespace] , identifier[parentResourcePath] , identifier[resourceType] , identifier[resourceName] , identifier[apiVersion] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[last] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
public void queryLiveness(javax.slee.resource.ActivityHandle activityHandle) { // end any idle activity, it should be a leak, this is true assuming // that jboss web session timeout is smaller than the container timeout // to invoke this method if (tracer.isInfoEnabled()) { tracer.info("Activity " + activityHandle + " is idle in the container, terminating."); } endActivity((AbstractHttpServletActivity) activityHandle); }
class class_name[name] begin[{] method[queryLiveness, return_type[void], modifier[public], parameter[activityHandle]] begin[{] if[call[tracer.isInfoEnabled, parameter[]]] begin[{] call[tracer.info, parameter[binary_operation[binary_operation[literal["Activity "], +, member[.activityHandle]], +, literal[" is idle in the container, terminating."]]]] else begin[{] None end[}] call[.endActivity, parameter[Cast(expression=MemberReference(member=activityHandle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AbstractHttpServletActivity, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[queryLiveness] operator[SEP] identifier[javax] operator[SEP] identifier[slee] operator[SEP] identifier[resource] operator[SEP] identifier[ActivityHandle] identifier[activityHandle] operator[SEP] { Keyword[if] operator[SEP] identifier[tracer] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[tracer] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[activityHandle] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[endActivity] operator[SEP] operator[SEP] identifier[AbstractHttpServletActivity] operator[SEP] identifier[activityHandle] operator[SEP] operator[SEP] }
@Override public ICodeBaseLocator createFilesystemCodeBaseLocator(String pathName) { // Attempt to canonicalize the pathname. // It's not fatal if we can't. try { pathName = new File(pathName).getCanonicalPath(); } catch (IOException e) { // Ignore } return new FilesystemCodeBaseLocator(pathName); }
class class_name[name] begin[{] method[createFilesystemCodeBaseLocator, return_type[type[ICodeBaseLocator]], modifier[public], parameter[pathName]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=pathName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=pathName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getCanonicalPath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) return[ClassCreator(arguments=[MemberReference(member=pathName, 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=FilesystemCodeBaseLocator, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ICodeBaseLocator] identifier[createFilesystemCodeBaseLocator] operator[SEP] identifier[String] identifier[pathName] operator[SEP] { Keyword[try] { identifier[pathName] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[pathName] operator[SEP] operator[SEP] identifier[getCanonicalPath] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { } Keyword[return] Keyword[new] identifier[FilesystemCodeBaseLocator] operator[SEP] identifier[pathName] operator[SEP] operator[SEP] }
@Override // thanks to // http://binkley.blogspot.fr/2009/04/jumping-work-queue-in-executor.html // for backward compat to SDK 8 (JDK 5) protected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value) { // makes findbugs happy, there must be some @Nullable // annotation in JDK.. if (runnable == null) { return null; } return new PriorityFuture<T>(runnable, ((PriorityRunnable) runnable).getPriority(), value); }
class class_name[name] begin[{] method[newTaskFor, return_type[type[RunnableFuture]], modifier[protected], parameter[runnable, value]] begin[{] if[binary_operation[member[.runnable], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=runnable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=runnable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=PriorityRunnable, 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=T, sub_type=None))], dimensions=None, name=PriorityFuture, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] operator[<] identifier[T] operator[>] identifier[RunnableFuture] operator[<] identifier[T] operator[>] identifier[newTaskFor] operator[SEP] identifier[Runnable] identifier[runnable] , identifier[T] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[runnable] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] Keyword[new] identifier[PriorityFuture] operator[<] identifier[T] operator[>] operator[SEP] identifier[runnable] , operator[SEP] operator[SEP] identifier[PriorityRunnable] operator[SEP] identifier[runnable] operator[SEP] operator[SEP] identifier[getPriority] operator[SEP] operator[SEP] , identifier[value] operator[SEP] operator[SEP] }
private Rectangle getVDropLineRect(JTable.DropLocation loc) { if (!loc.isInsertColumn()) { return null; } boolean ltr = table.getComponentOrientation().isLeftToRight(); int col = loc.getColumn(); Rectangle rect = table.getCellRect(loc.getRow(), col, true); if (col >= table.getColumnCount()) { col--; rect = table.getCellRect(loc.getRow(), col, true); if (ltr) { rect.x = rect.x + rect.width; } } else if (!ltr) { rect.x = rect.x + rect.width; } if (rect.x == 0) { rect.x = -1; } else { rect.x -= 2; } rect.width = 3; return rect; }
class class_name[name] begin[{] method[getVDropLineRect, return_type[type[Rectangle]], modifier[private], parameter[loc]] begin[{] if[call[loc.isInsertColumn, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[boolean], ltr] local_variable[type[int], col] local_variable[type[Rectangle], rect] if[binary_operation[member[.col], >=, call[table.getColumnCount, parameter[]]]] begin[{] member[.col] assign[member[.rect], call[table.getCellRect, parameter[call[loc.getRow, parameter[]], member[.col], literal[true]]]] if[member[.ltr]] begin[{] assign[member[rect.x], binary_operation[member[rect.x], +, member[rect.width]]] else begin[{] None end[}] else begin[{] if[member[.ltr]] begin[{] assign[member[rect.x], binary_operation[member[rect.x], +, member[rect.width]]] else begin[{] None end[}] end[}] if[binary_operation[member[rect.x], ==, literal[0]]] begin[{] assign[member[rect.x], literal[1]] else begin[{] assign[member[rect.x], literal[2]] end[}] assign[member[rect.width], literal[3]] return[member[.rect]] end[}] END[}]
Keyword[private] identifier[Rectangle] identifier[getVDropLineRect] operator[SEP] identifier[JTable] operator[SEP] identifier[DropLocation] identifier[loc] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[loc] operator[SEP] identifier[isInsertColumn] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[boolean] identifier[ltr] operator[=] identifier[table] operator[SEP] identifier[getComponentOrientation] operator[SEP] operator[SEP] operator[SEP] identifier[isLeftToRight] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[col] operator[=] identifier[loc] operator[SEP] identifier[getColumn] operator[SEP] operator[SEP] operator[SEP] identifier[Rectangle] identifier[rect] operator[=] identifier[table] operator[SEP] identifier[getCellRect] operator[SEP] identifier[loc] operator[SEP] identifier[getRow] operator[SEP] operator[SEP] , identifier[col] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[col] operator[>=] identifier[table] operator[SEP] identifier[getColumnCount] operator[SEP] operator[SEP] operator[SEP] { identifier[col] operator[--] operator[SEP] identifier[rect] operator[=] identifier[table] operator[SEP] identifier[getCellRect] operator[SEP] identifier[loc] operator[SEP] identifier[getRow] operator[SEP] operator[SEP] , identifier[col] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ltr] operator[SEP] { identifier[rect] operator[SEP] identifier[x] operator[=] identifier[rect] operator[SEP] identifier[x] operator[+] identifier[rect] operator[SEP] identifier[width] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[ltr] operator[SEP] { identifier[rect] operator[SEP] identifier[x] operator[=] identifier[rect] operator[SEP] identifier[x] operator[+] identifier[rect] operator[SEP] identifier[width] operator[SEP] } Keyword[if] operator[SEP] identifier[rect] operator[SEP] identifier[x] operator[==] Other[0] operator[SEP] { identifier[rect] operator[SEP] identifier[x] operator[=] operator[-] Other[1] operator[SEP] } Keyword[else] { identifier[rect] operator[SEP] identifier[x] operator[-=] Other[2] operator[SEP] } identifier[rect] operator[SEP] identifier[width] operator[=] Other[3] operator[SEP] Keyword[return] identifier[rect] operator[SEP] }
@Deprecated protected void doPatch(ServiceRequestContext ctx, HttpRequest req, HttpResponseWriter res) throws Exception { res.respond(HttpStatus.METHOD_NOT_ALLOWED); }
class class_name[name] begin[{] method[doPatch, return_type[void], modifier[protected], parameter[ctx, req, res]] begin[{] call[res.respond, parameter[member[HttpStatus.METHOD_NOT_ALLOWED]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[protected] Keyword[void] identifier[doPatch] operator[SEP] identifier[ServiceRequestContext] identifier[ctx] , identifier[HttpRequest] identifier[req] , identifier[HttpResponseWriter] identifier[res] operator[SEP] Keyword[throws] identifier[Exception] { identifier[res] operator[SEP] identifier[respond] operator[SEP] identifier[HttpStatus] operator[SEP] identifier[METHOD_NOT_ALLOWED] operator[SEP] operator[SEP] }
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "Style", substitutionHeadNamespace = "http://www.opengis.net/gml", substitutionHeadName = "_Style") public JAXBElement<StyleType> createStyle(StyleType value) { return new JAXBElement<StyleType>(_Style_QNAME, StyleType.class, null, value); }
class class_name[name] begin[{] method[createStyle, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_Style_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StyleType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=StyleType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[substitutionHeadNamespace] operator[=] literal[String] , identifier[substitutionHeadName] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[StyleType] operator[>] identifier[createStyle] operator[SEP] identifier[StyleType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[StyleType] operator[>] operator[SEP] identifier[_Style_QNAME] , identifier[StyleType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
public void downloadToFile(final String path) throws StorageException, IOException { downloadToFile(path, null /* accessCondition */, null /* options */, null /* opContext */); }
class class_name[name] begin[{] method[downloadToFile, return_type[void], modifier[public], parameter[path]] begin[{] call[.downloadToFile, parameter[member[.path], literal[null], literal[null], literal[null]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[downloadToFile] operator[SEP] Keyword[final] identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[StorageException] , identifier[IOException] { identifier[downloadToFile] operator[SEP] identifier[path] , Other[null] , Other[null] , Other[null] operator[SEP] operator[SEP] }
static void zero(byte[] bytes, int off, int len) { // this is significantly faster than looping or Arrays.fill (which loops), particularly when // the length of the slice to be zeroed is <= to ARRAY_LEN (in that case, it's faster by a // factor of 2) int remaining = len; while (remaining > ARRAY_LEN) { System.arraycopy(ZERO_ARRAY, 0, bytes, off, ARRAY_LEN); off += ARRAY_LEN; remaining -= ARRAY_LEN; } System.arraycopy(ZERO_ARRAY, 0, bytes, off, remaining); }
class class_name[name] begin[{] method[zero, return_type[void], modifier[static], parameter[bytes, off, len]] begin[{] local_variable[type[int], remaining] while[binary_operation[member[.remaining], >, member[.ARRAY_LEN]]] begin[{] call[System.arraycopy, parameter[member[.ZERO_ARRAY], literal[0], member[.bytes], member[.off], member[.ARRAY_LEN]]] assign[member[.off], member[.ARRAY_LEN]] assign[member[.remaining], member[.ARRAY_LEN]] end[}] call[System.arraycopy, parameter[member[.ZERO_ARRAY], literal[0], member[.bytes], member[.off], member[.remaining]]] end[}] END[}]
Keyword[static] Keyword[void] identifier[zero] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] { Keyword[int] identifier[remaining] operator[=] identifier[len] operator[SEP] Keyword[while] operator[SEP] identifier[remaining] operator[>] identifier[ARRAY_LEN] operator[SEP] { identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[ZERO_ARRAY] , Other[0] , identifier[bytes] , identifier[off] , identifier[ARRAY_LEN] operator[SEP] operator[SEP] identifier[off] operator[+=] identifier[ARRAY_LEN] operator[SEP] identifier[remaining] operator[-=] identifier[ARRAY_LEN] operator[SEP] } identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[ZERO_ARRAY] , Other[0] , identifier[bytes] , identifier[off] , identifier[remaining] operator[SEP] operator[SEP] }
private SortedMap<String, ModelProperty> sort(Map<String, ModelProperty> modelProperties) { SortedMap<String, ModelProperty> sortedMap = new TreeMap<String, ModelProperty>(defaultOrdering(modelProperties)); sortedMap.putAll(modelProperties); return sortedMap; }
class class_name[name] begin[{] method[sort, return_type[type[SortedMap]], modifier[private], parameter[modelProperties]] begin[{] local_variable[type[SortedMap], sortedMap] call[sortedMap.putAll, parameter[member[.modelProperties]]] return[member[.sortedMap]] end[}] END[}]
Keyword[private] identifier[SortedMap] operator[<] identifier[String] , identifier[ModelProperty] operator[>] identifier[sort] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[ModelProperty] operator[>] identifier[modelProperties] operator[SEP] { identifier[SortedMap] operator[<] identifier[String] , identifier[ModelProperty] operator[>] identifier[sortedMap] operator[=] Keyword[new] identifier[TreeMap] operator[<] identifier[String] , identifier[ModelProperty] operator[>] operator[SEP] identifier[defaultOrdering] operator[SEP] identifier[modelProperties] operator[SEP] operator[SEP] operator[SEP] identifier[sortedMap] operator[SEP] identifier[putAll] operator[SEP] identifier[modelProperties] operator[SEP] operator[SEP] Keyword[return] identifier[sortedMap] operator[SEP] }
@Override public boolean accepts(Item item, List<Item> acceptedItems, List<Item> rejectedItems, boolean runningBeforeProcessing) { boolean accepted = true; if (CollectionUtils.isNotEmpty(filters)) { for (Iterator<ItemFilter> filterIter = filters.iterator(); accepted && filterIter.hasNext();) { ItemFilter filter = filterIter.next(); if (runningBeforeProcessing && filter.runBeforeProcessing()) { accepted = filter.accepts(item, acceptedItems, rejectedItems, runningBeforeProcessing); } else if (!runningBeforeProcessing && filter.runAfterProcessing()) { accepted = filter.accepts(item, acceptedItems, rejectedItems, runningBeforeProcessing); } } } return accepted; }
class class_name[name] begin[{] method[accepts, return_type[type[boolean]], modifier[public], parameter[item, acceptedItems, rejectedItems, runningBeforeProcessing]] begin[{] local_variable[type[boolean], accepted] if[call[CollectionUtils.isNotEmpty, parameter[member[.filters]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=filterIter, selectors=[], type_arguments=None), name=filter)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ItemFilter, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=runningBeforeProcessing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=runBeforeProcessing, postfix_operators=[], prefix_operators=[], qualifier=filter, selectors=[], type_arguments=None), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=runningBeforeProcessing, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=runAfterProcessing, postfix_operators=[], prefix_operators=[], qualifier=filter, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=accepted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=acceptedItems, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rejectedItems, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=runningBeforeProcessing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accepts, postfix_operators=[], prefix_operators=[], qualifier=filter, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=accepted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=acceptedItems, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rejectedItems, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=runningBeforeProcessing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accepts, postfix_operators=[], prefix_operators=[], qualifier=filter, selectors=[], type_arguments=None)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=accepted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=filterIter, selectors=[], type_arguments=None), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=filters, selectors=[], type_arguments=None), name=filterIter)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ItemFilter, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) else begin[{] None end[}] return[member[.accepted]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[accepts] operator[SEP] identifier[Item] identifier[item] , identifier[List] operator[<] identifier[Item] operator[>] identifier[acceptedItems] , identifier[List] operator[<] identifier[Item] operator[>] identifier[rejectedItems] , Keyword[boolean] identifier[runningBeforeProcessing] operator[SEP] { Keyword[boolean] identifier[accepted] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[CollectionUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[filters] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[ItemFilter] operator[>] identifier[filterIter] operator[=] identifier[filters] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[accepted] operator[&&] identifier[filterIter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[ItemFilter] identifier[filter] operator[=] identifier[filterIter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[runningBeforeProcessing] operator[&&] identifier[filter] operator[SEP] identifier[runBeforeProcessing] operator[SEP] operator[SEP] operator[SEP] { identifier[accepted] operator[=] identifier[filter] operator[SEP] identifier[accepts] operator[SEP] identifier[item] , identifier[acceptedItems] , identifier[rejectedItems] , identifier[runningBeforeProcessing] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[runningBeforeProcessing] operator[&&] identifier[filter] operator[SEP] identifier[runAfterProcessing] operator[SEP] operator[SEP] operator[SEP] { identifier[accepted] operator[=] identifier[filter] operator[SEP] identifier[accepts] operator[SEP] identifier[item] , identifier[acceptedItems] , identifier[rejectedItems] , identifier[runningBeforeProcessing] operator[SEP] operator[SEP] } } } Keyword[return] identifier[accepted] operator[SEP] }
public static <T> List<T> unmodifiableList(Collection<? extends T> elements) { return Collections.unmodifiableList(new ArrayList<>(elements)); }
class class_name[name] begin[{] method[unmodifiableList, return_type[type[List]], modifier[public static], parameter[elements]] begin[{] return[call[Collections.unmodifiableList, parameter[ClassCreator(arguments=[MemberReference(member=elements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[unmodifiableList] operator[SEP] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[elements] operator[SEP] { Keyword[return] identifier[Collections] operator[SEP] identifier[unmodifiableList] operator[SEP] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[elements] operator[SEP] operator[SEP] operator[SEP] }
private boolean isModelClass(String classname, Bundle bundle) { LOGGER.debug("Check if class '{}' is a model class", classname); Class<?> clazz; try { clazz = bundle.loadClass(classname); } catch (ClassNotFoundException e) { LOGGER.warn("Bundle could not load its own class: '{}' bundle: '{}'", classname, bundle.getSymbolicName()); LOGGER.debug("Exact error: ", e); return false; } catch (NoClassDefFoundError e) { // ignore since this happens if bundle have optional imports return false; } catch (Error e) { // if this catch clause is reached, then the bundle which caused this error need to be checked. There // is something wrong with the setup of the bundle (e.g. double import of a library of different versions) LOGGER.warn("Error while loading class: '{}' in bundle: '{}'", classname, bundle.getSymbolicName()); LOGGER.debug("Exact error: ", e); return false; } return clazz.isAnnotationPresent(Model.class); }
class class_name[name] begin[{] method[isModelClass, return_type[type[boolean]], modifier[private], parameter[classname, bundle]] begin[{] call[LOGGER.debug, parameter[literal["Check if class '{}' is a model class"], member[.classname]]] local_variable[type[Class], clazz] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=classname, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadClass, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Bundle could not load its own class: '{}' bundle: '{}'"), MemberReference(member=classname, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getSymbolicName, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exact error: "), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException'])), CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoClassDefFoundError'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error while loading class: '{}' in bundle: '{}'"), MemberReference(member=classname, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getSymbolicName, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exact error: "), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Error']))], finally_block=None, label=None, resources=None) return[call[clazz.isAnnotationPresent, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Model, sub_type=None))]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isModelClass] operator[SEP] identifier[String] identifier[classname] , identifier[Bundle] identifier[bundle] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[classname] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] Keyword[try] { identifier[clazz] operator[=] identifier[bundle] operator[SEP] identifier[loadClass] operator[SEP] identifier[classname] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[classname] , identifier[bundle] operator[SEP] identifier[getSymbolicName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoClassDefFoundError] identifier[e] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[Error] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[classname] , identifier[bundle] operator[SEP] identifier[getSymbolicName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] identifier[clazz] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[Model] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
private void register(WebSocketWireProtocol wireProtocolVersion, WsHandshakeValidator validator) { if ( wireProtocolVersion == null ) { throw new NullPointerException("wireProtocolVersion"); } if ( validator == null ) { throw new NullPointerException("validator"); } WsHandshakeValidator existingValidator = handshakeValidatorsByWireProtocolVersion.put(wireProtocolVersion, validator); logger.trace("Class "+validator.getClass().getName()+" registered to support websocket handshake for protocol "+wireProtocolVersion); if ( existingValidator != null ) { logger.trace("Multiple handshake validators have registered to support wire protocol "+wireProtocolVersion+". Using class "+this.getClass().getName()+'.'); } }
class class_name[name] begin[{] method[register, return_type[void], modifier[private], parameter[wireProtocolVersion, validator]] begin[{] if[binary_operation[member[.wireProtocolVersion], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="wireProtocolVersion")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.validator], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="validator")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[WsHandshakeValidator], existingValidator] call[logger.trace, parameter[binary_operation[binary_operation[binary_operation[literal["Class "], +, call[validator.getClass, parameter[]]], +, literal[" registered to support websocket handshake for protocol "]], +, member[.wireProtocolVersion]]]] if[binary_operation[member[.existingValidator], !=, literal[null]]] begin[{] call[logger.trace, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["Multiple handshake validators have registered to support wire protocol "], +, member[.wireProtocolVersion]], +, literal[". Using class "]], +, THIS[call[None.getClass, parameter[]]call[None.getName, parameter[]]]], +, literal['.']]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[register] operator[SEP] identifier[WebSocketWireProtocol] identifier[wireProtocolVersion] , identifier[WsHandshakeValidator] identifier[validator] operator[SEP] { Keyword[if] operator[SEP] identifier[wireProtocolVersion] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[validator] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[WsHandshakeValidator] identifier[existingValidator] operator[=] identifier[handshakeValidatorsByWireProtocolVersion] operator[SEP] identifier[put] operator[SEP] identifier[wireProtocolVersion] , identifier[validator] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[+] identifier[validator] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[wireProtocolVersion] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[existingValidator] operator[!=] Other[null] operator[SEP] { identifier[logger] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[+] identifier[wireProtocolVersion] operator[+] literal[String] operator[+] Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } }
public static <E extends Exception> int importData(final DataSet dataset, final int offset, final int count, final Try.Predicate<? super Object[], E> filter, final Connection conn, final String insertSQL, final int batchSize, final int batchInterval, final Try.BiConsumer<? super PreparedStatement, ? super Object[], SQLException> stmtSetter) throws UncheckedSQLException, E { PreparedStatement stmt = null; try { stmt = prepareStatement(conn, insertSQL); return importData(dataset, offset, count, filter, stmt, batchSize, batchInterval, stmtSetter); } catch (SQLException e) { throw new UncheckedSQLException(e); } finally { JdbcUtil.closeQuietly(stmt); } }
class class_name[name] begin[{] method[importData, return_type[type[int]], modifier[public static], parameter[dataset, offset, count, filter, conn, insertSQL, batchSize, batchInterval, stmtSetter]] begin[{] local_variable[type[PreparedStatement], stmt] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=stmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=insertSQL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=prepareStatement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=dataset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=stmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=batchSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=batchInterval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=stmtSetter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=importData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UncheckedSQLException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=JdbcUtil, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] Keyword[extends] identifier[Exception] operator[>] Keyword[int] identifier[importData] operator[SEP] Keyword[final] identifier[DataSet] identifier[dataset] , Keyword[final] Keyword[int] identifier[offset] , Keyword[final] Keyword[int] identifier[count] , Keyword[final] identifier[Try] operator[SEP] identifier[Predicate] operator[<] operator[?] Keyword[super] identifier[Object] operator[SEP] operator[SEP] , identifier[E] operator[>] identifier[filter] , Keyword[final] identifier[Connection] identifier[conn] , Keyword[final] identifier[String] identifier[insertSQL] , Keyword[final] Keyword[int] identifier[batchSize] , Keyword[final] Keyword[int] identifier[batchInterval] , Keyword[final] identifier[Try] operator[SEP] identifier[BiConsumer] operator[<] operator[?] Keyword[super] identifier[PreparedStatement] , operator[?] Keyword[super] identifier[Object] operator[SEP] operator[SEP] , identifier[SQLException] operator[>] identifier[stmtSetter] operator[SEP] Keyword[throws] identifier[UncheckedSQLException] , identifier[E] { identifier[PreparedStatement] identifier[stmt] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[stmt] operator[=] identifier[prepareStatement] operator[SEP] identifier[conn] , identifier[insertSQL] operator[SEP] operator[SEP] Keyword[return] identifier[importData] operator[SEP] identifier[dataset] , identifier[offset] , identifier[count] , identifier[filter] , identifier[stmt] , identifier[batchSize] , identifier[batchInterval] , identifier[stmtSetter] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[UncheckedSQLException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[JdbcUtil] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[stmt] operator[SEP] operator[SEP] } }
public <T extends Entity<ID>, ID extends Serializable> T newInstance(final Class<T> clazz, final ID id) { EntityType type = getEntityType(clazz); @SuppressWarnings("unchecked") T entity = (T) type.newInstance(); try { PropertyUtils.setProperty(entity, type.getIdName(), id); } catch (Exception e) { logger.error("initialize {} with id {} error", clazz, id); } return entity; }
class class_name[name] begin[{] method[newInstance, return_type[type[T]], modifier[public], parameter[clazz, id]] begin[{] local_variable[type[EntityType], type] local_variable[type[T], entity] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getIdName, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setProperty, postfix_operators=[], prefix_operators=[], qualifier=PropertyUtils, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="initialize {} with id {} error"), MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.entity]] end[}] END[}]
Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Entity] operator[<] identifier[ID] operator[>] , identifier[ID] Keyword[extends] identifier[Serializable] operator[>] identifier[T] identifier[newInstance] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] , Keyword[final] identifier[ID] identifier[id] operator[SEP] { identifier[EntityType] identifier[type] operator[=] identifier[getEntityType] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[T] identifier[entity] operator[=] operator[SEP] identifier[T] operator[SEP] identifier[type] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[PropertyUtils] operator[SEP] identifier[setProperty] operator[SEP] identifier[entity] , identifier[type] operator[SEP] identifier[getIdName] operator[SEP] operator[SEP] , identifier[id] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[clazz] , identifier[id] operator[SEP] operator[SEP] } Keyword[return] identifier[entity] operator[SEP] }
public void setType(CheckBoxType type) { this.type = type; switch (type) { case FILLED: Element input = DOM.getChild(getElement(), 0); input.setAttribute("class", CssName.FILLED_IN); break; case INTERMEDIATE: addStyleName(type.getCssName() + "-checkbox"); break; default: addStyleName(type.getCssName()); break; } }
class class_name[name] begin[{] method[setType, return_type[void], modifier[public], parameter[type]] begin[{] assign[THIS[member[None.type]], member[.type]] SwitchStatement(cases=[SwitchStatementCase(case=['FILLED'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getChild, postfix_operators=[], prefix_operators=[], qualifier=DOM, selectors=[], type_arguments=None), name=input)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="class"), MemberReference(member=FILLED_IN, postfix_operators=[], prefix_operators=[], qualifier=CssName, selectors=[])], member=setAttribute, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['INTERMEDIATE'], statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCssName, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="-checkbox"), operator=+)], member=addStyleName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCssName, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None)], member=addStyleName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[setType] operator[SEP] identifier[CheckBoxType] identifier[type] operator[SEP] { Keyword[this] operator[SEP] identifier[type] operator[=] identifier[type] operator[SEP] Keyword[switch] operator[SEP] identifier[type] operator[SEP] { Keyword[case] identifier[FILLED] operator[:] identifier[Element] identifier[input] operator[=] identifier[DOM] operator[SEP] identifier[getChild] operator[SEP] identifier[getElement] operator[SEP] operator[SEP] , Other[0] operator[SEP] operator[SEP] identifier[input] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[CssName] operator[SEP] identifier[FILLED_IN] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[INTERMEDIATE] operator[:] identifier[addStyleName] operator[SEP] identifier[type] operator[SEP] identifier[getCssName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[addStyleName] operator[SEP] identifier[type] operator[SEP] identifier[getCssName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } }
public void fixupVariables(java.util.Vector vars, int globalsSize) { super.fixupVariables(vars, globalsSize); if(null != m_args) { for (int i = 0; i < m_args.length; i++) { m_args[i].fixupVariables(vars, globalsSize); } } }
class class_name[name] begin[{] method[fixupVariables, return_type[void], modifier[public], parameter[vars, globalsSize]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=vars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=globalsSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fixupVariables, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) if[binary_operation[literal[null], !=, member[.m_args]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=m_args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=vars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=globalsSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fixupVariables, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=m_args, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[fixupVariables] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Vector] identifier[vars] , Keyword[int] identifier[globalsSize] operator[SEP] { Keyword[super] operator[SEP] identifier[fixupVariables] operator[SEP] identifier[vars] , identifier[globalsSize] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[m_args] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[m_args] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[m_args] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[fixupVariables] operator[SEP] identifier[vars] , identifier[globalsSize] operator[SEP] operator[SEP] } } }
public Subject newSubject(final String nameIdFormat, final String nameIdValue, final String recipient, final ZonedDateTime notOnOrAfter, final String inResponseTo, final ZonedDateTime notBefore) { val nameID = getNameID(nameIdFormat, nameIdValue); return newSubject(nameID, null, recipient, notOnOrAfter, inResponseTo, notBefore); }
class class_name[name] begin[{] method[newSubject, return_type[type[Subject]], modifier[public], parameter[nameIdFormat, nameIdValue, recipient, notOnOrAfter, inResponseTo, notBefore]] begin[{] local_variable[type[val], nameID] return[call[.newSubject, parameter[member[.nameID], literal[null], member[.recipient], member[.notOnOrAfter], member[.inResponseTo], member[.notBefore]]]] end[}] END[}]
Keyword[public] identifier[Subject] identifier[newSubject] operator[SEP] Keyword[final] identifier[String] identifier[nameIdFormat] , Keyword[final] identifier[String] identifier[nameIdValue] , Keyword[final] identifier[String] identifier[recipient] , Keyword[final] identifier[ZonedDateTime] identifier[notOnOrAfter] , Keyword[final] identifier[String] identifier[inResponseTo] , Keyword[final] identifier[ZonedDateTime] identifier[notBefore] operator[SEP] { identifier[val] identifier[nameID] operator[=] identifier[getNameID] operator[SEP] identifier[nameIdFormat] , identifier[nameIdValue] operator[SEP] operator[SEP] Keyword[return] identifier[newSubject] operator[SEP] identifier[nameID] , Other[null] , identifier[recipient] , identifier[notOnOrAfter] , identifier[inResponseTo] , identifier[notBefore] operator[SEP] operator[SEP] }
public void setPolicies(java.util.Collection<PolicySummary> policies) { if (policies == null) { this.policies = null; return; } this.policies = new java.util.ArrayList<PolicySummary>(policies); }
class class_name[name] begin[{] method[setPolicies, return_type[void], modifier[public], parameter[policies]] begin[{] if[binary_operation[member[.policies], ==, literal[null]]] begin[{] assign[THIS[member[None.policies]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.policies]], ClassCreator(arguments=[MemberReference(member=policies, 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=PolicySummary, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setPolicies] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[PolicySummary] operator[>] identifier[policies] operator[SEP] { Keyword[if] operator[SEP] identifier[policies] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[policies] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[policies] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[PolicySummary] operator[>] operator[SEP] identifier[policies] operator[SEP] operator[SEP] }
private void addPostParams(final Request request) { if (friendlyName != null) { request.addPostParam("FriendlyName", friendlyName); } if (status != null) { request.addPostParam("Status", status.toString()); } }
class class_name[name] begin[{] method[addPostParams, return_type[void], modifier[private], parameter[request]] begin[{] if[binary_operation[member[.friendlyName], !=, literal[null]]] begin[{] call[request.addPostParam, parameter[literal["FriendlyName"], member[.friendlyName]]] else begin[{] None end[}] if[binary_operation[member[.status], !=, literal[null]]] begin[{] call[request.addPostParam, parameter[literal["Status"], call[status.toString, parameter[]]]] 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[friendlyName] operator[!=] Other[null] operator[SEP] { identifier[request] operator[SEP] identifier[addPostParam] operator[SEP] literal[String] , identifier[friendlyName] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[status] operator[!=] Other[null] operator[SEP] { identifier[request] operator[SEP] identifier[addPostParam] operator[SEP] literal[String] , identifier[status] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public void addListener(SettingsEntityListener settingsEntityListener) { RunAsSystemAspect.runAsSystem( () -> entityListenersService.addEntityListener( entityTypeId, new EntityListener() { @Override public void postUpdate(Entity entity) { settingsEntityListener.postUpdate(entity); } @Override public Object getEntityId() { return getEntityType().getId(); } })); }
class class_name[name] begin[{] method[addListener, return_type[void], modifier[public], parameter[settingsEntityListener]] begin[{] call[RunAsSystemAspect.runAsSystem, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=entityTypeId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=postUpdate, postfix_operators=[], prefix_operators=[], qualifier=settingsEntityListener, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=postUpdate, parameters=[FormalParameter(annotations=[], modifiers=set(), name=entity, type=ReferenceType(arguments=None, dimensions=[], name=Entity, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getEntityType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=getEntityId, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Object, 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=EntityListener, sub_type=None))], member=addEntityListener, postfix_operators=[], prefix_operators=[], qualifier=entityListenersService, selectors=[], type_arguments=None), parameters=[])]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addListener] operator[SEP] identifier[SettingsEntityListener] identifier[settingsEntityListener] operator[SEP] { identifier[RunAsSystemAspect] operator[SEP] identifier[runAsSystem] operator[SEP] operator[SEP] operator[SEP] operator[->] identifier[entityListenersService] operator[SEP] identifier[addEntityListener] operator[SEP] identifier[entityTypeId] , Keyword[new] identifier[EntityListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[postUpdate] operator[SEP] identifier[Entity] identifier[entity] operator[SEP] { identifier[settingsEntityListener] operator[SEP] identifier[postUpdate] operator[SEP] identifier[entity] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[getEntityId] operator[SEP] operator[SEP] { Keyword[return] identifier[getEntityType] operator[SEP] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] operator[SEP] }
public static FastStr of(Iterable<Character> itr) { StringBuilder sb = new StringBuilder(); for (Character c : itr) { sb.append(c); } return of(sb); }
class class_name[name] begin[{] method[of, return_type[type[FastStr]], modifier[public static], parameter[itr]] begin[{] local_variable[type[StringBuilder], sb] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=itr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Character, sub_type=None))), label=None) return[call[.of, parameter[member[.sb]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[FastStr] identifier[of] operator[SEP] identifier[Iterable] operator[<] identifier[Character] operator[>] identifier[itr] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Character] identifier[c] operator[:] identifier[itr] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] } Keyword[return] identifier[of] operator[SEP] identifier[sb] operator[SEP] operator[SEP] }
public static void main(String[] args) { Thread.setDefaultUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler()); JStormServerUtils.startTaobaoJvmMonitor(); Supervisor instance = new Supervisor(); instance.run(); }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] call[Thread.setDefaultUncaughtExceptionHandler, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DefaultUncaughtExceptionHandler, sub_type=None))]] call[JStormServerUtils.startTaobaoJvmMonitor, parameter[]] local_variable[type[Supervisor], instance] call[instance.run, parameter[]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { identifier[Thread] operator[SEP] identifier[setDefaultUncaughtExceptionHandler] operator[SEP] Keyword[new] identifier[DefaultUncaughtExceptionHandler] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[JStormServerUtils] operator[SEP] identifier[startTaobaoJvmMonitor] operator[SEP] operator[SEP] operator[SEP] identifier[Supervisor] identifier[instance] operator[=] Keyword[new] identifier[Supervisor] operator[SEP] operator[SEP] operator[SEP] identifier[instance] operator[SEP] identifier[run] operator[SEP] operator[SEP] operator[SEP] }
protected String handleError(final String message, final Throwable cause) { notifier().error(formatMessage(message), cause); return formatMessage(message); }
class class_name[name] begin[{] method[handleError, return_type[type[String]], modifier[protected], parameter[message, cause]] begin[{] call[.notifier, parameter[]] return[call[.formatMessage, parameter[member[.message]]]] end[}] END[}]
Keyword[protected] identifier[String] identifier[handleError] operator[SEP] Keyword[final] identifier[String] identifier[message] , Keyword[final] identifier[Throwable] identifier[cause] operator[SEP] { identifier[notifier] operator[SEP] operator[SEP] operator[SEP] identifier[error] operator[SEP] identifier[formatMessage] operator[SEP] identifier[message] operator[SEP] , identifier[cause] operator[SEP] operator[SEP] Keyword[return] identifier[formatMessage] operator[SEP] identifier[message] operator[SEP] operator[SEP] }
private List<GroovyExpression> expandOrs(GroovyExpression expr, OptimizationContext context) { if (GremlinQueryOptimizer.isOrExpression(expr)) { return expandOrFunction(expr, context); } return processOtherExpression(expr, context); }
class class_name[name] begin[{] method[expandOrs, return_type[type[List]], modifier[private], parameter[expr, context]] begin[{] if[call[GremlinQueryOptimizer.isOrExpression, parameter[member[.expr]]]] begin[{] return[call[.expandOrFunction, parameter[member[.expr], member[.context]]]] else begin[{] None end[}] return[call[.processOtherExpression, parameter[member[.expr], member[.context]]]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[GroovyExpression] operator[>] identifier[expandOrs] operator[SEP] identifier[GroovyExpression] identifier[expr] , identifier[OptimizationContext] identifier[context] operator[SEP] { Keyword[if] operator[SEP] identifier[GremlinQueryOptimizer] operator[SEP] identifier[isOrExpression] operator[SEP] identifier[expr] operator[SEP] operator[SEP] { Keyword[return] identifier[expandOrFunction] operator[SEP] identifier[expr] , identifier[context] operator[SEP] operator[SEP] } Keyword[return] identifier[processOtherExpression] operator[SEP] identifier[expr] , identifier[context] operator[SEP] operator[SEP] }
protected CheckSchemaOperation createCheckSchemaOperation() { InputStream in = org.apache.jackrabbit.core.journal.DatabaseJournal.class.getResourceAsStream(databaseType + ".ddl"); return new CheckSchemaOperation(conHelper, in, schemaObjectPrefix + DEFAULT_JOURNAL_TABLE).addVariableReplacement( CheckSchemaOperation.SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix); }
class class_name[name] begin[{] method[createCheckSchemaOperation, return_type[type[CheckSchemaOperation]], modifier[protected], parameter[]] begin[{] local_variable[type[InputStream], in] return[ClassCreator(arguments=[MemberReference(member=conHelper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=schemaObjectPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DEFAULT_JOURNAL_TABLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=SCHEMA_OBJECT_PREFIX_VARIABLE, postfix_operators=[], prefix_operators=[], qualifier=CheckSchemaOperation, selectors=[]), MemberReference(member=schemaObjectPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addVariableReplacement, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=CheckSchemaOperation, sub_type=None))] end[}] END[}]
Keyword[protected] identifier[CheckSchemaOperation] identifier[createCheckSchemaOperation] operator[SEP] operator[SEP] { identifier[InputStream] identifier[in] operator[=] identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[jackrabbit] operator[SEP] identifier[core] operator[SEP] identifier[journal] operator[SEP] identifier[DatabaseJournal] operator[SEP] Keyword[class] operator[SEP] identifier[getResourceAsStream] operator[SEP] identifier[databaseType] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[CheckSchemaOperation] operator[SEP] identifier[conHelper] , identifier[in] , identifier[schemaObjectPrefix] operator[+] identifier[DEFAULT_JOURNAL_TABLE] operator[SEP] operator[SEP] identifier[addVariableReplacement] operator[SEP] identifier[CheckSchemaOperation] operator[SEP] identifier[SCHEMA_OBJECT_PREFIX_VARIABLE] , identifier[schemaObjectPrefix] operator[SEP] operator[SEP] }
public final EObject ruleRule() throws RecognitionException { EObject current = null; Token lv_fragment_0_0=null; Token lv_name_1_0=null; Token otherlv_2=null; Token otherlv_4=null; Token otherlv_6=null; Token otherlv_7=null; Token otherlv_9=null; EObject lv_parameters_3_0 = null; EObject lv_parameters_5_0 = null; EObject lv_body_8_0 = null; enterRule(); try { // InternalSimpleAntlr.g:329:28: ( ( ( (lv_fragment_0_0= 'fragment' ) )? ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= '[' ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* otherlv_6= ']' )? otherlv_7= ':' ( (lv_body_8_0= ruleAlternatives ) ) otherlv_9= ';' ) ) // InternalSimpleAntlr.g:330:1: ( ( (lv_fragment_0_0= 'fragment' ) )? ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= '[' ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* otherlv_6= ']' )? otherlv_7= ':' ( (lv_body_8_0= ruleAlternatives ) ) otherlv_9= ';' ) { // InternalSimpleAntlr.g:330:1: ( ( (lv_fragment_0_0= 'fragment' ) )? ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= '[' ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* otherlv_6= ']' )? otherlv_7= ':' ( (lv_body_8_0= ruleAlternatives ) ) otherlv_9= ';' ) // InternalSimpleAntlr.g:330:2: ( (lv_fragment_0_0= 'fragment' ) )? ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= '[' ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* otherlv_6= ']' )? otherlv_7= ':' ( (lv_body_8_0= ruleAlternatives ) ) otherlv_9= ';' { // InternalSimpleAntlr.g:330:2: ( (lv_fragment_0_0= 'fragment' ) )? int alt5=2; int LA5_0 = input.LA(1); if ( (LA5_0==19) ) { alt5=1; } switch (alt5) { case 1 : // InternalSimpleAntlr.g:331:1: (lv_fragment_0_0= 'fragment' ) { // InternalSimpleAntlr.g:331:1: (lv_fragment_0_0= 'fragment' ) // InternalSimpleAntlr.g:332:3: lv_fragment_0_0= 'fragment' { lv_fragment_0_0=(Token)match(input,19,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(lv_fragment_0_0, grammarAccess.getRuleAccess().getFragmentFragmentKeyword_0_0()); } if ( state.backtracking==0 ) { if (current==null) { current = createModelElement(grammarAccess.getRuleRule()); } setWithLastConsumed(current, "fragment", true, "fragment"); } } } break; } // InternalSimpleAntlr.g:345:3: ( (lv_name_1_0= RULE_ID ) ) // InternalSimpleAntlr.g:346:1: (lv_name_1_0= RULE_ID ) { // InternalSimpleAntlr.g:346:1: (lv_name_1_0= RULE_ID ) // InternalSimpleAntlr.g:347:3: lv_name_1_0= RULE_ID { lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_11); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(lv_name_1_0, grammarAccess.getRuleAccess().getNameIDTerminalRuleCall_1_0()); } if ( state.backtracking==0 ) { if (current==null) { current = createModelElement(grammarAccess.getRuleRule()); } setWithLastConsumed( current, "name", lv_name_1_0, "org.eclipse.xtext.generator.parser.antlr.debug.SimpleAntlr.ID"); } } } // InternalSimpleAntlr.g:363:2: (otherlv_2= '[' ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* otherlv_6= ']' )? int alt7=2; int LA7_0 = input.LA(1); if ( (LA7_0==20) ) { alt7=1; } switch (alt7) { case 1 : // InternalSimpleAntlr.g:363:4: otherlv_2= '[' ( (lv_parameters_3_0= ruleParameter ) ) (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* otherlv_6= ']' { otherlv_2=(Token)match(input,20,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_2, grammarAccess.getRuleAccess().getLeftSquareBracketKeyword_2_0()); } // InternalSimpleAntlr.g:367:1: ( (lv_parameters_3_0= ruleParameter ) ) // InternalSimpleAntlr.g:368:1: (lv_parameters_3_0= ruleParameter ) { // InternalSimpleAntlr.g:368:1: (lv_parameters_3_0= ruleParameter ) // InternalSimpleAntlr.g:369:3: lv_parameters_3_0= ruleParameter { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getRuleAccess().getParametersParameterParserRuleCall_2_1_0()); } pushFollow(FOLLOW_12); lv_parameters_3_0=ruleParameter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getRuleRule()); } add( current, "parameters", lv_parameters_3_0, "org.eclipse.xtext.generator.parser.antlr.debug.SimpleAntlr.Parameter"); afterParserOrEnumRuleCall(); } } } // InternalSimpleAntlr.g:385:2: (otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) )* loop6: do { int alt6=2; int LA6_0 = input.LA(1); if ( (LA6_0==21) ) { alt6=1; } switch (alt6) { case 1 : // InternalSimpleAntlr.g:385:4: otherlv_4= ',' ( (lv_parameters_5_0= ruleParameter ) ) { otherlv_4=(Token)match(input,21,FOLLOW_3); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_4, grammarAccess.getRuleAccess().getCommaKeyword_2_2_0()); } // InternalSimpleAntlr.g:389:1: ( (lv_parameters_5_0= ruleParameter ) ) // InternalSimpleAntlr.g:390:1: (lv_parameters_5_0= ruleParameter ) { // InternalSimpleAntlr.g:390:1: (lv_parameters_5_0= ruleParameter ) // InternalSimpleAntlr.g:391:3: lv_parameters_5_0= ruleParameter { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getRuleAccess().getParametersParameterParserRuleCall_2_2_1_0()); } pushFollow(FOLLOW_12); lv_parameters_5_0=ruleParameter(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getRuleRule()); } add( current, "parameters", lv_parameters_5_0, "org.eclipse.xtext.generator.parser.antlr.debug.SimpleAntlr.Parameter"); afterParserOrEnumRuleCall(); } } } } break; default : break loop6; } } while (true); otherlv_6=(Token)match(input,22,FOLLOW_13); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_6, grammarAccess.getRuleAccess().getRightSquareBracketKeyword_2_3()); } } break; } otherlv_7=(Token)match(input,23,FOLLOW_14); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_7, grammarAccess.getRuleAccess().getColonKeyword_3()); } // InternalSimpleAntlr.g:415:1: ( (lv_body_8_0= ruleAlternatives ) ) // InternalSimpleAntlr.g:416:1: (lv_body_8_0= ruleAlternatives ) { // InternalSimpleAntlr.g:416:1: (lv_body_8_0= ruleAlternatives ) // InternalSimpleAntlr.g:417:3: lv_body_8_0= ruleAlternatives { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getRuleAccess().getBodyAlternativesParserRuleCall_4_0()); } pushFollow(FOLLOW_4); lv_body_8_0=ruleAlternatives(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getRuleRule()); } set( current, "body", lv_body_8_0, "org.eclipse.xtext.generator.parser.antlr.debug.SimpleAntlr.Alternatives"); afterParserOrEnumRuleCall(); } } } otherlv_9=(Token)match(input,14,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_9, grammarAccess.getRuleAccess().getSemicolonKeyword_5()); } } } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[ruleRule, return_type[type[EObject]], modifier[final public], parameter[]] begin[{] local_variable[type[EObject], current] local_variable[type[Token], lv_fragment_0_0] local_variable[type[Token], lv_name_1_0] local_variable[type[Token], otherlv_2] local_variable[type[Token], otherlv_4] local_variable[type[Token], otherlv_6] local_variable[type[Token], otherlv_7] local_variable[type[Token], otherlv_9] local_variable[type[EObject], lv_parameters_3_0] local_variable[type[EObject], lv_parameters_5_0] local_variable[type[EObject], lv_body_8_0] call[.enterRule, parameter[]] TryStatement(block=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt5)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA5_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA5_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=19), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_fragment_0_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=19), MemberReference(member=FOLLOW_3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lv_fragment_0_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getRuleAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getFragmentFragmentKeyword_0_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRuleRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="fragment"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="fragment")], member=setWithLastConsumed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_name_1_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=RULE_ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_11, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lv_name_1_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getRuleAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getNameIDTerminalRuleCall_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRuleRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="name"), MemberReference(member=lv_name_1_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtext.generator.parser.antlr.debug.SimpleAntlr.ID")], member=setWithLastConsumed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])]), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt7)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA7_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA7_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=20), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt7, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherlv_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=20), MemberReference(member=FOLLOW_3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=otherlv_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getRuleAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getLeftSquareBracketKeyword_2_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRuleAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getParametersParameterParserRuleCall_2_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_12, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_parameters_3_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleParameter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRuleRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElementForParent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="parameters"), MemberReference(member=lv_parameters_3_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtext.generator.parser.antlr.debug.SimpleAntlr.Parameter")], member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])]), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt6)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA6_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA6_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=21), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherlv_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=21), MemberReference(member=FOLLOW_3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=otherlv_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getRuleAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getCommaKeyword_2_2_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRuleAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getParametersParameterParserRuleCall_2_2_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_12, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_parameters_5_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleParameter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRuleRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElementForParent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="parameters"), MemberReference(member=lv_parameters_5_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtext.generator.parser.antlr.debug.SimpleAntlr.Parameter")], member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])])]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=loop6, label=None)])], expression=MemberReference(member=alt6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop6), StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherlv_6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=22), MemberReference(member=FOLLOW_13, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=otherlv_6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getRuleAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getRightSquareBracketKeyword_2_3, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt7, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherlv_7, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=23), MemberReference(member=FOLLOW_14, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=otherlv_7, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getRuleAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getColonKeyword_3, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRuleAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getBodyAlternativesParserRuleCall_4_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_body_8_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleAlternatives, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRuleRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElementForParent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="body"), MemberReference(member=lv_body_8_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtext.generator.parser.antlr.debug.SimpleAntlr.Alternatives")], member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])]), StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherlv_9, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=14), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=otherlv_9, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getRuleAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getSemicolonKeyword_5, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])]), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=leaveRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=appendSkippedTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.current]] end[}] END[}]
Keyword[public] Keyword[final] identifier[EObject] identifier[ruleRule] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[Token] identifier[lv_fragment_0_0] operator[=] Other[null] operator[SEP] identifier[Token] identifier[lv_name_1_0] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_2] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_4] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_6] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_7] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_9] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[lv_parameters_3_0] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[lv_parameters_5_0] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[lv_body_8_0] operator[=] Other[null] operator[SEP] identifier[enterRule] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { { { Keyword[int] identifier[alt5] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA5_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA5_0] operator[==] Other[19] operator[SEP] operator[SEP] { identifier[alt5] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt5] operator[SEP] { Keyword[case] Other[1] operator[:] { { identifier[lv_fragment_0_0] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[19] , identifier[FOLLOW_3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[lv_fragment_0_0] , identifier[grammarAccess] operator[SEP] identifier[getRuleAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getFragmentFragmentKeyword_0_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElement] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getRuleRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[setWithLastConsumed] operator[SEP] identifier[current] , literal[String] , literal[boolean] , literal[String] operator[SEP] operator[SEP] } } } Keyword[break] operator[SEP] } { { identifier[lv_name_1_0] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , identifier[RULE_ID] , identifier[FOLLOW_11] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[lv_name_1_0] , identifier[grammarAccess] operator[SEP] identifier[getRuleAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getNameIDTerminalRuleCall_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElement] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getRuleRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[setWithLastConsumed] operator[SEP] identifier[current] , literal[String] , identifier[lv_name_1_0] , literal[String] operator[SEP] operator[SEP] } } } Keyword[int] identifier[alt7] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA7_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA7_0] operator[==] Other[20] operator[SEP] operator[SEP] { identifier[alt7] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt7] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[otherlv_2] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[20] , identifier[FOLLOW_3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[otherlv_2] , identifier[grammarAccess] operator[SEP] identifier[getRuleAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getLeftSquareBracketKeyword_2_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getRuleAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getParametersParameterParserRuleCall_2_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_12] operator[SEP] operator[SEP] identifier[lv_parameters_3_0] operator[=] identifier[ruleParameter] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElementForParent] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getRuleRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[add] operator[SEP] identifier[current] , literal[String] , identifier[lv_parameters_3_0] , literal[String] operator[SEP] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } identifier[loop6] operator[:] Keyword[do] { Keyword[int] identifier[alt6] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA6_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA6_0] operator[==] Other[21] operator[SEP] operator[SEP] { identifier[alt6] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt6] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[otherlv_4] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[21] , identifier[FOLLOW_3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[otherlv_4] , identifier[grammarAccess] operator[SEP] identifier[getRuleAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getCommaKeyword_2_2_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getRuleAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getParametersParameterParserRuleCall_2_2_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_12] operator[SEP] operator[SEP] identifier[lv_parameters_5_0] operator[=] identifier[ruleParameter] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElementForParent] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getRuleRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[add] operator[SEP] identifier[current] , literal[String] , identifier[lv_parameters_5_0] , literal[String] operator[SEP] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[loop6] operator[SEP] } } Keyword[while] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[otherlv_6] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[22] , identifier[FOLLOW_13] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[otherlv_6] , identifier[grammarAccess] operator[SEP] identifier[getRuleAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getRightSquareBracketKeyword_2_3] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] } identifier[otherlv_7] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[23] , identifier[FOLLOW_14] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[otherlv_7] , identifier[grammarAccess] operator[SEP] identifier[getRuleAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getColonKeyword_3] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getRuleAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getBodyAlternativesParserRuleCall_4_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_4] operator[SEP] operator[SEP] identifier[lv_body_8_0] operator[=] identifier[ruleAlternatives] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElementForParent] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getRuleRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[set] operator[SEP] identifier[current] , literal[String] , identifier[lv_body_8_0] , literal[String] operator[SEP] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } identifier[otherlv_9] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[14] , identifier[FOLLOW_2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[otherlv_9] , identifier[grammarAccess] operator[SEP] identifier[getRuleAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getSemicolonKeyword_5] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[leaveRule] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[appendSkippedTokens] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[current] operator[SEP] }
protected static void readAndSave(@Nonnull final File file, @Nonnull final DataStore store) throws IOException { Check.notNull(file, "file"); Check.notNull(store, "store"); final URL url = store.getDataUrl(); final Charset charset = store.getCharset(); final boolean isEqual = url.toExternalForm().equals(UrlUtil.toUrl(file).toExternalForm()); if (!isEqual) { // check if the data can be read in successfully final String data = UrlUtil.read(url, charset); if (Data.EMPTY.equals(store.getDataReader().read(data))) { throw new IllegalStateException("The read in content can not be transformed to an instance of 'Data'."); } final File tempFile = createTemporaryFile(file); FileOutputStream outputStream = null; boolean threw = true; try { // write data to temporary file outputStream = new FileOutputStream(tempFile); outputStream.write(data.getBytes(charset)); // delete the original file deleteFile(file); threw = false; } finally { Closeables.close(outputStream, threw); } // rename the new file to the original one renameFile(tempFile, file); } else { LOG.debug(MSG_SAME_RESOURCES); } }
class class_name[name] begin[{] method[readAndSave, return_type[void], modifier[static protected], parameter[file, store]] begin[{] call[Check.notNull, parameter[member[.file], literal["file"]]] call[Check.notNull, parameter[member[.store], literal["store"]]] local_variable[type[URL], url] local_variable[type[Charset], charset] local_variable[type[boolean], isEqual] if[member[.isEqual]] begin[{] local_variable[type[String], data] if[call[Data.EMPTY.equals, parameter[call[store.getDataReader, parameter[]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The read in content can not be transformed to an instance of 'Data'.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[File], tempFile] local_variable[type[FileOutputStream], outputStream] local_variable[type[boolean], threw] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=tempFile, 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))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=charset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None)], member=write, postfix_operators=[], prefix_operators=[], qualifier=outputStream, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deleteFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=threw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=outputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=threw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=close, postfix_operators=[], prefix_operators=[], qualifier=Closeables, selectors=[], type_arguments=None), label=None)], label=None, resources=None) call[.renameFile, parameter[member[.tempFile], member[.file]]] else begin[{] call[LOG.debug, parameter[member[.MSG_SAME_RESOURCES]]] end[}] end[}] END[}]
Keyword[protected] Keyword[static] Keyword[void] identifier[readAndSave] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[File] identifier[file] , annotation[@] identifier[Nonnull] Keyword[final] identifier[DataStore] identifier[store] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Check] operator[SEP] identifier[notNull] operator[SEP] identifier[file] , literal[String] operator[SEP] operator[SEP] identifier[Check] operator[SEP] identifier[notNull] operator[SEP] identifier[store] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[URL] identifier[url] operator[=] identifier[store] operator[SEP] identifier[getDataUrl] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Charset] identifier[charset] operator[=] identifier[store] operator[SEP] identifier[getCharset] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[isEqual] operator[=] identifier[url] operator[SEP] identifier[toExternalForm] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[UrlUtil] operator[SEP] identifier[toUrl] operator[SEP] identifier[file] operator[SEP] operator[SEP] identifier[toExternalForm] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isEqual] operator[SEP] { Keyword[final] identifier[String] identifier[data] operator[=] identifier[UrlUtil] operator[SEP] identifier[read] operator[SEP] identifier[url] , identifier[charset] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Data] operator[SEP] identifier[EMPTY] operator[SEP] identifier[equals] operator[SEP] identifier[store] operator[SEP] identifier[getDataReader] operator[SEP] operator[SEP] operator[SEP] identifier[read] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[final] identifier[File] identifier[tempFile] operator[=] identifier[createTemporaryFile] operator[SEP] identifier[file] operator[SEP] operator[SEP] identifier[FileOutputStream] identifier[outputStream] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[threw] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[outputStream] operator[=] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[tempFile] operator[SEP] operator[SEP] identifier[outputStream] operator[SEP] identifier[write] operator[SEP] identifier[data] operator[SEP] identifier[getBytes] operator[SEP] identifier[charset] operator[SEP] operator[SEP] operator[SEP] identifier[deleteFile] operator[SEP] identifier[file] operator[SEP] operator[SEP] identifier[threw] operator[=] literal[boolean] operator[SEP] } Keyword[finally] { identifier[Closeables] operator[SEP] identifier[close] operator[SEP] identifier[outputStream] , identifier[threw] operator[SEP] operator[SEP] } identifier[renameFile] operator[SEP] identifier[tempFile] , identifier[file] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] identifier[MSG_SAME_RESOURCES] operator[SEP] operator[SEP] } }