From b94873b9bfab5eb316d6f1a9cab0f93bc0fb1f7d Mon Sep 17 00:00:00 2001 From: Rahul Krishna Date: Mon, 21 Oct 2024 17:41:29 -0400 Subject: [PATCH 1/3] slim json Signed-off-by: Rahul Krishna --- build.gradle | 2 +- gradle.properties | 2 +- src/main/java/com/ibm/cldk/SystemDependencyGraph.java | 7 ++++--- src/main/java/com/ibm/cldk/entities/Callable.java | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index f4d86d4..814beac 100644 --- a/build.gradle +++ b/build.gradle @@ -78,7 +78,7 @@ dependencies { implementation 'org.apache.logging.log4j:log4j-api:2.18.0' implementation 'org.apache.logging.log4j:log4j-core:2.18.0' - def walaVersion = '1.6.6' + def walaVersion = '1.6.7' compileOnly 'org.projectlombok:lombok:1.18.30' annotationProcessor 'org.projectlombok:lombok:1.18.30' diff --git a/gradle.properties b/gradle.properties index 3cef896..166aa4a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -version=1.0.1 \ No newline at end of file +version=1.1.0 \ No newline at end of file diff --git a/src/main/java/com/ibm/cldk/SystemDependencyGraph.java b/src/main/java/com/ibm/cldk/SystemDependencyGraph.java index 950c3c6..3da1612 100644 --- a/src/main/java/com/ibm/cldk/SystemDependencyGraph.java +++ b/src/main/java/com/ibm/cldk/SystemDependencyGraph.java @@ -71,12 +71,13 @@ private static JSONExporter, AbstractGraphEdge> getGraphE JSONExporter, AbstractGraphEdge> exporter = new JSONExporter<>( pair -> { Map vertex = new HashMap<>(); - vertex.put("class_interface_declarations", pair.getLeft()); - vertex.put("callable", gson.toJson(pair.getRight())); + vertex.put("type_declaration", pair.getLeft()); + vertex.put("file_path", pair.getRight().getFilePath()); + vertex.put("signature", pair.getRight().getSignature()); + vertex.put("callable_declaration", pair.getRight().getDeclaration()); return gson.toJson(vertex); } ); -// exporter.setVertexAttributeProvider(v -> v.getRight().getAttributes()); exporter.setEdgeAttributeProvider(AbstractGraphEdge::getAttributes); return exporter; } diff --git a/src/main/java/com/ibm/cldk/entities/Callable.java b/src/main/java/com/ibm/cldk/entities/Callable.java index 214cb4e..ba481a2 100644 --- a/src/main/java/com/ibm/cldk/entities/Callable.java +++ b/src/main/java/com/ibm/cldk/entities/Callable.java @@ -6,6 +6,7 @@ @Data public class Callable { + private String filePath; private String signature; private String comment; private List annotations; From 98f9d3963eeeca1317a0a3a750687f31557f54f0 Mon Sep 17 00:00:00 2001 From: Rahul Krishna Date: Thu, 24 Oct 2024 12:46:09 -0400 Subject: [PATCH 2/3] slim json Signed-off-by: Rahul Krishna --- src/main/java/com/ibm/cldk/CodeAnalyzer.java | 13 +- src/main/java/com/ibm/cldk/SymbolTable.java | 7 +- .../com/ibm/cldk/SystemDependencyGraph.java | 149 +++++++++++------- .../ibm/cldk/entities/AbstractGraphEdge.java | 40 ++--- .../cldk/entities/AbstractGraphVertex.java | 22 +++ .../java/com/ibm/cldk/entities/CallEdge.java | 7 + .../com/ibm/cldk/entities/CallableVertex.java | 43 +++++ .../com/ibm/cldk/entities/SystemDepEdge.java | 9 ++ .../com/ibm/cldk/utils/AnalysisUtils.java | 43 ++++- .../java/com/ibm/cldk/CodeAnalyzerTest.java | 38 ++++- src/test/resources/reference_analysis.json | 1 + 11 files changed, 276 insertions(+), 96 deletions(-) create mode 100644 src/main/java/com/ibm/cldk/entities/AbstractGraphVertex.java create mode 100644 src/main/java/com/ibm/cldk/entities/CallableVertex.java create mode 100644 src/test/resources/reference_analysis.json diff --git a/src/main/java/com/ibm/cldk/CodeAnalyzer.java b/src/main/java/com/ibm/cldk/CodeAnalyzer.java index 0b9dd71..8cdca67 100644 --- a/src/main/java/com/ibm/cldk/CodeAnalyzer.java +++ b/src/main/java/com/ibm/cldk/CodeAnalyzer.java @@ -174,17 +174,8 @@ private static void analyze() throws Exception { build = build == null ? "auto" : build; // Is noBuild is true, we will not build the project build = noBuild ? null : build; - String sdgAsJSONString = SystemDependencyGraph.construct(input, dependencies, build); - JsonElement sdgAsJSONElement = gson.fromJson(sdgAsJSONString, JsonElement.class); - JsonObject sdgAsJSONObject = sdgAsJSONElement.getAsJsonObject(); - JsonElement edges = sdgAsJSONObject.get("edges"); - - // We don't really need these fields, so we'll remove it. - sdgAsJSONObject.remove("nodes"); - sdgAsJSONObject.remove("creator"); - sdgAsJSONObject.remove("version"); - // Remove the 'edges' element and move the list of edges up one level - combinedJsonObject.add("system_dependency_graph", edges); + List sdgEdges = SystemDependencyGraph.construct(input, dependencies, build); + combinedJsonObject.add("system_dependency_graph", gson.toJsonTree(sdgEdges)); } } // Cleanup library dependencies directory diff --git a/src/main/java/com/ibm/cldk/SymbolTable.java b/src/main/java/com/ibm/cldk/SymbolTable.java index 7abe086..584133f 100644 --- a/src/main/java/com/ibm/cldk/SymbolTable.java +++ b/src/main/java/com/ibm/cldk/SymbolTable.java @@ -194,7 +194,7 @@ private static JavaCompilationUnit processCompilationUnit(CompilationUnit parseR typeNode.setCallableDeclarations(typeDecl.findAll(CallableDeclaration.class).stream() .filter(c -> c.getParentNode().isPresent() && c.getParentNode().get() == typeDecl) .map(meth -> { - Pair callableDeclaration = processCallableDeclaration(meth, fieldNames, typeName); + Pair callableDeclaration = processCallableDeclaration(meth, fieldNames, typeName, parseResult.getStorage().map(s -> s.getPath().toString()).orElse("")); declaredMethodsAndConstructors.put(typeName, callableDeclaration.getLeft(), callableDeclaration.getRight()); return callableDeclaration; }).collect(Collectors.toMap(p -> p.getLeft(), p -> p.getRight()))); @@ -249,9 +249,12 @@ private static ParameterInCallable processParameterDeclaration(Parameter paramDe */ @SuppressWarnings("unchecked") private static Pair processCallableDeclaration(CallableDeclaration callableDecl, - List classFields, String typeName) { + List classFields, String typeName, String filePath) { Callable callableNode = new Callable(); + // Set file path + callableNode.setFilePath(filePath); + // add callable signature callableNode.setSignature(callableDecl.getSignature().asString()); diff --git a/src/main/java/com/ibm/cldk/SystemDependencyGraph.java b/src/main/java/com/ibm/cldk/SystemDependencyGraph.java index 3da1612..4ea8b30 100644 --- a/src/main/java/com/ibm/cldk/SystemDependencyGraph.java +++ b/src/main/java/com/ibm/cldk/SystemDependencyGraph.java @@ -15,7 +15,7 @@ import com.ibm.cldk.entities.AbstractGraphEdge; import com.ibm.cldk.entities.CallEdge; -import com.ibm.cldk.entities.Callable; +import com.ibm.cldk.entities.CallableVertex; import com.ibm.cldk.entities.SystemDepEdge; import com.ibm.cldk.utils.AnalysisUtils; import com.ibm.cldk.utils.Log; @@ -40,20 +40,60 @@ import com.ibm.wala.util.graph.Graph; import com.ibm.wala.util.graph.GraphSlicer; import com.ibm.wala.util.graph.traverse.DFS; +import lombok.Data; +import lombok.EqualsAndHashCode; import org.apache.commons.io.output.NullOutputStream; -import org.apache.commons.lang3.tuple.Pair; import org.jgrapht.graph.DefaultDirectedGraph; import org.jgrapht.nio.json.JSONExporter; import java.io.IOException; import java.io.PrintStream; -import java.io.StringWriter; import java.util.*; import java.util.function.BiFunction; import java.util.function.Supplier; - -import static com.ibm.cldk.CodeAnalyzer.gson; -import static com.ibm.cldk.utils.AnalysisUtils.*; +import java.util.stream.Collectors; + +import static com.ibm.cldk.utils.AnalysisUtils.createAndPutNewCallableInSymbolTable; +import static com.ibm.cldk.utils.AnalysisUtils.getCallableFromSymbolTable; + + +@Data +abstract class Dependency { + public CallableVertex source; + public CallableVertex target; +} + +@Data +@EqualsAndHashCode(callSuper = true) +class SDGDependency extends Dependency { + public String sourceKind; + public String destinationKind; + public String type; + public String weight; + + public SDGDependency(CallableVertex source, CallableVertex target, SystemDepEdge edge) { + super.source = source; + super.target = target; + this.sourceKind = edge.getSourceKind(); + this.destinationKind = edge.getDestinationKind(); + this.type = edge.getType(); + this.weight = String.valueOf(edge.getWeight()); + } +} + +@Data +@EqualsAndHashCode(callSuper = true) +class CallDependency extends Dependency { + public String type; + public String weight; + + public CallDependency(CallableVertex source, CallableVertex target, AbstractGraphEdge edge) { + this.source = source; + this.target = target; + this.type = edge.toString(); + this.weight = String.valueOf(edge.getWeight()); + } +} /** * The type Sdg 2 json. @@ -66,19 +106,10 @@ public class SystemDependencyGraph { * @return the graph exporter */ - - private static JSONExporter, AbstractGraphEdge> getGraphExporter() { - JSONExporter, AbstractGraphEdge> exporter = new JSONExporter<>( - pair -> { - Map vertex = new HashMap<>(); - vertex.put("type_declaration", pair.getLeft()); - vertex.put("file_path", pair.getRight().getFilePath()); - vertex.put("signature", pair.getRight().getSignature()); - vertex.put("callable_declaration", pair.getRight().getDeclaration()); - return gson.toJson(vertex); - } - ); + private static JSONExporter getGraphExporter() { + JSONExporter exporter = new JSONExporter<>(); exporter.setEdgeAttributeProvider(AbstractGraphEdge::getAttributes); + exporter.setVertexAttributeProvider(CallableVertex::getAttributes); return exporter; } @@ -91,12 +122,12 @@ private static JSONExporter, AbstractGraphEdge> getGraphE * @param edgeLabels * @return */ - private static org.jgrapht.Graph, AbstractGraphEdge> buildGraph( + private static org.jgrapht.Graph buildGraph( Supplier> entryPoints, Graph sdg, CallGraph callGraph, BiFunction edgeLabels) { - org.jgrapht.Graph, AbstractGraphEdge> graph = new DefaultDirectedGraph<>( + org.jgrapht.Graph graph = new DefaultDirectedGraph<>( AbstractGraphEdge.class); // We'll use forward and backward search on the DFS to identify which CFG nodes @@ -131,21 +162,22 @@ private static org.jgrapht.Graph, AbstractGraphEdge> buil && !p.getNode().getMethod().equals(s.getNode().getMethod())) { // Add the source nodes to the graph as vertices - Pair source = Optional.ofNullable(getCallableFromSymbolTable(p.getNode().getMethod())).orElseGet(() -> createAndPutNewCallableInSymbolTable(p.getNode().getMethod())); - graph.addVertex(source); - + Map source = Optional.ofNullable(getCallableFromSymbolTable(p.getNode().getMethod())).orElseGet(() -> createAndPutNewCallableInSymbolTable(p.getNode().getMethod())); // Add the target nodes to the graph as vertices - Pair target = Optional.ofNullable(getCallableFromSymbolTable(s.getNode().getMethod())).orElseGet(() -> createAndPutNewCallableInSymbolTable(s.getNode().getMethod())); - graph.addVertex(target); - - String edgeType = edgeLabels.apply(p, s); - SystemDepEdge graphEdge = new SystemDepEdge(p, s, edgeType); - SystemDepEdge cgEdge = (SystemDepEdge) graph.getEdge(source, target); - if (source.getRight() != null && target.getRight() != null) { + Map target = Optional.ofNullable(getCallableFromSymbolTable(s.getNode().getMethod())).orElseGet(() -> createAndPutNewCallableInSymbolTable(s.getNode().getMethod())); + + if (source != null && target != null) { + CallableVertex source_vertex = new CallableVertex(source); + CallableVertex target_vertex = new CallableVertex(target); + graph.addVertex(source_vertex); + graph.addVertex(target_vertex); + String edgeType = edgeLabels.apply(p, s); + SystemDepEdge graphEdge = new SystemDepEdge(p, s, edgeType); + SystemDepEdge cgEdge = (SystemDepEdge) graph.getEdge(source_vertex, target_vertex); if (cgEdge == null || !cgEdge.equals(graphEdge)) { graph.addEdge( - source, - target, + source_vertex, + target_vertex, graphEdge); } else { graphEdge.incrementWeight(); @@ -164,21 +196,22 @@ private static org.jgrapht.Graph, AbstractGraphEdge> buil .forEach(o -> { // Add the source nodes to the graph as vertices - Pair source = Optional.ofNullable(getCallableFromSymbolTable(p.getMethod())).orElseGet(() -> createAndPutNewCallableInSymbolTable(p.getMethod())); - graph.addVertex(source); + Map source = Optional.ofNullable(getCallableFromSymbolTable(p.getMethod())).orElseGet(() -> createAndPutNewCallableInSymbolTable(p.getMethod())); + CallableVertex source_vertex = new CallableVertex(source); // Add the target nodes to the graph as vertices - Pair target = Optional.ofNullable(getCallableFromSymbolTable(o.getMethod())).orElseGet(() -> createAndPutNewCallableInSymbolTable(o.getMethod())); - graph.addVertex(target); - - if (!source.equals(target) && source.getRight() != null && target.getRight() != null) { + Map target = Optional.ofNullable(getCallableFromSymbolTable(o.getMethod())).orElseGet(() -> createAndPutNewCallableInSymbolTable(o.getMethod())); + CallableVertex target_vertex = new CallableVertex(target); + if (!source.equals(target) && target != null) { // Get the edge between the source and the target - AbstractGraphEdge cgEdge = graph.getEdge(source, target); + graph.addVertex(source_vertex); + graph.addVertex(target_vertex); + AbstractGraphEdge cgEdge = graph.getEdge(source_vertex, target_vertex); if (cgEdge instanceof CallEdge) { ((CallEdge) cgEdge).incrementWeight(); } else { - graph.addEdge(source, target, new CallEdge()); + graph.addEdge(source_vertex, target_vertex, new CallEdge()); } } }); @@ -193,7 +226,7 @@ private static org.jgrapht.Graph, AbstractGraphEdge> buil * * @param input the input * @param dependencies the dependencies - * @param build The build options + * @param build The build options * @return A List of triples containing the source, destination, and edge type * @throws IOException the io exception * @throws ClassHierarchyException the class hierarchy exception @@ -201,7 +234,7 @@ private static org.jgrapht.Graph, AbstractGraphEdge> buil * @throws CallGraphBuilderCancelException the call graph builder cancel * exception */ - public static String construct( + public static List construct( String input, String dependencies, String build) throws IOException, ClassHierarchyException, IllegalArgumentException, CallGraphBuilderCancelException { @@ -244,12 +277,7 @@ public static String construct( + Math.ceil((double) (System.currentTimeMillis() - start_time) / 1000) + " seconds."); // set cyclomatic complexity for callables in the symbol table - callGraph.forEach(cgNode -> { - Callable callable = getCallableFromSymbolTable(cgNode.getMethod()).getRight(); - if (callable != null) { - callable.setCyclomaticComplexity(getCyclomaticComplexity(cgNode.getIR())); - } - }); + AnalysisUtils.setCyclomaticComplexity(callGraph); // Build SDG graph Log.info("Building System Dependency Graph."); @@ -267,22 +295,31 @@ public static String construct( .getDeclaringClass() .getClassLoader() .getReference() - .equals(ClassLoaderReference.Application))); + .equals(ClassLoaderReference.Application)) + ); // A supplier to get entries Supplier> sdgEntryPointsSupplier = () -> callGraph.getEntrypointNodes().stream() .map(n -> (Statement) new MethodEntryStatement(n)).iterator(); - org.jgrapht.Graph, AbstractGraphEdge> sdgGraph = buildGraph( + org.jgrapht.Graph sdgGraph = buildGraph( sdgEntryPointsSupplier, prunedGraph, callGraph, - (p, s) -> String.valueOf(sdg.getEdgeLabels(p, s).iterator().next())); - - JSONExporter, AbstractGraphEdge> graphExporter = getGraphExporter(); + (p, s) -> String.valueOf(sdg.getEdgeLabels(p, s).iterator().next()) + ); - StringWriter sdgWriter = new StringWriter(); - graphExporter.exportGraph(sdgGraph, sdgWriter); + List edges = sdgGraph.edgeSet().stream() + .map(abstractGraphEdge -> { + CallableVertex source = sdgGraph.getEdgeSource(abstractGraphEdge); + CallableVertex target = sdgGraph.getEdgeTarget(abstractGraphEdge); + if (abstractGraphEdge instanceof CallEdge) { + return new CallDependency(source, target, abstractGraphEdge); + } else { + return new SDGDependency(source, target, (SystemDepEdge) abstractGraphEdge); + } + }) + .collect(Collectors.toList()); - return sdgWriter.toString(); + return edges; } } \ No newline at end of file diff --git a/src/main/java/com/ibm/cldk/entities/AbstractGraphEdge.java b/src/main/java/com/ibm/cldk/entities/AbstractGraphEdge.java index eb60429..f7a68e6 100644 --- a/src/main/java/com/ibm/cldk/entities/AbstractGraphEdge.java +++ b/src/main/java/com/ibm/cldk/entities/AbstractGraphEdge.java @@ -18,21 +18,34 @@ import com.ibm.wala.shrike.shrikeCT.InvalidClassFileException; import com.ibm.wala.ssa.IR; import com.ibm.wala.ssa.SSAInstruction; +import lombok.Getter; import org.jgrapht.nio.Attribute; - import java.io.Serializable; import java.util.Map; +import static com.ibm.cldk.CodeAnalyzer.gson; + /** * The type Abstract graph edge. */ +@Getter public abstract class AbstractGraphEdge implements Serializable { /** * The Context. + * -- GETTER -- + * Gets context. + * + * @return the context + */ public final String context; /** * The Weight. + * -- GETTER -- + * Gets weight. + * + * @return the weight + */ public Integer weight = 1; @@ -59,15 +72,6 @@ public void incrementWeight() { this.weight += 1; } - /** - * Gets context. - * - * @return the context - */ - public String getContext() { - return this.context; - } - /** * Gets id. * @@ -77,15 +81,6 @@ public Integer getId() { return this.hashCode(); } - /** - * Gets weight. - * - * @return the weight - */ - public Integer getWeight() { - return this.weight; - } - /** * Gets statement position. * @@ -112,10 +107,17 @@ Integer getStatementPosition(Statement statement) { return pos; } + @Override + public String toString() { + return gson.toJson(this); + } + /** * Gets attributes. * * @return the attributes */ public abstract Map getAttributes(); + + public abstract Map getAttributesMap(); } diff --git a/src/main/java/com/ibm/cldk/entities/AbstractGraphVertex.java b/src/main/java/com/ibm/cldk/entities/AbstractGraphVertex.java new file mode 100644 index 0000000..d112c34 --- /dev/null +++ b/src/main/java/com/ibm/cldk/entities/AbstractGraphVertex.java @@ -0,0 +1,22 @@ +package com.ibm.cldk.entities; + +import org.jgrapht.nio.Attribute; + +import java.io.Serializable; +import java.util.Map; + + +public abstract class AbstractGraphVertex implements Serializable { + + public abstract Map getAttributes(); + + @Override + public boolean equals(Object obj) { + return super.equals(obj); + } + + @Override + public int hashCode() { + return super.hashCode(); + } +} diff --git a/src/main/java/com/ibm/cldk/entities/CallEdge.java b/src/main/java/com/ibm/cldk/entities/CallEdge.java index ebd63e3..f47f699 100644 --- a/src/main/java/com/ibm/cldk/entities/CallEdge.java +++ b/src/main/java/com/ibm/cldk/entities/CallEdge.java @@ -66,4 +66,11 @@ public Map getAttributes() { map.put("weight", DefaultAttribute.createAttribute(String.valueOf(getWeight()))); return map; } + + public Map getAttributesMap() { + Map map = new LinkedHashMap<>(); + map.put("type", toString()); + map.put("weight", String.valueOf(getWeight())); + return map; + } } \ No newline at end of file diff --git a/src/main/java/com/ibm/cldk/entities/CallableVertex.java b/src/main/java/com/ibm/cldk/entities/CallableVertex.java new file mode 100644 index 0000000..29e30ce --- /dev/null +++ b/src/main/java/com/ibm/cldk/entities/CallableVertex.java @@ -0,0 +1,43 @@ +package com.ibm.cldk.entities; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.jgrapht.nio.Attribute; +import org.jgrapht.nio.DefaultAttribute; + +import java.util.Map; + +import static com.ibm.cldk.CodeAnalyzer.gson; + +@Data +@EqualsAndHashCode(callSuper = true) +public class CallableVertex extends AbstractGraphVertex { + private String filePath; + private String typeDeclaration; + private String signature; + private String callableDeclaration; + + public CallableVertex(Map callable) { + this.filePath = callable.get("filePath"); + this.typeDeclaration = callable.get("typeDeclaration"); + this.signature = callable.get("signature"); + this.callableDeclaration = callable.get("callableDeclaration"); + } + + @Override + public String toString() { + return gson.toJson(this); + } + + @Override + public Map getAttributes() { + return Map.ofEntries( + Map.entry("filePath", DefaultAttribute.createAttribute(getFilePath())), + Map.entry("typeDeclaration", DefaultAttribute.createAttribute(getTypeDeclaration())), + Map.entry("signature", DefaultAttribute.createAttribute(getSignature())), + Map.entry("callableDeclaration", DefaultAttribute.createAttribute(getCallableDeclaration()) + ) + ); + } + +} diff --git a/src/main/java/com/ibm/cldk/entities/SystemDepEdge.java b/src/main/java/com/ibm/cldk/entities/SystemDepEdge.java index a77709c..77ed022 100644 --- a/src/main/java/com/ibm/cldk/entities/SystemDepEdge.java +++ b/src/main/java/com/ibm/cldk/entities/SystemDepEdge.java @@ -117,4 +117,13 @@ public Map getAttributes() { map.put("weight", DefaultAttribute.createAttribute(String.valueOf(getWeight()))); return map; } + + public Map getAttributesMap() { + Map map = new LinkedHashMap<>(); + map.put("source_kind", getSourceKind()); + map.put("type", getType()); + map.put("destination_kind", getDestinationKind()); + map.put("weight", String.valueOf(getWeight())); + return map; + } } \ No newline at end of file diff --git a/src/main/java/com/ibm/cldk/utils/AnalysisUtils.java b/src/main/java/com/ibm/cldk/utils/AnalysisUtils.java index 811883c..48661b7 100644 --- a/src/main/java/com/ibm/cldk/utils/AnalysisUtils.java +++ b/src/main/java/com/ibm/cldk/utils/AnalysisUtils.java @@ -19,6 +19,7 @@ import com.ibm.cldk.entities.ParameterInCallable; import com.ibm.wala.classLoader.IClass; import com.ibm.wala.classLoader.IMethod; +import com.ibm.wala.ipa.callgraph.CallGraph; import com.ibm.wala.ipa.callgraph.Entrypoint; import com.ibm.wala.ipa.callgraph.impl.DefaultEntrypoint; import com.ibm.wala.ipa.cha.IClassHierarchy; @@ -42,7 +43,7 @@ public class AnalysisUtils { /** * The constant classAttr. */ - public static Pair createAndPutNewCallableInSymbolTable(IMethod method) { + public static Map createAndPutNewCallableInSymbolTable(IMethod method) { // Get the class name, with a . representation. String declaringClassSignature = method.getDeclaringClass().getName().toString().substring(1).replace("/", ".").replace("$", "."); @@ -55,11 +56,13 @@ public static Pair createAndPutNewCallableInSymbolTable(IMetho String methodSignature = String.join("", methodName, "(", String.join(", ", Optional.of(arguments).orElseGet(Collections::emptyList)), ")"); Callable newCallable = new Callable(); + newCallable.setFilePath(""); newCallable.setImplicit(true); newCallable.setConstructor(methodName.contains("")); newCallable.setComment(""); newCallable.setModifiers(Stream.of(method.isPublic() ? "public" : null, method.isProtected() ? "protected" : null, method.isPrivate() ? "private" : null, method.isAbstract() ? "abstract" : null, method.isStatic() ? "static" : null, method.isFinal() ? "final" : null, method.isSynchronized() ? "synchronized" : null, method.isNative() ? "native" : null, method.isSynthetic() ? "synthetic" : null, method.isBridge() ? "bridge" : null).filter(Objects::nonNull).collect(Collectors.toList())); newCallable.setCode(""); + newCallable.setSignature(methodSignature); newCallable.setDeclaration(methodSignature); newCallable.setEndLine(-1); newCallable.setStartLine(-1); @@ -76,7 +79,12 @@ public static Pair createAndPutNewCallableInSymbolTable(IMetho declaredMethodsAndConstructors.put(declaringClassSignature, methodSignature, newCallable); - return Pair.of(declaringClassSignature, newCallable); + return Map.ofEntries( + Map.entry("typeDeclaration", declaringClassSignature), + Map.entry("filePath", ""), + Map.entry("signature", newCallable.getSignature()), + Map.entry("callableDeclaration", newCallable.getDeclaration()) + ); } /** @@ -92,8 +100,24 @@ public static int getCyclomaticComplexity(IR ir) { return branchCount + 1; } - public static Pair getCallableFromSymbolTable(IMethod method) { + public static void setCyclomaticComplexity(CallGraph callGraph) { + callGraph.forEach( + cgNode -> { + if (cgNode.getMethod() != null) { + IMethod method = cgNode.getMethod(); + String declaringClassSignature = method.getDeclaringClass().getName().toString().substring(1).replace("/", ".").replace("$", "."); + List arguments = Arrays.stream(Type.getMethodType(method.getDescriptor().toString()).getArgumentTypes()).map(Type::getClassName).collect(Collectors.toList()); + String methodSignature = String.join("", method.getName().toString(), "(", String.join(", ", Optional.of(arguments).orElseGet(Collections::emptyList)), ")"); + Callable callable = declaredMethodsAndConstructors.get(declaringClassSignature, methodSignature); + if (callable != null) { + callable.setCyclomaticComplexity(getCyclomaticComplexity(cgNode.getIR())); + } + } + } + ); + } + public static Map getCallableFromSymbolTable(IMethod method) { // Get the class name, with a . representation. String declaringClassSignature = method.getDeclaringClass().getName().toString().substring(1).replace("/", ".").replace("$", "."); @@ -102,8 +126,17 @@ public static Pair getCallableFromSymbolTable(IMethod method) // Get the method signature. String methodSignature = String.join("", method.getName().toString(), "(", String.join(", ", Optional.of(arguments).orElseGet(Collections::emptyList)), ")"); - - return Pair.of(declaringClassSignature, declaredMethodsAndConstructors.get(declaringClassSignature, methodSignature)); + Callable callable = declaredMethodsAndConstructors.get(declaringClassSignature, methodSignature); + + if (callable == null) + return null; + else + return Map.ofEntries( + Map.entry("typeDeclaration", declaringClassSignature), + Map.entry("filePath", callable.getFilePath()), + Map.entry("signature", callable.getSignature()), + Map.entry("callableDeclaration", callable.getDeclaration()) + ); } /** diff --git a/src/test/java/com/ibm/cldk/CodeAnalyzerTest.java b/src/test/java/com/ibm/cldk/CodeAnalyzerTest.java index 9fb695d..96b0df4 100644 --- a/src/test/java/com/ibm/cldk/CodeAnalyzerTest.java +++ b/src/test/java/com/ibm/cldk/CodeAnalyzerTest.java @@ -1,5 +1,8 @@ package com.ibm.cldk; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -15,10 +18,39 @@ void tearDown() { } @Test - void main() { + void testOutputJSONShape() { + } - @Test - void run() { + private boolean compareJsonStructure(JsonElement referenceElement, JsonElement actualElement) { + if (referenceElement.isJsonObject() && actualElement.isJsonObject()) { + JsonObject referenceObject = referenceElement.getAsJsonObject(); + JsonObject actualObject = actualElement.getAsJsonObject(); + + // Ensure that all keys in the reference JSON are present in the actual JSON + for (String key : referenceObject.keySet()) { + if (!actualObject.has(key)) { + return false; + } + // Recursively compare the child elements + if (!compareJsonStructure(referenceObject.get(key), actualObject.get(key))) { + return false; + } + } + } else if (referenceElement.isJsonArray() && actualElement.isJsonArray()) { + // If both are arrays, compare their elements + JsonArray referenceArray = referenceElement.getAsJsonArray(); + JsonArray actualArray = actualElement.getAsJsonArray(); + if (referenceArray.size() != actualArray.size()) { + return false; + } + for (int i = 0; i < referenceArray.size(); i++) { + if (!compareJsonStructure(referenceArray.get(i), actualArray.get(i))) { + return false; + } + } + } + // If neither is an object or array, just return true (for primitives) + return true; } } \ No newline at end of file diff --git a/src/test/resources/reference_analysis.json b/src/test/resources/reference_analysis.json new file mode 100644 index 0000000..68d48db --- /dev/null +++ b/src/test/resources/reference_analysis.json @@ -0,0 +1 @@ +{"symbol_table":{"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/ZipValidator.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/ZipValidator.java","comment":"","imports":["java.io.File","java.io.IOException","java.util.Enumeration","java.util.zip.ZipEntry","java.util.zip.ZipException","java.util.zip.ZipFile"],"type_declarations":{"com.acme.modres.util.ZipValidator":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":["java.util.zip.ZipFile"],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"isValid()":{"signature":"isValid()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":["java.lang.Throwable"],"declaration":"public boolean isValid() throws Throwable","parameters":[],"code":"{\n if (file.exists()) {\n ZipValidator zipFile = new ZipValidator(file);\n Enumeration entries = zipFile.entries();\n if (!entries.hasMoreElements()) {\n return true;\n }\n zipFile.close();\n }\n return false;\n}","start_line":20,"end_line":30,"return_type":"boolean","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.util.ZipValidator","java.util.Enumeration"],"accessed_fields":["com.acme.modres.util.ZipValidator.file"],"call_sites":[{"method_name":"exists","receiver_expr":"file","receiver_type":"java.io.File","argument_types":[],"return_type":"","callee_signature":"exists()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":21,"start_column":13,"end_line":21,"end_column":25},{"method_name":"entries","receiver_expr":"zipFile","receiver_type":"com.acme.modres.util.ZipValidator","argument_types":[],"return_type":"java.util.Enumeration","callee_signature":"entries()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":23,"start_column":55,"end_line":23,"end_column":71},{"method_name":"hasMoreElements","receiver_expr":"entries","receiver_type":"java.util.Enumeration","argument_types":[],"return_type":"","callee_signature":"hasMoreElements()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":24,"start_column":17,"end_line":24,"end_column":41},{"method_name":"close","receiver_expr":"zipFile","receiver_type":"com.acme.modres.util.ZipValidator","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":27,"start_column":13,"end_line":27,"end_column":27},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.util.ZipValidator","argument_types":["java.io.File"],"return_type":"com.acme.modres.util.ZipValidator","callee_signature":"ZipValidator(java.io.File)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":22,"start_column":36,"end_line":22,"end_column":57}],"variable_declarations":[{"name":"zipFile","type":"com.acme.modres.util.ZipValidator","initializer":"new ZipValidator(file)","start_line":22,"start_column":26,"end_line":22,"end_column":57},{"name":"entries","type":"java.util.Enumeration","initializer":"zipFile.entries()","start_line":23,"start_column":45,"end_line":23,"end_column":71}],"cyclomatic_complexity":3},"(File)":{"signature":"ZipValidator(File)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":["java.util.zip.ZipException","java.io.IOException"],"declaration":"public ZipValidator(File file) throws ZipException, IOException","parameters":[{"type":"java.io.File","name":"file","annotations":[],"modifiers":[]}],"code":"{\n super(file);\n this.file = file;\n}","start_line":13,"end_line":16,"is_implicit":false,"is_constructor":true,"referenced_types":["java.io.File"],"accessed_fields":["com.acme.modres.util.ZipValidator.file"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"java.io.File","start_line":18,"end_line":18,"variables":["file"],"modifiers":["private"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/DMBeanUtils.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/DMBeanUtils.java","comment":"","imports":["java.util.logging.Level","java.util.logging.Logger","javax.management.MBeanOperationInfo"],"type_declarations":{"com.acme.modres.mbean.DMBeanUtils":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public","final"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"getOps(OpMetadataList)":{"signature":"getOps(OpMetadataList)","comment":"","annotations":[],"modifiers":["public","static"],"thrown_exceptions":[],"declaration":"public static MBeanOperationInfo[] getOps(OpMetadataList opList)","parameters":[{"type":"com.acme.modres.mbean.OpMetadataList","name":"opList","annotations":[],"modifiers":[]}],"code":"{\n MBeanOperationInfo[] ops = null;\n if (opList == null || opList.getOpMetadatList() == null) {\n logger.log(Level.WARNING, \"No operation is configured\");\n return ops;\n }\n int numOps = opList.getOpMetadatList().size();\n if (numOps > 0) {\n ops = new MBeanOperationInfo[numOps];\n int i = 0;\n for (OpMetadata opMetadata : opList.getOpMetadatList()) {\n String name = opMetadata.getName();\n String desc = opMetadata.getDescription();\n String type = opMetadata.getType();\n int impact = opMetadata.getImpact();\n MBeanOperationInfo opInfo = new MBeanOperationInfo(name, desc, /* signature */\n null, type, impact, /* descriptor */\n null);\n ops[i++] = opInfo;\n }\n }\n return ops;\n}","start_line":11,"end_line":34,"return_type":"javax.management.MBeanOperationInfo[]","is_implicit":false,"is_constructor":false,"referenced_types":["javax.management.MBeanOperationInfo","java.lang.String","com.acme.modres.mbean.OpMetadata","java.util.logging.Level"],"accessed_fields":["com.acme.modres.mbean.DMBeanUtils.logger","java.util.logging.Level.WARNING"],"call_sites":[{"method_name":"getOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"java.util.List","callee_signature":"getOpMetadatList()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":13,"start_column":25,"end_line":13,"end_column":49},{"method_name":"log","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.util.logging.Level","java.lang.String"],"return_type":"","callee_signature":"log(java.util.logging.Level, java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":14,"start_column":4,"end_line":14,"end_column":58},{"method_name":"size","receiver_expr":"opList.getOpMetadatList()","receiver_type":"java.util.List","argument_types":[],"return_type":"","callee_signature":"size()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":18,"start_column":16,"end_line":18,"end_column":47},{"method_name":"getOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"java.util.List","callee_signature":"getOpMetadatList()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":18,"start_column":16,"end_line":18,"end_column":40},{"method_name":"getOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"java.util.List","callee_signature":"getOpMetadatList()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":22,"start_column":33,"end_line":22,"end_column":57},{"method_name":"getName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"java.lang.String","callee_signature":"getName()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":23,"start_column":19,"end_line":23,"end_column":38},{"method_name":"getDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"java.lang.String","callee_signature":"getDescription()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":24,"start_column":19,"end_line":24,"end_column":45},{"method_name":"getType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"java.lang.String","callee_signature":"getType()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":25,"start_column":19,"end_line":25,"end_column":38},{"method_name":"getImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"","callee_signature":"getImpact()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":26,"start_column":18,"end_line":26,"end_column":39},{"method_name":"","receiver_expr":"","receiver_type":"javax.management.MBeanOperationInfo","argument_types":["java.lang.String","java.lang.String","","java.lang.String","",""],"return_type":"javax.management.MBeanOperationInfo","callee_signature":"MBeanOperationInfo(java.lang.String, java.lang.String, javax.management.MBeanParameterInfo[], java.lang.String, int, javax.management.Descriptor)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":28,"start_column":33,"end_line":28,"end_column":125}],"variable_declarations":[{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"null","start_line":12,"start_column":24,"end_line":12,"end_column":33},{"name":"numOps","type":"int","initializer":"opList.getOpMetadatList().size()","start_line":18,"start_column":7,"end_line":18,"end_column":47},{"name":"i","type":"int","initializer":"0","start_line":21,"start_column":8,"end_line":21,"end_column":12},{"name":"opMetadata","type":"com.acme.modres.mbean.OpMetadata","initializer":"","start_line":22,"start_column":20,"end_line":22,"end_column":29},{"name":"name","type":"java.lang.String","initializer":"opMetadata.getName()","start_line":23,"start_column":12,"end_line":23,"end_column":38},{"name":"desc","type":"java.lang.String","initializer":"opMetadata.getDescription()","start_line":24,"start_column":12,"end_line":24,"end_column":45},{"name":"type","type":"java.lang.String","initializer":"opMetadata.getType()","start_line":25,"start_column":12,"end_line":25,"end_column":38},{"name":"impact","type":"int","initializer":"opMetadata.getImpact()","start_line":26,"start_column":9,"end_line":26,"end_column":39},{"name":"opInfo","type":"javax.management.MBeanOperationInfo","initializer":"new MBeanOperationInfo(name, desc, /* signature */\nnull, type, impact, /* descriptor */\nnull)","start_line":28,"start_column":24,"end_line":28,"end_column":125}],"cyclomatic_complexity":5}},"field_declarations":[{"comment":"","type":"java.util.logging.Logger","start_line":9,"end_line":9,"variables":["logger"],"modifiers":["private","static","final"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/security/FakeX509TrustManager.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/security/FakeX509TrustManager.java","comment":"","imports":[],"type_declarations":{"com.acme.modres.security.FakeX509TrustManager":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"// public class FakeX509TrustManager implements TrustManager {","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{},"field_declarations":[]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/security/SSLUtils.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/security/SSLUtils.java","comment":"","imports":["java.util.logging.Logger"],"type_declarations":{"com.acme.modres.security.SSLUtils":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{},"field_declarations":[{"comment":"","type":"java.util.logging.Logger","start_line":9,"end_line":9,"variables":["logger"],"modifiers":["private","static","final"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/security/CustomPermission.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/security/CustomPermission.java","comment":"","imports":["java.security.BasicPermission"],"type_declarations":{"com.acme.modres.security.CustomPermission":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":["java.security.BasicPermission"],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"(String)":{"signature":"CustomPermission(String)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public CustomPermission(String name)","parameters":[{"type":"java.lang.String","name":"name","annotations":[],"modifiers":[]}],"code":"{\n super(name);\n}","start_line":6,"end_line":8,"is_implicit":false,"is_constructor":true,"referenced_types":[],"accessed_fields":[],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"(String, String)":{"signature":"CustomPermission(String, String)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public CustomPermission(String name, String actions)","parameters":[{"type":"java.lang.String","name":"name","annotations":[],"modifiers":[]},{"type":"java.lang.String","name":"actions","annotations":[],"modifiers":[]}],"code":"{\n super(name, actions);\n}","start_line":10,"end_line":12,"is_implicit":false,"is_constructor":true,"referenced_types":[],"accessed_fields":[],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1}},"field_declarations":[]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java","comment":"","imports":["java.io.File","java.io.FileOutputStream","java.io.IOException","java.io.InputStream","java.io.OutputStream","com.acme.modres.mbean.reservation.ReservationList","com.acme.modres.util.JsonInputStream"],"type_declarations":{"com.acme.modres.mbean.IOUtils":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public","final"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"getOpListFromConfig()":{"signature":"getOpListFromConfig()","comment":"","annotations":[],"modifiers":["public","static"],"thrown_exceptions":[],"declaration":"public static OpMetadataList getOpListFromConfig()","parameters":[],"code":"{\n // fix hardcoded paths\n File file = getFileFromRelativePath(\"ops.json\");\n try (JsonInputStream is = new JsonInputStream(file)) {\n //empty default\n OpMetadataList opList = new OpMetadataList();\n opList = (OpMetadataList) is.parseJsonAs(OpMetadataList.class);\n return opList;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n}","start_line":46,"end_line":56,"return_type":"com.acme.modres.mbean.OpMetadataList","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.util.JsonInputStream","java.io.File","com.acme.modres.mbean.OpMetadataList"],"accessed_fields":[],"call_sites":[{"method_name":"getFileFromRelativePath","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String"],"return_type":"java.io.File","callee_signature":"getFileFromRelativePath(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":47,"start_column":15,"end_line":47,"end_column":49},{"method_name":"parseJsonAs","receiver_expr":"is","receiver_type":"com.acme.modres.util.JsonInputStream","argument_types":["java.lang.Class"],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"parseJsonAs(java.lang.Class)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":50,"start_column":30,"end_line":50,"end_column":65},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"java.io.IOException","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":53,"start_column":4,"end_line":53,"end_column":22},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.util.JsonInputStream","argument_types":["java.io.File"],"return_type":"com.acme.modres.util.JsonInputStream","callee_signature":"JsonInputStream(java.io.File)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":48,"start_column":29,"end_line":48,"end_column":53},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":49,"start_column":29,"end_line":49,"end_column":48}],"variable_declarations":[{"name":"file","type":"java.io.File","initializer":"getFileFromRelativePath(\"ops.json\")","start_line":47,"start_column":8,"end_line":47,"end_column":49},{"name":"is","type":"com.acme.modres.util.JsonInputStream","initializer":"new JsonInputStream(file)","start_line":48,"start_column":24,"end_line":48,"end_column":53},{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":49,"start_column":19,"end_line":49,"end_column":48}],"cyclomatic_complexity":1},"getFileFromRelativePath(String)":{"signature":"getFileFromRelativePath(String)","comment":"","annotations":[],"modifiers":["public","static"],"thrown_exceptions":[],"declaration":"public static File getFileFromRelativePath(String path)","parameters":[{"type":"java.lang.String","name":"path","annotations":[],"modifiers":[]}],"code":"{\n File file = null;\n InputStream initialStream = null;\n OutputStream outStream = null;\n try {\n initialStream = IOUtils.class.getClassLoader().getResourceAsStream(path);\n byte[] buffer = new byte[initialStream.available()];\n initialStream.read(buffer);\n file = File.createTempFile(path, null);\n outStream = new FileOutputStream(file);\n outStream.write(buffer);\n outStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (initialStream != null) {\n try {\n initialStream.close();\n } catch (IOException e) {\n }\n } else if (outStream != null) {\n try {\n outStream.close();\n } catch (IOException e) {\n }\n }\n }\n return file;\n}","start_line":14,"end_line":44,"return_type":"java.io.File","is_implicit":false,"is_constructor":false,"referenced_types":["java.io.OutputStream","java.io.File","java.io.InputStream"],"accessed_fields":[],"call_sites":[{"method_name":"getResourceAsStream","receiver_expr":"IOUtils.class.getClassLoader()","receiver_type":"java.lang.ClassLoader","argument_types":["java.lang.String"],"return_type":"java.io.InputStream","callee_signature":"getResourceAsStream(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":19,"start_column":29,"end_line":19,"end_column":84},{"method_name":"getClassLoader","receiver_expr":"IOUtils.class","receiver_type":"java.lang.Class","argument_types":[],"return_type":"java.lang.ClassLoader","callee_signature":"getClassLoader()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":19,"start_column":29,"end_line":19,"end_column":58},{"method_name":"available","receiver_expr":"initialStream","receiver_type":"java.io.InputStream","argument_types":[],"return_type":"","callee_signature":"available()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":20,"start_column":38,"end_line":20,"end_column":62},{"method_name":"read","receiver_expr":"initialStream","receiver_type":"java.io.InputStream","argument_types":[""],"return_type":"","callee_signature":"read(byte[])","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":21,"start_column":13,"end_line":21,"end_column":38},{"method_name":"createTempFile","receiver_expr":"File","receiver_type":"java.io.File","argument_types":["java.lang.String",""],"return_type":"java.io.File","callee_signature":"createTempFile(java.lang.String, java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":23,"start_column":20,"end_line":23,"end_column":50},{"method_name":"write","receiver_expr":"outStream","receiver_type":"java.io.OutputStream","argument_types":[""],"return_type":"","callee_signature":"write(byte[])","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":25,"start_column":13,"end_line":25,"end_column":35},{"method_name":"close","receiver_expr":"outStream","receiver_type":"java.io.OutputStream","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":26,"start_column":13,"end_line":26,"end_column":29},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"java.lang.Exception","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":28,"start_column":13,"end_line":28,"end_column":31},{"method_name":"close","receiver_expr":"initialStream","receiver_type":"java.io.InputStream","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":32,"start_column":21,"end_line":32,"end_column":41},{"method_name":"close","receiver_expr":"outStream","receiver_type":"java.io.OutputStream","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":37,"start_column":21,"end_line":37,"end_column":37},{"method_name":"","receiver_expr":"","receiver_type":"java.io.FileOutputStream","argument_types":["java.io.File"],"return_type":"java.io.FileOutputStream","callee_signature":"FileOutputStream(java.io.File)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":24,"start_column":25,"end_line":24,"end_column":50}],"variable_declarations":[{"name":"file","type":"java.io.File","initializer":"null","start_line":15,"start_column":14,"end_line":15,"end_column":24},{"name":"initialStream","type":"java.io.InputStream","initializer":"null","start_line":16,"start_column":21,"end_line":16,"end_column":40},{"name":"outStream","type":"java.io.OutputStream","initializer":"null","start_line":17,"start_column":22,"end_line":17,"end_column":37},{"name":"buffer","type":"byte[]","initializer":"new byte[initialStream.available()]","start_line":20,"start_column":20,"end_line":20,"end_column":63}],"cyclomatic_complexity":7},"getReservationListFromConfig()":{"signature":"getReservationListFromConfig()","comment":"","annotations":[],"modifiers":["public","static"],"thrown_exceptions":[],"declaration":"public static ReservationList getReservationListFromConfig()","parameters":[],"code":"{\n // fix hardcoded paths\n File file = getFileFromRelativePath(\"reservations.json\");\n try (JsonInputStream is = new JsonInputStream(file)) {\n //empty default\n ReservationList reservationList = new ReservationList();\n reservationList = (ReservationList) is.parseJsonAs(ReservationList.class);\n return reservationList;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n}","start_line":58,"end_line":68,"return_type":"com.acme.modres.mbean.reservation.ReservationList","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.util.JsonInputStream","com.acme.modres.mbean.reservation.ReservationList","java.io.File"],"accessed_fields":[],"call_sites":[{"method_name":"getFileFromRelativePath","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String"],"return_type":"java.io.File","callee_signature":"getFileFromRelativePath(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":59,"start_column":15,"end_line":59,"end_column":58},{"method_name":"parseJsonAs","receiver_expr":"is","receiver_type":"com.acme.modres.util.JsonInputStream","argument_types":["java.lang.Class"],"return_type":"com.acme.modres.mbean.reservation.ReservationList","callee_signature":"parseJsonAs(java.lang.Class)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":62,"start_column":40,"end_line":62,"end_column":76},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"java.io.IOException","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":65,"start_column":4,"end_line":65,"end_column":22},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.util.JsonInputStream","argument_types":["java.io.File"],"return_type":"com.acme.modres.util.JsonInputStream","callee_signature":"JsonInputStream(java.io.File)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":60,"start_column":29,"end_line":60,"end_column":53},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.reservation.ReservationList","argument_types":[],"return_type":"com.acme.modres.mbean.reservation.ReservationList","callee_signature":"ReservationList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":61,"start_column":39,"end_line":61,"end_column":59}],"variable_declarations":[{"name":"file","type":"java.io.File","initializer":"getFileFromRelativePath(\"reservations.json\")","start_line":59,"start_column":8,"end_line":59,"end_column":58},{"name":"is","type":"com.acme.modres.util.JsonInputStream","initializer":"new JsonInputStream(file)","start_line":60,"start_column":24,"end_line":60,"end_column":53},{"name":"reservationList","type":"com.acme.modres.mbean.reservation.ReservationList","initializer":"new ReservationList()","start_line":61,"start_column":20,"end_line":61,"end_column":59}],"cyclomatic_complexity":1}},"field_declarations":[]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/SecondServlet.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/SecondServlet.java","comment":"","imports":["java.io.BufferedReader","java.io.IOException","java.io.PrintWriter","java.util.stream.Collectors","javax.servlet.ServletException","javax.servlet.http.HttpServlet","javax.servlet.http.HttpServletRequest","javax.servlet.http.HttpServletResponse"],"type_declarations":{"com.acme.modres.SecondServlet":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":["javax.servlet.http.HttpServlet"],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"doGet(HttpServletRequest, HttpServletResponse)":{"signature":"doGet(HttpServletRequest, HttpServletResponse)","comment":"","annotations":["@Override"],"modifiers":["protected"],"thrown_exceptions":["javax.servlet.ServletException","java.io.IOException"],"declaration":"protected void doGet(HttpServletRequest req, HttpServletResponse response) throws ServletException, IOException","parameters":[{"type":"javax.servlet.http.HttpServletRequest","name":"req","annotations":[],"modifiers":[]},{"type":"javax.servlet.http.HttpServletResponse","name":"response","annotations":[],"modifiers":[]}],"code":"{\n response.setContentType(\"text/plain\");\n BufferedReader rd = req.getReader();\n String rcontents = rd.lines().collect(Collectors.joining());\n PrintWriter out = response.getWriter();\n out.print(rcontents + \" to our site! \");\n}","start_line":17,"end_line":24,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.io.PrintWriter","java.io.BufferedReader","java.lang.String"],"accessed_fields":[],"call_sites":[{"method_name":"setContentType","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setContentType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":19,"start_column":3,"end_line":19,"end_column":39},{"method_name":"getReader","receiver_expr":"req","receiver_type":"javax.servlet.http.HttpServletRequest","argument_types":[],"return_type":"java.io.BufferedReader","callee_signature":"getReader()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":20,"start_column":23,"end_line":20,"end_column":37},{"method_name":"collect","receiver_expr":"rd.lines()","receiver_type":"java.util.stream.Stream","argument_types":["java.util.stream.Collector"],"return_type":"java.lang.String","callee_signature":"collect(java.util.stream.Collector)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":21,"start_column":22,"end_line":21,"end_column":61},{"method_name":"lines","receiver_expr":"rd","receiver_type":"java.io.BufferedReader","argument_types":[],"return_type":"java.util.stream.Stream","callee_signature":"lines()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":21,"start_column":22,"end_line":21,"end_column":31},{"method_name":"joining","receiver_expr":"Collectors","receiver_type":"java.util.stream.Collectors","argument_types":[],"return_type":"java.util.stream.Collector","callee_signature":"joining()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":21,"start_column":41,"end_line":21,"end_column":60},{"method_name":"getWriter","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":[],"return_type":"java.io.PrintWriter","callee_signature":"getWriter()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":22,"start_column":24,"end_line":22,"end_column":43},{"method_name":"print","receiver_expr":"out","receiver_type":"java.io.PrintWriter","argument_types":["java.lang.String"],"return_type":"","callee_signature":"print(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":23,"start_column":6,"end_line":23,"end_column":44}],"variable_declarations":[{"name":"rd","type":"java.io.BufferedReader","initializer":"req.getReader()","start_line":20,"start_column":18,"end_line":20,"end_column":37},{"name":"rcontents","type":"java.lang.String","initializer":"rd.lines().collect(Collectors.joining())","start_line":21,"start_column":10,"end_line":21,"end_column":61},{"name":"out","type":"java.io.PrintWriter","initializer":"response.getWriter()","start_line":22,"start_column":18,"end_line":22,"end_column":43}],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"long","start_line":15,"end_line":15,"variables":["serialVersionUID"],"modifiers":["private","static","final"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/exception/ExceptionHandler.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/exception/ExceptionHandler.java","comment":"","imports":["java.util.logging.Level","java.util.logging.Logger","javax.servlet.ServletException"],"type_declarations":{"com.acme.modres.exception.ExceptionHandler":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"handleException(Exception, String, Logger)":{"signature":"handleException(Exception, String, Logger)","comment":"","annotations":[],"modifiers":["public","static"],"thrown_exceptions":["javax.servlet.ServletException"],"declaration":"public static void handleException(Exception e, String errorMsg, Logger logger) throws ServletException","parameters":[{"type":"java.lang.Exception","name":"e","annotations":[],"modifiers":[]},{"type":"java.lang.String","name":"errorMsg","annotations":[],"modifiers":[]},{"type":"java.util.logging.Logger","name":"logger","annotations":[],"modifiers":[]}],"code":"{\n if (e == null) {\n logger.severe(errorMsg);\n throw new ServletException(errorMsg);\n } else {\n logger.log(Level.SEVERE, errorMsg, e);\n throw new ServletException(errorMsg, e);\n }\n}","start_line":10,"end_line":18,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.logging.Level"],"accessed_fields":["java.util.logging.Level.SEVERE"],"call_sites":[{"method_name":"severe","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.lang.String"],"return_type":"","callee_signature":"severe(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":12,"start_column":4,"end_line":12,"end_column":26},{"method_name":"log","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.util.logging.Level","java.lang.String","java.lang.Exception"],"return_type":"","callee_signature":"log(java.util.logging.Level, java.lang.String, java.lang.Throwable)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":15,"start_column":4,"end_line":15,"end_column":40},{"method_name":"","receiver_expr":"","receiver_type":"javax.servlet.ServletException","argument_types":["java.lang.String"],"return_type":"javax.servlet.ServletException","callee_signature":"ServletException(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":13,"start_column":10,"end_line":13,"end_column":39},{"method_name":"","receiver_expr":"","receiver_type":"javax.servlet.ServletException","argument_types":["java.lang.String","java.lang.Exception"],"return_type":"javax.servlet.ServletException","callee_signature":"ServletException(java.lang.String, java.lang.Throwable)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":16,"start_column":10,"end_line":16,"end_column":42}],"variable_declarations":[],"cyclomatic_complexity":2}},"field_declarations":[]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/OpMetadataList.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/OpMetadataList.java","comment":"","imports":["java.util.ArrayList","java.util.List"],"type_declarations":{"com.acme.modres.mbean.OpMetadataList":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"()":{"signature":"OpMetadataList()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public OpMetadataList()","parameters":[],"code":"{\n}","start_line":8,"end_line":9,"is_implicit":false,"is_constructor":true,"referenced_types":[],"accessed_fields":[],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"getOpMetadatList()":{"signature":"getOpMetadatList()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public List getOpMetadatList()","parameters":[],"code":"{\n return opMetadatList;\n}","start_line":17,"end_line":19,"return_type":"java.util.List","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.OpMetadataList.opMetadatList"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"setOpMetadatList(List)":{"signature":"setOpMetadatList(List)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void setOpMetadatList(List opMetadatList)","parameters":[{"type":"java.util.List","name":"opMetadatList","annotations":[],"modifiers":[]}],"code":"{\n this.opMetadatList = opMetadatList;\n}","start_line":21,"end_line":23,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List"],"accessed_fields":["com.acme.modres.mbean.OpMetadataList.opMetadatList"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"add(OpMetadata)":{"signature":"add(OpMetadata)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void add(OpMetadata opMetadata)","parameters":[{"type":"com.acme.modres.mbean.OpMetadata","name":"opMetadata","annotations":[],"modifiers":[]}],"code":"{\n opMetadatList.add(opMetadata);\n}","start_line":13,"end_line":15,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.OpMetadataList.opMetadatList"],"call_sites":[{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":14,"start_column":3,"end_line":14,"end_column":31}],"variable_declarations":[],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"java.util.List","start_line":11,"end_line":11,"variables":["opMetadatList"],"modifiers":["private"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/LogoutServlet.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/LogoutServlet.java","comment":"","imports":["javax.servlet.annotation.WebServlet","javax.servlet.http.HttpServlet","javax.servlet.http.HttpServletRequest","javax.servlet.http.HttpServletResponse","com.ibm.websphere.security.WSSecurityHelper","java.io.IOException"],"type_declarations":{"com.acme.modres.LogoutServlet":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":["javax.servlet.http.HttpServlet"],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":["@WebServlet({ \"/logout\" })"],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"doGet(HttpServletRequest, HttpServletResponse)":{"signature":"doGet(HttpServletRequest, HttpServletResponse)","comment":"","annotations":["@Override"],"modifiers":["protected"],"thrown_exceptions":["java.io.IOException"],"declaration":"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException","parameters":[{"type":"javax.servlet.http.HttpServletRequest","name":"request","annotations":[],"modifiers":[]},{"type":"javax.servlet.http.HttpServletResponse","name":"response","annotations":[],"modifiers":[]}],"code":"{\n try {\n WSSecurityHelper.revokeSSOCookies(request, response);\n } catch (Exception e) {\n System.err.println(\"[ERROR] Error logging out\");\n e.printStackTrace();\n }\n response.sendRedirect(\"login.jsp\");\n}","start_line":16,"end_line":28,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.io.PrintStream"],"accessed_fields":["java.lang.System.err"],"call_sites":[{"method_name":"revokeSSOCookies","receiver_expr":"WSSecurityHelper","receiver_type":"com.ibm.websphere.security.WSSecurityHelper","argument_types":["javax.servlet.http.HttpServletRequest","javax.servlet.http.HttpServletResponse"],"return_type":"","callee_signature":"revokeSSOCookies(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":21,"start_column":13,"end_line":21,"end_column":64},{"method_name":"println","receiver_expr":"System.err","receiver_type":"java.io.PrintStream","argument_types":["java.lang.String"],"return_type":"","callee_signature":"println(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":23,"start_column":13,"end_line":23,"end_column":59},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"java.lang.Exception","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":24,"start_column":13,"end_line":24,"end_column":31},{"method_name":"sendRedirect","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":["java.lang.String"],"return_type":"","callee_signature":"sendRedirect(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":27,"start_column":9,"end_line":27,"end_column":42}],"variable_declarations":[],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"long","start_line":14,"end_line":14,"variables":["serialVersionUID"],"modifiers":["private","static","final"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java","comment":"","imports":["java.io.File","java.io.FileInputStream","java.io.FileNotFoundException","java.io.FileOutputStream","java.io.IOException","java.io.PrintWriter","java.util.logging.Logger","java.util.zip.ZipEntry","java.util.zip.ZipOutputStream","javax.servlet.ServletException","javax.servlet.http.HttpServlet","javax.servlet.http.HttpServletRequest","javax.servlet.http.HttpServletResponse","com.acme.modres.mbean.IOUtils","com.acme.modres.mbean.reservation.DateChecker","com.acme.modres.mbean.reservation.ReservationCheckerData","com.acme.modres.util.ZipValidator","javax.naming.InitialContext","javax.servlet.annotation.WebServlet"],"type_declarations":{"com.acme.modres.AvailabilityCheckerServlet":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":["javax.servlet.http.HttpServlet"],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":["@WebServlet({ \"/resorts/availability\" })"],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"doPost(HttpServletRequest, HttpServletResponse)":{"signature":"doPost(HttpServletRequest, HttpServletResponse)","comment":"/**\n\t * Returns the weather information for a given city\n\t */","annotations":[],"modifiers":["protected"],"thrown_exceptions":["javax.servlet.ServletException","java.io.IOException"],"declaration":"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException","parameters":[{"type":"javax.servlet.http.HttpServletRequest","name":"request","annotations":[],"modifiers":[]},{"type":"javax.servlet.http.HttpServletResponse","name":"response","annotations":[],"modifiers":[]}],"code":"{\n doGet(request, response);\n}","start_line":84,"end_line":88,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":[],"call_sites":[{"method_name":"doGet","receiver_expr":"","receiver_type":"","argument_types":["javax.servlet.http.HttpServletRequest","javax.servlet.http.HttpServletResponse"],"return_type":"","callee_signature":"doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)","is_public":false,"is_protected":true,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":87,"start_column":3,"end_line":87,"end_column":26}],"variable_declarations":[],"cyclomatic_complexity":1},"doGet(HttpServletRequest, HttpServletResponse)":{"signature":"doGet(HttpServletRequest, HttpServletResponse)","comment":"","annotations":["@Override"],"modifiers":["protected"],"thrown_exceptions":["java.io.IOException","javax.servlet.ServletException"],"declaration":"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException","parameters":[{"type":"javax.servlet.http.HttpServletRequest","name":"request","annotations":[],"modifiers":[]},{"type":"javax.servlet.http.HttpServletResponse","name":"response","annotations":[],"modifiers":[]}],"code":"{\n String methodName = \"doGet\";\n logger.entering(AvailabilityCheckerServlet.class.getName(), methodName);\n int statusCode = 200;\n String selectedDateStr = request.getParameter(\"date\");\n boolean parsedDate = reservationCheckerData.setSelectedDate(selectedDateStr);\n if (!parsedDate || reservationCheckerData.getReservationList() == null) {\n statusCode = 500;\n reservationCheckerData.setAvailablility(false);\n }\n if (statusCode == 200) {\n Thread t1 = new Thread(new DateChecker(reservationCheckerData));\n try {\n t1.start();\n t1.join();\n // Java 21 issue\n t1.stop();\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n if (!reservationCheckerData.isAvailible()) {\n statusCode = 201;\n }\n }\n PrintWriter out = response.getWriter();\n response.setContentType(\"application/json\");\n response.setCharacterEncoding(\"UTF-8\");\n out.print(\"{\\\"availability\\\": \\\"\" + String.valueOf(reservationCheckerData.isAvailible()) + \"\\\"}\");\n response.setStatus(statusCode);\n}","start_line":43,"end_line":79,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.io.PrintWriter","java.lang.Thread","java.lang.String"],"accessed_fields":["com.acme.modres.AvailabilityCheckerServlet.logger","com.acme.modres.AvailabilityCheckerServlet.reservationCheckerData"],"call_sites":[{"method_name":"entering","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.lang.String","java.lang.String"],"return_type":"","callee_signature":"entering(java.lang.String, java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":48,"start_column":3,"end_line":48,"end_column":73},{"method_name":"getName","receiver_expr":"AvailabilityCheckerServlet.class","receiver_type":"java.lang.Class","argument_types":[],"return_type":"java.lang.String","callee_signature":"getName()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":48,"start_column":19,"end_line":48,"end_column":60},{"method_name":"getParameter","receiver_expr":"request","receiver_type":"javax.servlet.http.HttpServletRequest","argument_types":["java.lang.String"],"return_type":"java.lang.String","callee_signature":"getParameter(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":51,"start_column":28,"end_line":51,"end_column":55},{"method_name":"setSelectedDate","receiver_expr":"reservationCheckerData","receiver_type":"com.acme.modres.mbean.reservation.ReservationCheckerData","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setSelectedDate(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":52,"start_column":24,"end_line":52,"end_column":78},{"method_name":"getReservationList","receiver_expr":"reservationCheckerData","receiver_type":"com.acme.modres.mbean.reservation.ReservationCheckerData","argument_types":[],"return_type":"com.acme.modres.mbean.reservation.ReservationList","callee_signature":"getReservationList()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":53,"start_column":22,"end_line":53,"end_column":64},{"method_name":"setAvailablility","receiver_expr":"reservationCheckerData","receiver_type":"com.acme.modres.mbean.reservation.ReservationCheckerData","argument_types":[""],"return_type":"","callee_signature":"setAvailablility(java.lang.Boolean)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":55,"start_column":4,"end_line":55,"end_column":49},{"method_name":"start","receiver_expr":"t1","receiver_type":"java.lang.Thread","argument_types":[],"return_type":"","callee_signature":"start()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":61,"start_column":5,"end_line":61,"end_column":14},{"method_name":"join","receiver_expr":"t1","receiver_type":"java.lang.Thread","argument_types":[],"return_type":"","callee_signature":"join()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":62,"start_column":5,"end_line":62,"end_column":13},{"method_name":"stop","receiver_expr":"t1","receiver_type":"java.lang.Thread","argument_types":[],"return_type":"","callee_signature":"stop()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":63,"start_column":5,"end_line":63,"end_column":13},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"java.lang.Exception","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":66,"start_column":5,"end_line":66,"end_column":23},{"method_name":"isAvailible","receiver_expr":"reservationCheckerData","receiver_type":"com.acme.modres.mbean.reservation.ReservationCheckerData","argument_types":[],"return_type":"","callee_signature":"isAvailible()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":69,"start_column":9,"end_line":69,"end_column":44},{"method_name":"getWriter","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":[],"return_type":"java.io.PrintWriter","callee_signature":"getWriter()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":74,"start_column":21,"end_line":74,"end_column":40},{"method_name":"setContentType","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setContentType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":75,"start_column":3,"end_line":75,"end_column":45},{"method_name":"setCharacterEncoding","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setCharacterEncoding(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":76,"start_column":3,"end_line":76,"end_column":40},{"method_name":"print","receiver_expr":"out","receiver_type":"java.io.PrintWriter","argument_types":["java.lang.String"],"return_type":"","callee_signature":"print(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":77,"start_column":3,"end_line":77,"end_column":95},{"method_name":"valueOf","receiver_expr":"String","receiver_type":"java.lang.String","argument_types":[""],"return_type":"java.lang.String","callee_signature":"valueOf(boolean)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":77,"start_column":37,"end_line":77,"end_column":88},{"method_name":"isAvailible","receiver_expr":"reservationCheckerData","receiver_type":"com.acme.modres.mbean.reservation.ReservationCheckerData","argument_types":[],"return_type":"","callee_signature":"isAvailible()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":77,"start_column":52,"end_line":77,"end_column":87},{"method_name":"setStatus","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":[""],"return_type":"","callee_signature":"setStatus(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":78,"start_column":3,"end_line":78,"end_column":32},{"method_name":"","receiver_expr":"","receiver_type":"java.lang.Thread","argument_types":["com.acme.modres.mbean.reservation.DateChecker"],"return_type":"java.lang.Thread","callee_signature":"Thread(java.lang.Runnable)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":59,"start_column":16,"end_line":59,"end_column":66},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.reservation.DateChecker","argument_types":["com.acme.modres.mbean.reservation.ReservationCheckerData"],"return_type":"com.acme.modres.mbean.reservation.DateChecker","callee_signature":"DateChecker(com.acme.modres.mbean.reservation.ReservationCheckerData)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":59,"start_column":27,"end_line":59,"end_column":65}],"variable_declarations":[{"name":"methodName","type":"java.lang.String","initializer":"\"doGet\"","start_line":47,"start_column":10,"end_line":47,"end_column":29},{"name":"statusCode","type":"int","initializer":"200","start_line":49,"start_column":7,"end_line":49,"end_column":22},{"name":"selectedDateStr","type":"java.lang.String","initializer":"request.getParameter(\"date\")","start_line":51,"start_column":10,"end_line":51,"end_column":55},{"name":"parsedDate","type":"boolean","initializer":"reservationCheckerData.setSelectedDate(selectedDateStr)","start_line":52,"start_column":11,"end_line":52,"end_column":78},{"name":"t1","type":"java.lang.Thread","initializer":"new Thread(new DateChecker(reservationCheckerData))","start_line":59,"start_column":11,"end_line":59,"end_column":66},{"name":"out","type":"java.io.PrintWriter","initializer":"response.getWriter()","start_line":74,"start_column":15,"end_line":74,"end_column":40}],"cyclomatic_complexity":5},"exportRevervations(String)":{"signature":"exportRevervations(String)","comment":"","annotations":[],"modifiers":["protected"],"thrown_exceptions":[],"declaration":"protected int exportRevervations(String selectedDateStr)","parameters":[{"type":"java.lang.String","name":"selectedDateStr","annotations":[],"modifiers":[]}],"code":"{\n File fileToZip = IOUtils.getFileFromRelativePath(\"reservations.json\");\n String userDirectory = System.getProperty(\"user.home\");\n String zipPath = userDirectory + \"/reservations.zip\";\n FileOutputStream fos;\n try {\n fos = new FileOutputStream(zipPath);\n ZipOutputStream zipOut = new ZipOutputStream(fos);\n FileInputStream fis = new FileInputStream(fileToZip);\n ZipEntry zipEntry = new ZipEntry(fileToZip.getName());\n zipOut.putNextEntry(zipEntry);\n byte[] bytes = new byte[1024];\n int length;\n while ((length = fis.read(bytes)) >= 0) {\n zipOut.write(bytes, 0, length);\n }\n fis.close();\n zipOut.close();\n fos.close();\n // verify zip\n ZipValidator zipValidator = new ZipValidator(new File(zipPath));\n if (zipValidator.isValid()) {\n return 0;\n }\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (Throwable e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return -1;\n}","start_line":90,"end_line":130,"return_type":"int","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.zip.ZipOutputStream","java.io.FileOutputStream","com.acme.modres.util.ZipValidator","java.lang.String","java.io.FileInputStream","java.util.zip.ZipEntry","java.io.File"],"accessed_fields":[],"call_sites":[{"method_name":"getFileFromRelativePath","receiver_expr":"IOUtils","receiver_type":"com.acme.modres.mbean.IOUtils","argument_types":["java.lang.String"],"return_type":"java.io.File","callee_signature":"getFileFromRelativePath(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":91,"start_column":20,"end_line":91,"end_column":71},{"method_name":"getProperty","receiver_expr":"System","receiver_type":"java.lang.System","argument_types":["java.lang.String"],"return_type":"java.lang.String","callee_signature":"getProperty(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":92,"start_column":26,"end_line":92,"end_column":56},{"method_name":"getName","receiver_expr":"fileToZip","receiver_type":"java.io.File","argument_types":[],"return_type":"java.lang.String","callee_signature":"getName()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":101,"start_column":37,"end_line":101,"end_column":55},{"method_name":"putNextEntry","receiver_expr":"zipOut","receiver_type":"java.util.zip.ZipOutputStream","argument_types":["java.util.zip.ZipEntry"],"return_type":"","callee_signature":"putNextEntry(java.util.zip.ZipEntry)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":102,"start_column":4,"end_line":102,"end_column":32},{"method_name":"read","receiver_expr":"fis","receiver_type":"java.io.FileInputStream","argument_types":[""],"return_type":"","callee_signature":"read(byte[])","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":106,"start_column":20,"end_line":106,"end_column":34},{"method_name":"write","receiver_expr":"zipOut","receiver_type":"java.util.zip.ZipOutputStream","argument_types":["","",""],"return_type":"","callee_signature":"write(byte[], int, int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":107,"start_column":5,"end_line":107,"end_column":34},{"method_name":"close","receiver_expr":"fis","receiver_type":"java.io.FileInputStream","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":109,"start_column":4,"end_line":109,"end_column":14},{"method_name":"close","receiver_expr":"zipOut","receiver_type":"java.util.zip.ZipOutputStream","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":111,"start_column":4,"end_line":111,"end_column":17},{"method_name":"close","receiver_expr":"fos","receiver_type":"java.io.FileOutputStream","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":112,"start_column":4,"end_line":112,"end_column":14},{"method_name":"isValid","receiver_expr":"zipValidator","receiver_type":"com.acme.modres.util.ZipValidator","argument_types":[],"return_type":"","callee_signature":"isValid()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":116,"start_column":7,"end_line":116,"end_column":28},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"java.io.FileNotFoundException","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":121,"start_column":4,"end_line":121,"end_column":22},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"java.io.IOException","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":124,"start_column":4,"end_line":124,"end_column":22},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"java.lang.Throwable","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":127,"start_column":4,"end_line":127,"end_column":22},{"method_name":"","receiver_expr":"","receiver_type":"java.io.FileOutputStream","argument_types":["java.lang.String"],"return_type":"java.io.FileOutputStream","callee_signature":"FileOutputStream(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":97,"start_column":10,"end_line":97,"end_column":38},{"method_name":"","receiver_expr":"","receiver_type":"java.util.zip.ZipOutputStream","argument_types":["java.io.FileOutputStream"],"return_type":"java.util.zip.ZipOutputStream","callee_signature":"ZipOutputStream(java.io.OutputStream)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":98,"start_column":29,"end_line":98,"end_column":52},{"method_name":"","receiver_expr":"","receiver_type":"java.io.FileInputStream","argument_types":["java.io.File"],"return_type":"java.io.FileInputStream","callee_signature":"FileInputStream(java.io.File)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":100,"start_column":26,"end_line":100,"end_column":55},{"method_name":"","receiver_expr":"","receiver_type":"java.util.zip.ZipEntry","argument_types":["java.lang.String"],"return_type":"java.util.zip.ZipEntry","callee_signature":"ZipEntry(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":101,"start_column":24,"end_line":101,"end_column":56},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.util.ZipValidator","argument_types":["java.io.File"],"return_type":"com.acme.modres.util.ZipValidator","callee_signature":"ZipValidator(java.io.File)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":115,"start_column":32,"end_line":115,"end_column":66},{"method_name":"","receiver_expr":"","receiver_type":"java.io.File","argument_types":["java.lang.String"],"return_type":"java.io.File","callee_signature":"File(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":115,"start_column":49,"end_line":115,"end_column":65}],"variable_declarations":[{"name":"fileToZip","type":"java.io.File","initializer":"IOUtils.getFileFromRelativePath(\"reservations.json\")","start_line":91,"start_column":8,"end_line":91,"end_column":71},{"name":"userDirectory","type":"java.lang.String","initializer":"System.getProperty(\"user.home\")","start_line":92,"start_column":10,"end_line":92,"end_column":56},{"name":"zipPath","type":"java.lang.String","initializer":"userDirectory + \"/reservations.zip\"","start_line":93,"start_column":10,"end_line":93,"end_column":54},{"name":"fos","type":"java.io.FileOutputStream","initializer":"","start_line":95,"start_column":20,"end_line":95,"end_column":22},{"name":"zipOut","type":"java.util.zip.ZipOutputStream","initializer":"new ZipOutputStream(fos)","start_line":98,"start_column":20,"end_line":98,"end_column":52},{"name":"fis","type":"java.io.FileInputStream","initializer":"new FileInputStream(fileToZip)","start_line":100,"start_column":20,"end_line":100,"end_column":55},{"name":"zipEntry","type":"java.util.zip.ZipEntry","initializer":"new ZipEntry(fileToZip.getName())","start_line":101,"start_column":13,"end_line":101,"end_column":56},{"name":"bytes","type":"byte[]","initializer":"new byte[1024]","start_line":104,"start_column":11,"end_line":104,"end_column":32},{"name":"length","type":"int","initializer":"","start_line":105,"start_column":8,"end_line":105,"end_column":13},{"name":"zipValidator","type":"com.acme.modres.util.ZipValidator","initializer":"new ZipValidator(new File(zipPath))","start_line":115,"start_column":17,"end_line":115,"end_column":66}],"cyclomatic_complexity":3},"init()":{"signature":"init()","comment":"","annotations":["@Override"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void init()","parameters":[],"code":"{\n // load reserved dates\n this.reservationCheckerData = new ReservationCheckerData(IOUtils.getReservationListFromConfig());\n}","start_line":37,"end_line":41,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.mbean.reservation.ReservationCheckerData"],"accessed_fields":["com.acme.modres.AvailabilityCheckerServlet.reservationCheckerData"],"call_sites":[{"method_name":"getReservationListFromConfig","receiver_expr":"IOUtils","receiver_type":"com.acme.modres.mbean.IOUtils","argument_types":[],"return_type":"com.acme.modres.mbean.reservation.ReservationList","callee_signature":"getReservationListFromConfig()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":40,"start_column":60,"end_line":40,"end_column":97},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.reservation.ReservationCheckerData","argument_types":["com.acme.modres.mbean.reservation.ReservationList"],"return_type":"com.acme.modres.mbean.reservation.ReservationCheckerData","callee_signature":"ReservationCheckerData(com.acme.modres.mbean.reservation.ReservationList)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":40,"start_column":33,"end_line":40,"end_column":98}],"variable_declarations":[],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"long","start_line":29,"end_line":29,"variables":["serialVersionUID"],"modifiers":["private","static","final"],"annotations":[]},{"comment":"","type":"java.util.logging.Logger","start_line":31,"end_line":31,"variables":["logger"],"modifiers":["private","static","final"],"annotations":[]},{"comment":"","type":"javax.naming.InitialContext","start_line":33,"end_line":33,"variables":["context"],"modifiers":["private","static"],"annotations":[]},{"comment":"","type":"com.acme.modres.mbean.reservation.ReservationCheckerData","start_line":35,"end_line":35,"variables":["reservationCheckerData"],"modifiers":["private"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/JsonInputStream.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/JsonInputStream.java","comment":"","imports":["java.io.BufferedReader","java.io.File","java.io.FileInputStream","java.io.FileNotFoundException","java.io.IOException","java.io.InputStreamReader","com.google.gson.Gson"],"type_declarations":{"com.acme.modres.util.JsonInputStream":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":["java.io.FileInputStream"],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"parseJsonAs(Class)":{"signature":"parseJsonAs(Class)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public Object parseJsonAs(Class cls)","parameters":[{"type":"java.lang.Class","name":"cls","annotations":[],"modifiers":[]}],"code":"{\n if (file.exists()) {\n JsonInputStream is = null;\n Object jsonObject = null;\n try {\n is = new JsonInputStream(file);\n Gson gson = new Gson();\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n jsonObject = gson.fromJson(reader, cls);\n } catch (Exception e) {\n e.printStackTrace();\n } catch (Throwable e) {\n e.printStackTrace();\n } finally {\n if (is != null) {\n try {\n is.close();\n // test if file is closed\n is.read();\n } catch (IOException e) {\n // closed successfully\n return jsonObject;\n } catch (Throwable e) {\n e.printStackTrace();\n }\n }\n }\n }\n return null;\n}","start_line":21,"end_line":49,"return_type":"java.lang.Object","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.util.JsonInputStream","com.google.gson.Gson","java.lang.Object","java.io.BufferedReader"],"accessed_fields":["com.acme.modres.util.JsonInputStream.file"],"call_sites":[{"method_name":"exists","receiver_expr":"file","receiver_type":"java.io.File","argument_types":[],"return_type":"","callee_signature":"exists()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":22,"start_column":13,"end_line":22,"end_column":25},{"method_name":"fromJson","receiver_expr":"gson","receiver_type":"com.google.gson.Gson","argument_types":["java.io.BufferedReader","java.lang.Class"],"return_type":"","callee_signature":"fromJson(java.io.Reader, java.lang.Class)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":29,"start_column":30,"end_line":29,"end_column":55},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"java.lang.Exception","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":31,"start_column":17,"end_line":31,"end_column":35},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"java.lang.Throwable","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":33,"start_column":17,"end_line":33,"end_column":35},{"method_name":"close","receiver_expr":"is","receiver_type":"com.acme.modres.util.JsonInputStream","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":37,"start_column":25,"end_line":37,"end_column":34},{"method_name":"read","receiver_expr":"is","receiver_type":"com.acme.modres.util.JsonInputStream","argument_types":[],"return_type":"","callee_signature":"read()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":38,"start_column":25,"end_line":38,"end_column":33},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"java.lang.Throwable","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":43,"start_column":25,"end_line":43,"end_column":43},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.util.JsonInputStream","argument_types":["java.io.File"],"return_type":"com.acme.modres.util.JsonInputStream","callee_signature":"JsonInputStream(java.io.File)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":26,"start_column":22,"end_line":26,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"com.google.gson.Gson","argument_types":[],"return_type":"com.google.gson.Gson","callee_signature":"Gson()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":27,"start_column":29,"end_line":27,"end_column":38},{"method_name":"","receiver_expr":"","receiver_type":"java.io.BufferedReader","argument_types":["java.io.InputStreamReader"],"return_type":"java.io.BufferedReader","callee_signature":"BufferedReader(java.io.Reader)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":28,"start_column":41,"end_line":28,"end_column":85},{"method_name":"","receiver_expr":"","receiver_type":"java.io.InputStreamReader","argument_types":["com.acme.modres.util.JsonInputStream"],"return_type":"java.io.InputStreamReader","callee_signature":"InputStreamReader(java.io.InputStream)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":28,"start_column":60,"end_line":28,"end_column":84}],"variable_declarations":[{"name":"is","type":"com.acme.modres.util.JsonInputStream","initializer":"null","start_line":23,"start_column":29,"end_line":23,"end_column":37},{"name":"jsonObject","type":"java.lang.Object","initializer":"null","start_line":24,"start_column":20,"end_line":24,"end_column":36},{"name":"gson","type":"com.google.gson.Gson","initializer":"new Gson()","start_line":27,"start_column":22,"end_line":27,"end_column":38},{"name":"reader","type":"java.io.BufferedReader","initializer":"new BufferedReader(new InputStreamReader(is))","start_line":28,"start_column":32,"end_line":28,"end_column":85}],"cyclomatic_complexity":6},"(File)":{"signature":"JsonInputStream(File)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":["java.io.FileNotFoundException"],"declaration":"public JsonInputStream(File file) throws FileNotFoundException","parameters":[{"type":"java.io.File","name":"file","annotations":[],"modifiers":[]}],"code":"{\n super(file);\n this.file = file;\n}","start_line":16,"end_line":19,"is_implicit":false,"is_constructor":true,"referenced_types":["java.io.File"],"accessed_fields":["com.acme.modres.util.JsonInputStream.file"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"java.io.File","start_line":14,"end_line":14,"variables":["file"],"modifiers":["private"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/ReservationList.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/ReservationList.java","comment":"","imports":["java.util.ArrayList","java.util.List"],"type_declarations":{"com.acme.modres.mbean.reservation.ReservationList":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"add(Reservation)":{"signature":"add(Reservation)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void add(Reservation reservation)","parameters":[{"type":"com.acme.modres.mbean.reservation.Reservation","name":"reservation","annotations":[],"modifiers":[]}],"code":"{\n reservations.add(reservation);\n}","start_line":18,"end_line":20,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.reservation.ReservationList.reservations"],"call_sites":[{"method_name":"add","receiver_expr":"reservations","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.reservation.Reservation"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":19,"start_column":3,"end_line":19,"end_column":31}],"variable_declarations":[],"cyclomatic_complexity":1},"()":{"signature":"ReservationList()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public ReservationList()","parameters":[],"code":"{\n}","start_line":10,"end_line":12,"is_implicit":false,"is_constructor":true,"referenced_types":[],"accessed_fields":[],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"(List)":{"signature":"ReservationList(List)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public ReservationList(List reservations)","parameters":[{"type":"java.util.List","name":"reservations","annotations":[],"modifiers":[]}],"code":"{\n this.reservations = reservations;\n}","start_line":14,"end_line":16,"is_implicit":false,"is_constructor":true,"referenced_types":["java.util.List"],"accessed_fields":["com.acme.modres.mbean.reservation.ReservationList.reservations"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":0},"getReservations()":{"signature":"getReservations()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public List getReservations()","parameters":[],"code":"{\n return reservations;\n}","start_line":22,"end_line":24,"return_type":"java.util.List","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.reservation.ReservationList.reservations"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"java.util.List","start_line":8,"end_line":8,"variables":["reservations"],"modifiers":["private"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WelcomeServlet.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WelcomeServlet.java","comment":"","imports":["java.io.IOException","java.io.PrintWriter","javax.servlet.ServletException","javax.servlet.annotation.WebServlet","javax.servlet.http.HttpServlet","javax.servlet.http.HttpServletRequest","javax.servlet.http.HttpServletResponse","com.ibm.websphere.servlet.filter.ServletChain"],"type_declarations":{"com.acme.modres.WelcomeServlet":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":["javax.servlet.http.HttpServlet"],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":["@WebServlet(\"/resorts/welcome\")"],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"doGet(HttpServletRequest, HttpServletResponse)":{"signature":"doGet(HttpServletRequest, HttpServletResponse)","comment":"","annotations":["@Override"],"modifiers":["protected"],"thrown_exceptions":["javax.servlet.ServletException","java.io.IOException"],"declaration":"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException","parameters":[{"type":"javax.servlet.http.HttpServletRequest","name":"request","annotations":[],"modifiers":[]},{"type":"javax.servlet.http.HttpServletResponse","name":"response","annotations":[],"modifiers":[]}],"code":"{\n response.setContentType(\"text/plain\");\n ServletChain servletChain = new ServletChain();\n servletChain.addRequestDispatcher(request.getRequestDispatcher(\"/first\"));\n servletChain.addRequestDispatcher(request.getRequestDispatcher(\"/second\"));\n servletChain.include(request, response);\n PrintWriter out = response.getWriter();\n out.println(\" Enjoy!\");\n}","start_line":19,"end_line":30,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.io.PrintWriter","com.ibm.websphere.servlet.filter.ServletChain"],"accessed_fields":[],"call_sites":[{"method_name":"setContentType","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setContentType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":21,"start_column":3,"end_line":21,"end_column":39},{"method_name":"addRequestDispatcher","receiver_expr":"servletChain","receiver_type":"com.ibm.websphere.servlet.filter.ServletChain","argument_types":["javax.servlet.RequestDispatcher"],"return_type":"","callee_signature":"addRequestDispatcher(javax.servlet.RequestDispatcher)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":24,"start_column":3,"end_line":24,"end_column":75},{"method_name":"getRequestDispatcher","receiver_expr":"request","receiver_type":"javax.servlet.http.HttpServletRequest","argument_types":["java.lang.String"],"return_type":"javax.servlet.RequestDispatcher","callee_signature":"getRequestDispatcher(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":24,"start_column":37,"end_line":24,"end_column":74},{"method_name":"addRequestDispatcher","receiver_expr":"servletChain","receiver_type":"com.ibm.websphere.servlet.filter.ServletChain","argument_types":["javax.servlet.RequestDispatcher"],"return_type":"","callee_signature":"addRequestDispatcher(javax.servlet.RequestDispatcher)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":25,"start_column":3,"end_line":25,"end_column":76},{"method_name":"getRequestDispatcher","receiver_expr":"request","receiver_type":"javax.servlet.http.HttpServletRequest","argument_types":["java.lang.String"],"return_type":"javax.servlet.RequestDispatcher","callee_signature":"getRequestDispatcher(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":25,"start_column":37,"end_line":25,"end_column":75},{"method_name":"include","receiver_expr":"servletChain","receiver_type":"com.ibm.websphere.servlet.filter.ServletChain","argument_types":["javax.servlet.http.HttpServletRequest","javax.servlet.http.HttpServletResponse"],"return_type":"","callee_signature":"include(javax.servlet.ServletRequest, javax.servlet.ServletResponse)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":26,"start_column":3,"end_line":26,"end_column":41},{"method_name":"getWriter","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":[],"return_type":"java.io.PrintWriter","callee_signature":"getWriter()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":28,"start_column":21,"end_line":28,"end_column":40},{"method_name":"println","receiver_expr":"out","receiver_type":"java.io.PrintWriter","argument_types":["java.lang.String"],"return_type":"","callee_signature":"println(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":29,"start_column":9,"end_line":29,"end_column":30},{"method_name":"","receiver_expr":"","receiver_type":"com.ibm.websphere.servlet.filter.ServletChain","argument_types":[],"return_type":"com.ibm.websphere.servlet.filter.ServletChain","callee_signature":"ServletChain()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":23,"start_column":31,"end_line":23,"end_column":48}],"variable_declarations":[{"name":"servletChain","type":"com.ibm.websphere.servlet.filter.ServletChain","initializer":"new ServletChain()","start_line":23,"start_column":16,"end_line":23,"end_column":48},{"name":"out","type":"java.io.PrintWriter","initializer":"response.getWriter()","start_line":28,"start_column":15,"end_line":28,"end_column":40}],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"long","start_line":17,"end_line":17,"variables":["serialVersionUID"],"modifiers":["private","static","final"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/Constants.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/Constants.java","comment":"","imports":[],"type_declarations":{"com.acme.modres.Constants":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{},"field_declarations":[{"comment":"","type":"java.lang.String","start_line":5,"end_line":5,"variables":["BARCELONA"],"modifiers":["public","static","final"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":6,"end_line":6,"variables":["CORK"],"modifiers":["public","static","final"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":7,"end_line":7,"variables":["MIAMI"],"modifiers":["public","static","final"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":8,"end_line":8,"variables":["SAN_FRANCISCO"],"modifiers":["public","static","final"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":9,"end_line":9,"variables":["PARIS"],"modifiers":["public","final","static"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":10,"end_line":10,"variables":["LAS_VEGAS"],"modifiers":["public","static","final"],"annotations":[]},{"comment":"","type":"java.lang.String[]","start_line":12,"end_line":12,"variables":["SUPPORTED_CITIES"],"modifiers":["public","final","static"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":21,"end_line":21,"variables":["BACELONA_WEATHER_FILE"],"modifiers":["public","final","static"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":22,"end_line":22,"variables":["CORK_WEATHER_FILE"],"modifiers":["public","final","static"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":23,"end_line":23,"variables":["LAS_VEGAS_WEATHER_FILE"],"modifiers":["public","final","static"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":24,"end_line":24,"variables":["MIAMI_WEATHER_FILE"],"modifiers":["public","final","static"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":25,"end_line":25,"variables":["PARIS_WEATHER_FILE"],"modifiers":["public","final","static"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":26,"end_line":26,"variables":["SAN_FRANCESCO_WEATHER_FILE"],"modifiers":["public","final","static"],"annotations":[]},{"comment":"// constants used to construct Weather Underground API","type":"java.lang.String","start_line":29,"end_line":29,"variables":["WUNDERGROUND_API_PREFIX"],"modifiers":["public","final","static"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":30,"end_line":30,"variables":["WUNDERGROUND_API_PART"],"modifiers":["public","final","static"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":32,"end_line":32,"variables":["DATA_FORMAT"],"modifiers":["public","final","static"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","comment":"","imports":["com.acme.modres.db.ModResortsCustomerInformation","com.acme.modres.exception.ExceptionHandler","com.acme.modres.mbean.AppInfo","java.io.BufferedReader","java.io.IOException","java.io.InputStreamReader","java.lang.management.ManagementFactory","java.net.HttpURLConnection","java.net.MalformedURLException","java.net.ProtocolException","java.net.URL","java.util.Hashtable","java.util.logging.Level","java.util.logging.Logger","javax.servlet.ServletException","javax.servlet.ServletOutputStream","javax.servlet.http.HttpServlet","javax.servlet.http.HttpServletRequest","javax.servlet.http.HttpServletResponse","javax.inject.Inject","javax.management.InstanceAlreadyExistsException","javax.management.InstanceNotFoundException","javax.management.IntrospectionException","javax.management.MBeanInfo","javax.management.MBeanRegistrationException","javax.management.MBeanServer","javax.management.MalformedObjectNameException","javax.management.NotCompliantMBeanException","javax.management.ObjectInstance","javax.management.ObjectName","javax.management.ReflectionException","javax.naming.InitialContext","javax.naming.NamingException","javax.servlet.annotation.WebServlet"],"type_declarations":{"com.acme.modres.WeatherServlet":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":["javax.servlet.http.HttpServlet"],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":["@WebServlet({ \"/resorts/weather\" })"],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"destroy()":{"signature":"destroy()","comment":"","annotations":["@Override"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void destroy()","parameters":[],"code":"{\n if (mbean != null) {\n try {\n server.unregisterMBean(weatherON);\n } catch (MBeanRegistrationException | InstanceNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n}","start_line":83,"end_line":93,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.WeatherServlet.weatherON","com.acme.modres.WeatherServlet.server","com.acme.modres.WeatherServlet.mbean"],"call_sites":[{"method_name":"unregisterMBean","receiver_expr":"server","receiver_type":"javax.management.MBeanServer","argument_types":["javax.management.ObjectName"],"return_type":"","callee_signature":"unregisterMBean(javax.management.ObjectName)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":87,"start_column":5,"end_line":87,"end_column":37},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"javax.management.MBeanRegistrationException","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":90,"start_column":5,"end_line":90,"end_column":23}],"variable_declarations":[],"cyclomatic_complexity":2},"getRealTimeWeatherData(String, String, HttpServletResponse)":{"signature":"getRealTimeWeatherData(String, String, HttpServletResponse)","comment":"","annotations":[],"modifiers":["private"],"thrown_exceptions":["javax.servlet.ServletException","java.io.IOException"],"declaration":"private void getRealTimeWeatherData(String city, String apiKey, HttpServletResponse response) throws ServletException, IOException","parameters":[{"type":"java.lang.String","name":"city","annotations":[],"modifiers":[]},{"type":"java.lang.String","name":"apiKey","annotations":[],"modifiers":[]},{"type":"javax.servlet.http.HttpServletResponse","name":"response","annotations":[],"modifiers":[]}],"code":"{\n String resturl = null;\n String resturlbase = Constants.WUNDERGROUND_API_PREFIX + apiKey + Constants.WUNDERGROUND_API_PART;\n if (Constants.PARIS.equals(city)) {\n resturl = resturlbase + \"France/Paris.json\";\n } else if (Constants.LAS_VEGAS.equals(city)) {\n resturl = resturlbase + \"NV/Las_Vegas.json\";\n } else if (Constants.SAN_FRANCISCO.equals(city)) {\n resturl = resturlbase + \"/CA/San_Francisco.json\";\n } else if (Constants.MIAMI.equals(city)) {\n resturl = resturlbase + \"FL/Miami.json\";\n } else if (Constants.CORK.equals(city)) {\n resturl = resturlbase + \"ireland/cork.json\";\n } else if (Constants.BARCELONA.equals(city)) {\n resturl = resturlbase + \"Spain/Barcelona.json\";\n } else {\n String errorMsg = \"Sorry, the weather information for your selected city: \" + city + \" is not available. Valid selections are: \" + Constants.SUPPORTED_CITIES;\n ExceptionHandler.handleException(null, errorMsg, logger);\n }\n URL obj = null;\n HttpURLConnection con = null;\n try {\n obj = new URL(resturl);\n con = (HttpURLConnection) obj.openConnection();\n con.setRequestMethod(\"GET\");\n } catch (MalformedURLException e1) {\n String errorMsg = \"Caught MalformedURLException. Please make sure the url is correct.\";\n ExceptionHandler.handleException(e1, errorMsg, logger);\n } catch (ProtocolException e2) {\n String errorMsg = \"Caught ProtocolException: \" + e2.getMessage() + \". Not able to set request method to http connection.\";\n ExceptionHandler.handleException(e2, errorMsg, logger);\n } catch (IOException e3) {\n String errorMsg = \"Caught IOException: \" + e3.getMessage() + \". Not able to open connection.\";\n ExceptionHandler.handleException(e3, errorMsg, logger);\n }\n int responseCode = con.getResponseCode();\n logger.log(Level.FINEST, \"Response Code: \" + responseCode);\n if (responseCode >= 200 && responseCode < 300) {\n BufferedReader in = null;\n ServletOutputStream out = null;\n try {\n in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n String inputLine = null;\n StringBuffer responseStr = new StringBuffer();\n while ((inputLine = in.readLine()) != null) {\n responseStr.append(inputLine);\n }\n response.setContentType(\"application/json\");\n out = response.getOutputStream();\n out.print(responseStr.toString());\n logger.log(Level.FINE, \"responseStr: \" + responseStr);\n } catch (Exception e) {\n String errorMsg = \"Problem occured when processing the weather server response.\";\n ExceptionHandler.handleException(e, errorMsg, logger);\n } finally {\n if (in != null) {\n in.close();\n }\n if (out != null) {\n out.close();\n }\n in = null;\n out = null;\n }\n } else {\n String errorMsg = \"REST API call \" + resturl + \" returns an error response: \" + responseCode;\n ExceptionHandler.handleException(null, errorMsg, logger);\n }\n}","start_line":125,"end_line":203,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.net.HttpURLConnection","javax.servlet.ServletOutputStream","java.net.URL","java.lang.StringBuffer","java.lang.String","java.io.BufferedReader","java.util.logging.Level"],"accessed_fields":["com.acme.modres.WeatherServlet.logger","com.acme.modres.Constants.BARCELONA","com.acme.modres.Constants.CORK","com.acme.modres.Constants.WUNDERGROUND_API_PREFIX","com.acme.modres.Constants.PARIS","com.acme.modres.Constants.LAS_VEGAS","com.acme.modres.Constants.MIAMI","com.acme.modres.Constants.SUPPORTED_CITIES","com.acme.modres.Constants.SAN_FRANCISCO","com.acme.modres.Constants.WUNDERGROUND_API_PART","java.util.logging.Level.FINEST","java.util.logging.Level.FINE"],"call_sites":[{"method_name":"equals","receiver_expr":"Constants.PARIS","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":130,"start_column":10,"end_line":130,"end_column":37},{"method_name":"equals","receiver_expr":"Constants.LAS_VEGAS","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":132,"start_column":21,"end_line":132,"end_column":52},{"method_name":"equals","receiver_expr":"Constants.SAN_FRANCISCO","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":134,"start_column":21,"end_line":134,"end_column":56},{"method_name":"equals","receiver_expr":"Constants.MIAMI","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":136,"start_column":21,"end_line":136,"end_column":48},{"method_name":"equals","receiver_expr":"Constants.CORK","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":138,"start_column":21,"end_line":138,"end_column":47},{"method_name":"equals","receiver_expr":"Constants.BARCELONA","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":140,"start_column":21,"end_line":140,"end_column":52},{"method_name":"handleException","receiver_expr":"ExceptionHandler","receiver_type":"com.acme.modres.exception.ExceptionHandler","argument_types":["","java.lang.String","java.util.logging.Logger"],"return_type":"","callee_signature":"handleException(java.lang.Exception, java.lang.String, java.util.logging.Logger)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":145,"start_column":4,"end_line":145,"end_column":59},{"method_name":"openConnection","receiver_expr":"obj","receiver_type":"java.net.URL","argument_types":[],"return_type":"java.net.HttpURLConnection","callee_signature":"openConnection()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":152,"start_column":30,"end_line":152,"end_column":49},{"method_name":"setRequestMethod","receiver_expr":"con","receiver_type":"java.net.HttpURLConnection","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setRequestMethod(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":153,"start_column":4,"end_line":153,"end_column":30},{"method_name":"handleException","receiver_expr":"ExceptionHandler","receiver_type":"com.acme.modres.exception.ExceptionHandler","argument_types":["java.net.MalformedURLException","java.lang.String","java.util.logging.Logger"],"return_type":"","callee_signature":"handleException(java.lang.Exception, java.lang.String, java.util.logging.Logger)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":156,"start_column":4,"end_line":156,"end_column":57},{"method_name":"getMessage","receiver_expr":"e2","receiver_type":"java.net.ProtocolException","argument_types":[],"return_type":"java.lang.String","callee_signature":"getMessage()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":158,"start_column":53,"end_line":158,"end_column":67},{"method_name":"handleException","receiver_expr":"ExceptionHandler","receiver_type":"com.acme.modres.exception.ExceptionHandler","argument_types":["java.net.ProtocolException","java.lang.String","java.util.logging.Logger"],"return_type":"","callee_signature":"handleException(java.lang.Exception, java.lang.String, java.util.logging.Logger)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":159,"start_column":4,"end_line":159,"end_column":57},{"method_name":"getMessage","receiver_expr":"e3","receiver_type":"java.io.IOException","argument_types":[],"return_type":"java.lang.String","callee_signature":"getMessage()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":161,"start_column":47,"end_line":161,"end_column":61},{"method_name":"handleException","receiver_expr":"ExceptionHandler","receiver_type":"com.acme.modres.exception.ExceptionHandler","argument_types":["java.io.IOException","java.lang.String","java.util.logging.Logger"],"return_type":"","callee_signature":"handleException(java.lang.Exception, java.lang.String, java.util.logging.Logger)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":162,"start_column":4,"end_line":162,"end_column":57},{"method_name":"getResponseCode","receiver_expr":"con","receiver_type":"java.net.HttpURLConnection","argument_types":[],"return_type":"","callee_signature":"getResponseCode()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":165,"start_column":22,"end_line":165,"end_column":42},{"method_name":"log","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.util.logging.Level","java.lang.String"],"return_type":"","callee_signature":"log(java.util.logging.Level, java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":166,"start_column":3,"end_line":166,"end_column":60},{"method_name":"getInputStream","receiver_expr":"con","receiver_type":"java.net.HttpURLConnection","argument_types":[],"return_type":"java.io.InputStream","callee_signature":"getInputStream()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":174,"start_column":51,"end_line":174,"end_column":70},{"method_name":"readLine","receiver_expr":"in","receiver_type":"java.io.BufferedReader","argument_types":[],"return_type":"java.lang.String","callee_signature":"readLine()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":178,"start_column":25,"end_line":178,"end_column":37},{"method_name":"append","receiver_expr":"responseStr","receiver_type":"java.lang.StringBuffer","argument_types":["java.lang.String"],"return_type":"java.lang.StringBuffer","callee_signature":"append(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":179,"start_column":6,"end_line":179,"end_column":34},{"method_name":"setContentType","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setContentType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":182,"start_column":5,"end_line":182,"end_column":47},{"method_name":"getOutputStream","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":[],"return_type":"javax.servlet.ServletOutputStream","callee_signature":"getOutputStream()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":183,"start_column":11,"end_line":183,"end_column":36},{"method_name":"print","receiver_expr":"out","receiver_type":"javax.servlet.ServletOutputStream","argument_types":["java.lang.String"],"return_type":"","callee_signature":"print(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":184,"start_column":5,"end_line":184,"end_column":37},{"method_name":"toString","receiver_expr":"responseStr","receiver_type":"java.lang.StringBuffer","argument_types":[],"return_type":"java.lang.String","callee_signature":"toString()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":184,"start_column":15,"end_line":184,"end_column":36},{"method_name":"log","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.util.logging.Level","java.lang.String"],"return_type":"","callee_signature":"log(java.util.logging.Level, java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":185,"start_column":5,"end_line":185,"end_column":57},{"method_name":"handleException","receiver_expr":"ExceptionHandler","receiver_type":"com.acme.modres.exception.ExceptionHandler","argument_types":["java.lang.Exception","java.lang.String","java.util.logging.Logger"],"return_type":"","callee_signature":"handleException(java.lang.Exception, java.lang.String, java.util.logging.Logger)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":188,"start_column":5,"end_line":188,"end_column":57},{"method_name":"close","receiver_expr":"in","receiver_type":"java.io.BufferedReader","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":191,"start_column":6,"end_line":191,"end_column":15},{"method_name":"close","receiver_expr":"out","receiver_type":"javax.servlet.ServletOutputStream","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":194,"start_column":6,"end_line":194,"end_column":16},{"method_name":"handleException","receiver_expr":"ExceptionHandler","receiver_type":"com.acme.modres.exception.ExceptionHandler","argument_types":["","java.lang.String","java.util.logging.Logger"],"return_type":"","callee_signature":"handleException(java.lang.Exception, java.lang.String, java.util.logging.Logger)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":201,"start_column":4,"end_line":201,"end_column":59},{"method_name":"","receiver_expr":"","receiver_type":"java.net.URL","argument_types":["java.lang.String"],"return_type":"java.net.URL","callee_signature":"URL(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":151,"start_column":10,"end_line":151,"end_column":25},{"method_name":"","receiver_expr":"","receiver_type":"java.io.BufferedReader","argument_types":["java.io.InputStreamReader"],"return_type":"java.io.BufferedReader","callee_signature":"BufferedReader(java.io.Reader)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":174,"start_column":10,"end_line":174,"end_column":72},{"method_name":"","receiver_expr":"","receiver_type":"java.io.InputStreamReader","argument_types":["java.io.InputStream"],"return_type":"java.io.InputStreamReader","callee_signature":"InputStreamReader(java.io.InputStream)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":174,"start_column":29,"end_line":174,"end_column":71},{"method_name":"","receiver_expr":"","receiver_type":"java.lang.StringBuffer","argument_types":[],"return_type":"java.lang.StringBuffer","callee_signature":"StringBuffer()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":176,"start_column":32,"end_line":176,"end_column":49}],"variable_declarations":[{"name":"resturl","type":"java.lang.String","initializer":"null","start_line":127,"start_column":10,"end_line":127,"end_column":23},{"name":"resturlbase","type":"java.lang.String","initializer":"Constants.WUNDERGROUND_API_PREFIX + apiKey + Constants.WUNDERGROUND_API_PART","start_line":128,"start_column":10,"end_line":128,"end_column":99},{"name":"errorMsg","type":"java.lang.String","initializer":"\"Sorry, the weather information for your selected city: \" + city + \" is not available. Valid selections are: \" + Constants.SUPPORTED_CITIES","start_line":143,"start_column":11,"end_line":144,"end_column":78},{"name":"obj","type":"java.net.URL","initializer":"null","start_line":148,"start_column":7,"end_line":148,"end_column":16},{"name":"con","type":"java.net.HttpURLConnection","initializer":"null","start_line":149,"start_column":21,"end_line":149,"end_column":30},{"name":"errorMsg","type":"java.lang.String","initializer":"\"Caught MalformedURLException. Please make sure the url is correct.\"","start_line":155,"start_column":11,"end_line":155,"end_column":89},{"name":"errorMsg","type":"java.lang.String","initializer":"\"Caught ProtocolException: \" + e2.getMessage() + \". Not able to set request method to http connection.\"","start_line":158,"start_column":11,"end_line":158,"end_column":124},{"name":"errorMsg","type":"java.lang.String","initializer":"\"Caught IOException: \" + e3.getMessage() + \". Not able to open connection.\"","start_line":161,"start_column":11,"end_line":161,"end_column":96},{"name":"responseCode","type":"int","initializer":"con.getResponseCode()","start_line":165,"start_column":7,"end_line":165,"end_column":42},{"name":"in","type":"java.io.BufferedReader","initializer":"null","start_line":170,"start_column":19,"end_line":170,"end_column":27},{"name":"out","type":"javax.servlet.ServletOutputStream","initializer":"null","start_line":171,"start_column":24,"end_line":171,"end_column":33},{"name":"inputLine","type":"java.lang.String","initializer":"null","start_line":175,"start_column":12,"end_line":175,"end_column":27},{"name":"responseStr","type":"java.lang.StringBuffer","initializer":"new StringBuffer()","start_line":176,"start_column":18,"end_line":176,"end_column":49},{"name":"errorMsg","type":"java.lang.String","initializer":"\"Problem occured when processing the weather server response.\"","start_line":187,"start_column":12,"end_line":187,"end_column":84},{"name":"errorMsg","type":"java.lang.String","initializer":"\"REST API call \" + resturl + \" returns an error response: \" + responseCode","start_line":200,"start_column":11,"end_line":200,"end_column":95}],"cyclomatic_complexity":16},"doPost(HttpServletRequest, HttpServletResponse)":{"signature":"doPost(HttpServletRequest, HttpServletResponse)","comment":"/**\n\t * Returns the weather information for a given city\n\t */","annotations":[],"modifiers":["protected"],"thrown_exceptions":["javax.servlet.ServletException","java.io.IOException"],"declaration":"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException","parameters":[{"type":"javax.servlet.http.HttpServletRequest","name":"request","annotations":[],"modifiers":[]},{"type":"javax.servlet.http.HttpServletResponse","name":"response","annotations":[],"modifiers":[]}],"code":"{\n doGet(request, response);\n}","start_line":239,"end_line":243,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":[],"call_sites":[{"method_name":"doGet","receiver_expr":"","receiver_type":"","argument_types":["javax.servlet.http.HttpServletRequest","javax.servlet.http.HttpServletResponse"],"return_type":"","callee_signature":"doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)","is_public":false,"is_protected":true,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":242,"start_column":3,"end_line":242,"end_column":26}],"variable_declarations":[],"cyclomatic_complexity":1},"setInitialContextProps()":{"signature":"setInitialContextProps()","comment":"","annotations":[],"modifiers":["private"],"thrown_exceptions":[],"declaration":"private InitialContext setInitialContextProps()","parameters":[],"code":"{\n Hashtable ht = new Hashtable();\n ht.put(\"java.naming.factory.initial\", \"com.ibm.websphere.naming.WsnInitialContextFactory\");\n ht.put(\"java.naming.provider.url\", \"corbaloc:iiop:localhost:2809\");\n InitialContext ctx = null;\n try {\n ctx = new InitialContext(ht);\n } catch (NamingException e) {\n e.printStackTrace();\n }\n return ctx;\n}","start_line":263,"end_line":278,"return_type":"javax.naming.InitialContext","is_implicit":false,"is_constructor":false,"referenced_types":["javax.naming.InitialContext","java.util.Hashtable"],"accessed_fields":[],"call_sites":[{"method_name":"put","receiver_expr":"ht","receiver_type":"java.util.Hashtable","argument_types":["java.lang.String","java.lang.String"],"return_type":"java.lang.String","callee_signature":"put(K, V)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":267,"start_column":3,"end_line":267,"end_column":92},{"method_name":"put","receiver_expr":"ht","receiver_type":"java.util.Hashtable","argument_types":["java.lang.String","java.lang.String"],"return_type":"java.lang.String","callee_signature":"put(K, V)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":268,"start_column":3,"end_line":268,"end_column":68},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"javax.naming.NamingException","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":274,"start_column":4,"end_line":274,"end_column":22},{"method_name":"","receiver_expr":"","receiver_type":"java.util.Hashtable","argument_types":[],"return_type":"java.util.Hashtable","callee_signature":"Hashtable()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":265,"start_column":18,"end_line":265,"end_column":32},{"method_name":"","receiver_expr":"","receiver_type":"javax.naming.InitialContext","argument_types":["java.util.Hashtable"],"return_type":"javax.naming.InitialContext","callee_signature":"InitialContext(java.util.Hashtable)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":272,"start_column":10,"end_line":272,"end_column":31}],"variable_declarations":[{"name":"ht","type":"java.util.Hashtable","initializer":"new Hashtable()","start_line":265,"start_column":13,"end_line":265,"end_column":32},{"name":"ctx","type":"javax.naming.InitialContext","initializer":"null","start_line":270,"start_column":18,"end_line":270,"end_column":27}],"cyclomatic_complexity":1},"mockKey(String)":{"signature":"mockKey(String)","comment":"","annotations":[],"modifiers":["private","static"],"thrown_exceptions":[],"declaration":"private static String mockKey(String toBeMocked)","parameters":[{"type":"java.lang.String","name":"toBeMocked","annotations":[],"modifiers":[]}],"code":"{\n if (toBeMocked == null) {\n return null;\n }\n String lastToKeep = toBeMocked.substring(toBeMocked.length() - 3);\n return \"*********\" + lastToKeep;\n}","start_line":245,"end_line":251,"return_type":"java.lang.String","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.String"],"accessed_fields":[],"call_sites":[{"method_name":"substring","receiver_expr":"toBeMocked","receiver_type":"java.lang.String","argument_types":[""],"return_type":"java.lang.String","callee_signature":"substring(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":249,"start_column":23,"end_line":249,"end_column":65},{"method_name":"length","receiver_expr":"toBeMocked","receiver_type":"java.lang.String","argument_types":[],"return_type":"","callee_signature":"length()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":249,"start_column":44,"end_line":249,"end_column":62}],"variable_declarations":[{"name":"lastToKeep","type":"java.lang.String","initializer":"toBeMocked.substring(toBeMocked.length() - 3)","start_line":249,"start_column":10,"end_line":249,"end_column":65}],"cyclomatic_complexity":2},"doGet(HttpServletRequest, HttpServletResponse)":{"signature":"doGet(HttpServletRequest, HttpServletResponse)","comment":"","annotations":["@Override"],"modifiers":["protected"],"thrown_exceptions":["java.io.IOException","javax.servlet.ServletException"],"declaration":"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException","parameters":[{"type":"javax.servlet.http.HttpServletRequest","name":"request","annotations":[],"modifiers":[]},{"type":"javax.servlet.http.HttpServletResponse","name":"response","annotations":[],"modifiers":[]}],"code":"{\n String methodName = \"doGet\";\n logger.entering(WeatherServlet.class.getName(), methodName);\n try {\n MBeanInfo weatherConfig = server.getMBeanInfo(weatherON);\n } catch (IntrospectionException | InstanceNotFoundException | ReflectionException e) {\n e.printStackTrace();\n }\n String city = request.getParameter(\"selectedCity\");\n logger.log(Level.FINE, \"requested city is \" + city);\n String weatherAPIKey = System.getenv(WEATHER_API_KEY);\n String mockedKey = mockKey(weatherAPIKey);\n logger.log(Level.FINE, \"weatherAPIKey is \" + mockedKey);\n if (weatherAPIKey != null && weatherAPIKey.trim().length() > 0) {\n logger.info(\"weatherAPIKey is found, system will provide the real time weather data for the city \" + city);\n getRealTimeWeatherData(city, weatherAPIKey, response);\n } else {\n logger.info(\"weatherAPIKey is not found, will provide the weather data dated August 10th, 2018 for the city \" + city);\n getDefaultWeatherData(city, response);\n }\n}","start_line":95,"end_line":123,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.String","javax.management.MBeanInfo","java.util.logging.Level"],"accessed_fields":["com.acme.modres.WeatherServlet.logger","com.acme.modres.WeatherServlet.weatherON","com.acme.modres.WeatherServlet.WEATHER_API_KEY","com.acme.modres.WeatherServlet.server","java.util.logging.Level.FINE"],"call_sites":[{"method_name":"entering","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.lang.String","java.lang.String"],"return_type":"","callee_signature":"entering(java.lang.String, java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":101,"start_column":3,"end_line":101,"end_column":61},{"method_name":"getName","receiver_expr":"WeatherServlet.class","receiver_type":"java.lang.Class","argument_types":[],"return_type":"java.lang.String","callee_signature":"getName()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":101,"start_column":19,"end_line":101,"end_column":48},{"method_name":"getMBeanInfo","receiver_expr":"server","receiver_type":"javax.management.MBeanServer","argument_types":["javax.management.ObjectName"],"return_type":"javax.management.MBeanInfo","callee_signature":"getMBeanInfo(javax.management.ObjectName)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":104,"start_column":30,"end_line":104,"end_column":59},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"javax.management.IntrospectionException","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":106,"start_column":4,"end_line":106,"end_column":22},{"method_name":"getParameter","receiver_expr":"request","receiver_type":"javax.servlet.http.HttpServletRequest","argument_types":["java.lang.String"],"return_type":"java.lang.String","callee_signature":"getParameter(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":109,"start_column":17,"end_line":109,"end_column":52},{"method_name":"log","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.util.logging.Level","java.lang.String"],"return_type":"","callee_signature":"log(java.util.logging.Level, java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":110,"start_column":3,"end_line":110,"end_column":53},{"method_name":"getenv","receiver_expr":"System","receiver_type":"java.lang.System","argument_types":["java.lang.String"],"return_type":"java.lang.String","callee_signature":"getenv(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":112,"start_column":26,"end_line":112,"end_column":55},{"method_name":"mockKey","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String"],"return_type":"java.lang.String","callee_signature":"mockKey(java.lang.String)","is_public":false,"is_protected":false,"is_private":true,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":113,"start_column":22,"end_line":113,"end_column":43},{"method_name":"log","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.util.logging.Level","java.lang.String"],"return_type":"","callee_signature":"log(java.util.logging.Level, java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":114,"start_column":3,"end_line":114,"end_column":57},{"method_name":"length","receiver_expr":"weatherAPIKey.trim()","receiver_type":"java.lang.String","argument_types":[],"return_type":"","callee_signature":"length()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":116,"start_column":32,"end_line":116,"end_column":60},{"method_name":"trim","receiver_expr":"weatherAPIKey","receiver_type":"java.lang.String","argument_types":[],"return_type":"java.lang.String","callee_signature":"trim()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":116,"start_column":32,"end_line":116,"end_column":51},{"method_name":"info","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.lang.String"],"return_type":"","callee_signature":"info(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":117,"start_column":4,"end_line":117,"end_column":109},{"method_name":"getRealTimeWeatherData","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String","java.lang.String","javax.servlet.http.HttpServletResponse"],"return_type":"","callee_signature":"getRealTimeWeatherData(java.lang.String, java.lang.String, javax.servlet.http.HttpServletResponse)","is_public":false,"is_protected":false,"is_private":true,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":118,"start_column":4,"end_line":118,"end_column":56},{"method_name":"info","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.lang.String"],"return_type":"","callee_signature":"info(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":120,"start_column":4,"end_line":120,"end_column":120},{"method_name":"getDefaultWeatherData","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String","javax.servlet.http.HttpServletResponse"],"return_type":"","callee_signature":"getDefaultWeatherData(java.lang.String, javax.servlet.http.HttpServletResponse)","is_public":false,"is_protected":false,"is_private":true,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":121,"start_column":4,"end_line":121,"end_column":40}],"variable_declarations":[{"name":"methodName","type":"java.lang.String","initializer":"\"doGet\"","start_line":100,"start_column":16,"end_line":100,"end_column":35},{"name":"weatherConfig","type":"javax.management.MBeanInfo","initializer":"server.getMBeanInfo(weatherON)","start_line":104,"start_column":14,"end_line":104,"end_column":59},{"name":"city","type":"java.lang.String","initializer":"request.getParameter(\"selectedCity\")","start_line":109,"start_column":10,"end_line":109,"end_column":52},{"name":"weatherAPIKey","type":"java.lang.String","initializer":"System.getenv(WEATHER_API_KEY)","start_line":112,"start_column":10,"end_line":112,"end_column":55},{"name":"mockedKey","type":"java.lang.String","initializer":"mockKey(weatherAPIKey)","start_line":113,"start_column":10,"end_line":113,"end_column":43}],"cyclomatic_complexity":3},"getDefaultWeatherData(String, HttpServletResponse)":{"signature":"getDefaultWeatherData(String, HttpServletResponse)","comment":"","annotations":[],"modifiers":["private"],"thrown_exceptions":["javax.servlet.ServletException","java.io.IOException"],"declaration":"private void getDefaultWeatherData(String city, HttpServletResponse response) throws ServletException, IOException","parameters":[{"type":"java.lang.String","name":"city","annotations":[],"modifiers":[]},{"type":"javax.servlet.http.HttpServletResponse","name":"response","annotations":[],"modifiers":[]}],"code":"{\n DefaultWeatherData defaultWeatherData = null;\n try {\n defaultWeatherData = new DefaultWeatherData(city);\n } catch (UnsupportedOperationException e) {\n ExceptionHandler.handleException(e, e.getMessage(), logger);\n }\n ServletOutputStream out = null;\n try {\n String responseStr = defaultWeatherData.getDefaultWeatherData();\n response.setContentType(\"application/json\");\n out = response.getOutputStream();\n out.print(responseStr.toString());\n logger.log(Level.FINEST, \"responseStr: \" + responseStr);\n } catch (Exception e) {\n String errorMsg = \"Problem occured when getting the default weather data.\";\n ExceptionHandler.handleException(e, errorMsg, logger);\n } finally {\n if (out != null) {\n out.close();\n }\n out = null;\n }\n}","start_line":205,"end_line":234,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["javax.servlet.ServletOutputStream","com.acme.modres.DefaultWeatherData","java.lang.String","java.util.logging.Level"],"accessed_fields":["com.acme.modres.WeatherServlet.logger","java.util.logging.Level.FINEST"],"call_sites":[{"method_name":"handleException","receiver_expr":"ExceptionHandler","receiver_type":"com.acme.modres.exception.ExceptionHandler","argument_types":["java.lang.UnsupportedOperationException","java.lang.String","java.util.logging.Logger"],"return_type":"","callee_signature":"handleException(java.lang.Exception, java.lang.String, java.util.logging.Logger)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":212,"start_column":4,"end_line":212,"end_column":62},{"method_name":"getMessage","receiver_expr":"e","receiver_type":"java.lang.UnsupportedOperationException","argument_types":[],"return_type":"java.lang.String","callee_signature":"getMessage()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":212,"start_column":40,"end_line":212,"end_column":53},{"method_name":"getDefaultWeatherData","receiver_expr":"defaultWeatherData","receiver_type":"com.acme.modres.DefaultWeatherData","argument_types":[],"return_type":"java.lang.String","callee_signature":"getDefaultWeatherData()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":218,"start_column":25,"end_line":218,"end_column":66},{"method_name":"setContentType","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setContentType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":219,"start_column":4,"end_line":219,"end_column":46},{"method_name":"getOutputStream","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":[],"return_type":"javax.servlet.ServletOutputStream","callee_signature":"getOutputStream()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":220,"start_column":10,"end_line":220,"end_column":35},{"method_name":"print","receiver_expr":"out","receiver_type":"javax.servlet.ServletOutputStream","argument_types":["java.lang.String"],"return_type":"","callee_signature":"print(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":221,"start_column":4,"end_line":221,"end_column":36},{"method_name":"toString","receiver_expr":"responseStr","receiver_type":"java.lang.String","argument_types":[],"return_type":"java.lang.String","callee_signature":"toString()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":221,"start_column":14,"end_line":221,"end_column":35},{"method_name":"log","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.util.logging.Level","java.lang.String"],"return_type":"","callee_signature":"log(java.util.logging.Level, java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":222,"start_column":4,"end_line":222,"end_column":58},{"method_name":"handleException","receiver_expr":"ExceptionHandler","receiver_type":"com.acme.modres.exception.ExceptionHandler","argument_types":["java.lang.Exception","java.lang.String","java.util.logging.Logger"],"return_type":"","callee_signature":"handleException(java.lang.Exception, java.lang.String, java.util.logging.Logger)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":225,"start_column":5,"end_line":225,"end_column":57},{"method_name":"close","receiver_expr":"out","receiver_type":"javax.servlet.ServletOutputStream","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":229,"start_column":5,"end_line":229,"end_column":15},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.DefaultWeatherData","argument_types":["java.lang.String"],"return_type":"com.acme.modres.DefaultWeatherData","callee_signature":"DefaultWeatherData(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":210,"start_column":25,"end_line":210,"end_column":52}],"variable_declarations":[{"name":"defaultWeatherData","type":"com.acme.modres.DefaultWeatherData","initializer":"null","start_line":207,"start_column":22,"end_line":207,"end_column":46},{"name":"out","type":"javax.servlet.ServletOutputStream","initializer":"null","start_line":215,"start_column":23,"end_line":215,"end_column":32},{"name":"responseStr","type":"java.lang.String","initializer":"defaultWeatherData.getDefaultWeatherData()","start_line":218,"start_column":11,"end_line":218,"end_column":66},{"name":"errorMsg","type":"java.lang.String","initializer":"\"Problem occured when getting the default weather data.\"","start_line":224,"start_column":12,"end_line":224,"end_column":78}],"cyclomatic_complexity":4},"init()":{"signature":"init()","comment":"","annotations":["@Override"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void init()","parameters":[],"code":"{\n server = ManagementFactory.getPlatformMBeanServer();\n try {\n weatherON = new ObjectName(\"com.acme.modres.mbean:name=appInfo\");\n } catch (MalformedObjectNameException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n try {\n if (weatherON != null) {\n mbean = server.registerMBean(new AppInfo(), weatherON);\n }\n } catch (InstanceAlreadyExistsException | MBeanRegistrationException | NotCompliantMBeanException e) {\n e.printStackTrace();\n }\n context = setInitialContextProps();\n}","start_line":64,"end_line":81,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.WeatherServlet.context","com.acme.modres.WeatherServlet.weatherON","com.acme.modres.WeatherServlet.server","com.acme.modres.WeatherServlet.mbean"],"call_sites":[{"method_name":"getPlatformMBeanServer","receiver_expr":"ManagementFactory","receiver_type":"java.lang.management.ManagementFactory","argument_types":[],"return_type":"javax.management.MBeanServer","callee_signature":"getPlatformMBeanServer()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":66,"start_column":12,"end_line":66,"end_column":53},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"javax.management.MalformedObjectNameException","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":71,"start_column":4,"end_line":71,"end_column":22},{"method_name":"registerMBean","receiver_expr":"server","receiver_type":"javax.management.MBeanServer","argument_types":["com.acme.modres.mbean.AppInfo","javax.management.ObjectName"],"return_type":"javax.management.ObjectInstance","callee_signature":"registerMBean(java.lang.Object, javax.management.ObjectName)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":75,"start_column":13,"end_line":75,"end_column":58},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"javax.management.InstanceAlreadyExistsException","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":78,"start_column":4,"end_line":78,"end_column":22},{"method_name":"setInitialContextProps","receiver_expr":"","receiver_type":"","argument_types":[],"return_type":"javax.naming.InitialContext","callee_signature":"setInitialContextProps()","is_public":false,"is_protected":false,"is_private":true,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":80,"start_column":13,"end_line":80,"end_column":36},{"method_name":"","receiver_expr":"","receiver_type":"javax.management.ObjectName","argument_types":["java.lang.String"],"return_type":"javax.management.ObjectName","callee_signature":"ObjectName(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":68,"start_column":16,"end_line":68,"end_column":67},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.AppInfo","argument_types":[],"return_type":"com.acme.modres.mbean.AppInfo","callee_signature":"AppInfo()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":75,"start_column":34,"end_line":75,"end_column":46}],"variable_declarations":[],"cyclomatic_complexity":2},"configureEnvDiscovery()":{"signature":"configureEnvDiscovery()","comment":"","annotations":[],"modifiers":["private"],"thrown_exceptions":[],"declaration":"private String configureEnvDiscovery()","parameters":[],"code":"{\n String serverEnv = \"\";\n serverEnv += com.ibm.websphere.runtime.ServerName.getDisplayName();\n serverEnv += com.ibm.websphere.runtime.ServerName.getFullName();\n return serverEnv;\n}","start_line":253,"end_line":261,"return_type":"java.lang.String","is_implicit":false,"is_constructor":false,"referenced_types":["com.ibm.websphere.runtime.ServerName","java.lang.String"],"accessed_fields":["ServerName"],"call_sites":[{"method_name":"getDisplayName","receiver_expr":"com.ibm.websphere.runtime.ServerName","receiver_type":"com.ibm.websphere.runtime.ServerName","argument_types":[],"return_type":"java.lang.String","callee_signature":"getDisplayName()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":257,"start_column":22,"end_line":257,"end_column":74},{"method_name":"getFullName","receiver_expr":"com.ibm.websphere.runtime.ServerName","receiver_type":"com.ibm.websphere.runtime.ServerName","argument_types":[],"return_type":"java.lang.String","callee_signature":"getFullName()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":258,"start_column":22,"end_line":258,"end_column":71}],"variable_declarations":[{"name":"serverEnv","type":"java.lang.String","initializer":"\"\"","start_line":255,"start_column":16,"end_line":255,"end_column":29}],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"long","start_line":47,"end_line":47,"variables":["serialVersionUID"],"modifiers":["private","static","final"],"annotations":[]},{"comment":"","type":"com.acme.modres.db.ModResortsCustomerInformation","start_line":49,"end_line":50,"variables":["customerInfo"],"modifiers":["private"],"annotations":["@Inject"]},{"comment":"// get weather information from site: http://www.wunderground.com","type":"java.lang.String","start_line":54,"end_line":54,"variables":["WEATHER_API_KEY"],"modifiers":["private","static","final"],"annotations":[]},{"comment":"","type":"java.util.logging.Logger","start_line":56,"end_line":56,"variables":["logger"],"modifiers":["private","static","final"],"annotations":[]},{"comment":"","type":"javax.naming.InitialContext","start_line":58,"end_line":58,"variables":["context"],"modifiers":["private","static"],"annotations":[]},{"comment":"","type":"javax.management.MBeanServer","start_line":60,"end_line":60,"variables":["server"],"modifiers":[],"annotations":[]},{"comment":"","type":"javax.management.ObjectName","start_line":61,"end_line":61,"variables":["weatherON"],"modifiers":[],"annotations":[]},{"comment":"","type":"javax.management.ObjectInstance","start_line":62,"end_line":62,"variables":["mbean"],"modifiers":[],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/OpMetadata.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/OpMetadata.java","comment":"","imports":[],"type_declarations":{"com.acme.modres.mbean.OpMetadata":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"(String, String, String, int)":{"signature":"OpMetadata(String, String, String, int)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public OpMetadata(String name, String description, String type, int impact)","parameters":[{"type":"java.lang.String","name":"name","annotations":[],"modifiers":[]},{"type":"java.lang.String","name":"description","annotations":[],"modifiers":[]},{"type":"java.lang.String","name":"type","annotations":[],"modifiers":[]},{"type":"int","name":"impact","annotations":[],"modifiers":[]}],"code":"{\n this.name = name;\n this.description = description;\n this.type = type;\n this.impact = impact;\n}","start_line":8,"end_line":13,"is_implicit":false,"is_constructor":true,"referenced_types":["java.lang.String"],"accessed_fields":["com.acme.modres.mbean.OpMetadata.type","com.acme.modres.mbean.OpMetadata.description","com.acme.modres.mbean.OpMetadata.name","com.acme.modres.mbean.OpMetadata.impact"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"getDescription()":{"signature":"getDescription()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public String getDescription()","parameters":[],"code":"{\n return description;\n}","start_line":23,"end_line":25,"return_type":"java.lang.String","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.OpMetadata.description"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"()":{"signature":"OpMetadata()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public OpMetadata()","parameters":[],"code":"{\n}","start_line":5,"end_line":6,"is_implicit":false,"is_constructor":true,"referenced_types":[],"accessed_fields":[],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"getName()":{"signature":"getName()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public String getName()","parameters":[],"code":"{\n return name;\n}","start_line":20,"end_line":22,"return_type":"java.lang.String","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.OpMetadata.name"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"setName(String)":{"signature":"setName(String)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void setName(String name)","parameters":[{"type":"java.lang.String","name":"name","annotations":[],"modifiers":[]}],"code":"{\n this.name = name;\n}","start_line":32,"end_line":34,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.String"],"accessed_fields":["com.acme.modres.mbean.OpMetadata.name"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"getType()":{"signature":"getType()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public String getType()","parameters":[],"code":"{\n return type;\n}","start_line":26,"end_line":28,"return_type":"java.lang.String","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.OpMetadata.type"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"setDescription(String)":{"signature":"setDescription(String)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void setDescription(String description)","parameters":[{"type":"java.lang.String","name":"description","annotations":[],"modifiers":[]}],"code":"{\n this.description = description;\n}","start_line":35,"end_line":37,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.String"],"accessed_fields":["com.acme.modres.mbean.OpMetadata.description"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"setImpact(int)":{"signature":"setImpact(int)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void setImpact(int impact)","parameters":[{"type":"int","name":"impact","annotations":[],"modifiers":[]}],"code":"{\n this.impact = impact;\n}","start_line":41,"end_line":43,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.OpMetadata.impact"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"getImpact()":{"signature":"getImpact()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public int getImpact()","parameters":[],"code":"{\n return impact;\n}","start_line":29,"end_line":31,"return_type":"int","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.OpMetadata.impact"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"setType(String)":{"signature":"setType(String)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void setType(String type)","parameters":[{"type":"java.lang.String","name":"type","annotations":[],"modifiers":[]}],"code":"{\n this.type = type;\n}","start_line":38,"end_line":40,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.String"],"accessed_fields":["com.acme.modres.mbean.OpMetadata.type"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"java.lang.String","start_line":14,"end_line":14,"variables":["name"],"modifiers":["private"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":15,"end_line":15,"variables":["description"],"modifiers":["private"],"annotations":[]},{"comment":"//TODO signature, assume empty for now","type":"java.lang.String","start_line":17,"end_line":17,"variables":["type"],"modifiers":["private"],"annotations":[]},{"comment":"","type":"int","start_line":18,"end_line":18,"variables":["impact"],"modifiers":["private"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/ReservationCheckerData.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/ReservationCheckerData.java","comment":"","imports":["java.text.SimpleDateFormat","java.util.Date","com.acme.modres.Constants"],"type_declarations":{"com.acme.modres.mbean.reservation.ReservationCheckerData":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"(ReservationList)":{"signature":"ReservationCheckerData(ReservationList)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public ReservationCheckerData(ReservationList reservations)","parameters":[{"type":"com.acme.modres.mbean.reservation.ReservationList","name":"reservations","annotations":[],"modifiers":[]}],"code":"{\n this.reservations = reservations;\n this.available = true;\n}","start_line":13,"end_line":16,"is_implicit":false,"is_constructor":true,"referenced_types":["java.lang.Boolean","com.acme.modres.mbean.reservation.ReservationList"],"accessed_fields":["com.acme.modres.mbean.reservation.ReservationCheckerData.available","com.acme.modres.mbean.reservation.ReservationCheckerData.reservations"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"setSelectedDate(String)":{"signature":"setSelectedDate(String)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public boolean setSelectedDate(String dateStr)","parameters":[{"type":"java.lang.String","name":"dateStr","annotations":[],"modifiers":[]}],"code":"{\n try {\n selectedDate = new SimpleDateFormat(Constants.DATA_FORMAT).parse(dateStr);\n } catch (Exception e) {\n return false;\n }\n return true;\n}","start_line":26,"end_line":33,"return_type":"boolean","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.String"],"accessed_fields":["com.acme.modres.Constants.DATA_FORMAT","com.acme.modres.mbean.reservation.ReservationCheckerData.selectedDate"],"call_sites":[{"method_name":"parse","receiver_expr":"new SimpleDateFormat(Constants.DATA_FORMAT)","receiver_type":"java.text.SimpleDateFormat","argument_types":["java.lang.String"],"return_type":"java.util.Date","callee_signature":"parse(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":28,"start_column":19,"end_line":28,"end_column":76},{"method_name":"","receiver_expr":"","receiver_type":"java.text.SimpleDateFormat","argument_types":["java.lang.String"],"return_type":"java.text.SimpleDateFormat","callee_signature":"SimpleDateFormat(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":28,"start_column":19,"end_line":28,"end_column":61}],"variable_declarations":[],"cyclomatic_complexity":1},"getReservationList()":{"signature":"getReservationList()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public ReservationList getReservationList()","parameters":[],"code":"{\n return reservations;\n}","start_line":18,"end_line":20,"return_type":"com.acme.modres.mbean.reservation.ReservationList","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.reservation.ReservationCheckerData.reservations"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"setAvailablility(Boolean)":{"signature":"setAvailablility(Boolean)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void setAvailablility(Boolean available)","parameters":[{"type":"java.lang.Boolean","name":"available","annotations":[],"modifiers":[]}],"code":"{\n this.available = available;\n}","start_line":39,"end_line":41,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.Boolean"],"accessed_fields":["com.acme.modres.mbean.reservation.ReservationCheckerData.available"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"getSelectedDate()":{"signature":"getSelectedDate()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public Date getSelectedDate()","parameters":[],"code":"{\n return selectedDate;\n}","start_line":22,"end_line":24,"return_type":"java.util.Date","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.reservation.ReservationCheckerData.selectedDate"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"isAvailible()":{"signature":"isAvailible()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public boolean isAvailible()","parameters":[],"code":"{\n return available;\n}","start_line":35,"end_line":37,"return_type":"boolean","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.reservation.ReservationCheckerData.available"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"com.acme.modres.mbean.reservation.ReservationList","start_line":9,"end_line":9,"variables":["reservations"],"modifiers":["private"],"annotations":[]},{"comment":"","type":"java.util.Date","start_line":10,"end_line":10,"variables":["selectedDate"],"modifiers":["private"],"annotations":[]},{"comment":"","type":"java.lang.Boolean","start_line":11,"end_line":11,"variables":["available"],"modifiers":["private"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/security/Service.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/security/Service.java","comment":"","imports":["java.lang.reflect.Member"],"type_declarations":{"com.acme.modres.security.Service":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"operation()":{"signature":"operation()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void operation()","parameters":[],"code":"{\n SecurityManager securityManager = System.getSecurityManager();\n if (securityManager != null) {\n // this SecurityManager method is not availible in Java 11\n // securityManager.checkMemberAccess(Service.class, Member.PUBLIC);\n }\n System.out.println(\"Operation is executed\");\n}","start_line":8,"end_line":15,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.io.PrintStream","java.lang.SecurityManager"],"accessed_fields":["java.lang.System.out"],"call_sites":[{"method_name":"getSecurityManager","receiver_expr":"System","receiver_type":"java.lang.System","argument_types":[],"return_type":"java.lang.SecurityManager","callee_signature":"getSecurityManager()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":9,"start_column":43,"end_line":9,"end_column":69},{"method_name":"println","receiver_expr":"System.out","receiver_type":"java.io.PrintStream","argument_types":["java.lang.String"],"return_type":"","callee_signature":"println(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":14,"start_column":9,"end_line":14,"end_column":51}],"variable_declarations":[{"name":"securityManager","type":"java.lang.SecurityManager","initializer":"System.getSecurityManager()","start_line":9,"start_column":25,"end_line":9,"end_column":69}],"cyclomatic_complexity":2}},"field_declarations":[{"comment":"","type":"java.lang.String","start_line":6,"end_line":6,"variables":["OPERATION"],"modifiers":["public","static","final"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/AppInfo.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/AppInfo.java","comment":"","imports":["javax.management.Attribute","javax.management.AttributeList","javax.management.AttributeNotFoundException","javax.management.DynamicMBean","javax.management.InvalidAttributeValueException","javax.management.MBeanAttributeInfo","javax.management.MBeanConstructorInfo","javax.management.MBeanException","javax.management.MBeanInfo","javax.management.MBeanNotificationInfo","javax.management.MBeanOperationInfo","javax.management.ReflectionException"],"type_declarations":{"com.acme.modres.mbean.AppInfo":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":["javax.management.DynamicMBean"],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"buildDMBeanInfo()":{"signature":"buildDMBeanInfo()","comment":"","annotations":[],"modifiers":["private"],"thrown_exceptions":[],"declaration":"private void buildDMBeanInfo()","parameters":[],"code":"{\n String className = getClass().getName();\n String desc = \"Configurable App Info\";\n MBeanAttributeInfo[] attrs = null;\n MBeanConstructorInfo[] cons = null;\n MBeanNotificationInfo[] notifications = null;\n OpMetadataList opMetadataList = IOUtils.getOpListFromConfig();\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opMetadataList);\n dMBeanInfo = new MBeanInfo(className, desc, attrs, cons, ops, notifications);\n}","start_line":24,"end_line":35,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.String","com.acme.modres.mbean.OpMetadataList"],"accessed_fields":["com.acme.modres.mbean.AppInfo.dMBeanInfo"],"call_sites":[{"method_name":"getName","receiver_expr":"getClass()","receiver_type":"java.lang.Class","argument_types":[],"return_type":"java.lang.String","callee_signature":"getName()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":25,"start_column":22,"end_line":25,"end_column":41},{"method_name":"getClass","receiver_expr":"","receiver_type":"","argument_types":[],"return_type":"java.lang.Class","callee_signature":"getClass()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":25,"start_column":22,"end_line":25,"end_column":31},{"method_name":"getOpListFromConfig","receiver_expr":"IOUtils","receiver_type":"com.acme.modres.mbean.IOUtils","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"getOpListFromConfig()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":31,"start_column":35,"end_line":31,"end_column":63},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":32,"start_column":30,"end_line":32,"end_column":63},{"method_name":"","receiver_expr":"","receiver_type":"javax.management.MBeanInfo","argument_types":["java.lang.String","java.lang.String","","","",""],"return_type":"javax.management.MBeanInfo","callee_signature":"MBeanInfo(java.lang.String, java.lang.String, javax.management.MBeanAttributeInfo[], javax.management.MBeanConstructorInfo[], javax.management.MBeanOperationInfo[], javax.management.MBeanNotificationInfo[])","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":34,"start_column":16,"end_line":34,"end_column":78}],"variable_declarations":[{"name":"className","type":"java.lang.String","initializer":"getClass().getName()","start_line":25,"start_column":10,"end_line":25,"end_column":41},{"name":"desc","type":"java.lang.String","initializer":"\"Configurable App Info\"","start_line":26,"start_column":10,"end_line":26,"end_column":39},{"name":"attrs","type":"javax.management.MBeanAttributeInfo[]","initializer":"null","start_line":27,"start_column":24,"end_line":27,"end_column":35},{"name":"cons","type":"javax.management.MBeanConstructorInfo[]","initializer":"null","start_line":28,"start_column":26,"end_line":28,"end_column":36},{"name":"notifications","type":"javax.management.MBeanNotificationInfo[]","initializer":"null","start_line":29,"start_column":27,"end_line":29,"end_column":46},{"name":"opMetadataList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"IOUtils.getOpListFromConfig()","start_line":31,"start_column":18,"end_line":31,"end_column":63},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opMetadataList)","start_line":32,"start_column":24,"end_line":32,"end_column":63}],"cyclomatic_complexity":1},"getMBeanInfo()":{"signature":"getMBeanInfo()","comment":"","annotations":["@Override"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public MBeanInfo getMBeanInfo()","parameters":[],"code":"{\n return dMBeanInfo;\n}","start_line":38,"end_line":41,"return_type":"javax.management.MBeanInfo","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.AppInfo.dMBeanInfo"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"getAttribute(String)":{"signature":"getAttribute(String)","comment":"","annotations":["@Override"],"modifiers":["public"],"thrown_exceptions":["javax.management.AttributeNotFoundException","javax.management.MBeanException","javax.management.ReflectionException"],"declaration":"public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException","parameters":[{"type":"java.lang.String","name":"attribute","annotations":[],"modifiers":[]}],"code":"{\n return null;\n}","start_line":67,"end_line":71,"return_type":"java.lang.Object","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":[],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"()":{"signature":"AppInfo()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public AppInfo()","parameters":[],"code":"{\n buildDMBeanInfo();\n}","start_line":20,"end_line":22,"is_implicit":false,"is_constructor":true,"referenced_types":[],"accessed_fields":[],"call_sites":[{"method_name":"buildDMBeanInfo","receiver_expr":"","receiver_type":"","argument_types":[],"return_type":"","callee_signature":"buildDMBeanInfo()","is_public":false,"is_protected":false,"is_private":true,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":21,"start_column":3,"end_line":21,"end_column":19}],"variable_declarations":[],"cyclomatic_complexity":1},"increaseLimit()":{"signature":"increaseLimit()","comment":"","annotations":[],"modifiers":["private"],"thrown_exceptions":[],"declaration":"private void increaseLimit()","parameters":[],"code":"{\n System.out.println(\"Limit increased\");\n}","start_line":58,"end_line":60,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.io.PrintStream"],"accessed_fields":["java.lang.System.out"],"call_sites":[{"method_name":"println","receiver_expr":"System.out","receiver_type":"java.io.PrintStream","argument_types":["java.lang.String"],"return_type":"","callee_signature":"println(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":59,"start_column":3,"end_line":59,"end_column":39}],"variable_declarations":[],"cyclomatic_complexity":1},"setAttributes(AttributeList)":{"signature":"setAttributes(AttributeList)","comment":"","annotations":["@Override"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public AttributeList setAttributes(AttributeList attributes)","parameters":[{"type":"javax.management.AttributeList","name":"attributes","annotations":[],"modifiers":[]}],"code":"{\n return null;\n}","start_line":84,"end_line":87,"return_type":"javax.management.AttributeList","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":[],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"resetLimit()":{"signature":"resetLimit()","comment":"","annotations":[],"modifiers":["private"],"thrown_exceptions":[],"declaration":"private void resetLimit()","parameters":[],"code":"{\n System.out.println(\"Limit reset\");\n}","start_line":62,"end_line":64,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.io.PrintStream"],"accessed_fields":["java.lang.System.out"],"call_sites":[{"method_name":"println","receiver_expr":"System.out","receiver_type":"java.io.PrintStream","argument_types":["java.lang.String"],"return_type":"","callee_signature":"println(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":63,"start_column":3,"end_line":63,"end_column":35}],"variable_declarations":[],"cyclomatic_complexity":1},"invoke(String, Object[], String[])":{"signature":"invoke(String, Object[], String[])","comment":"","annotations":["@Override"],"modifiers":["public"],"thrown_exceptions":["javax.management.MBeanException","javax.management.ReflectionException"],"declaration":"public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException","parameters":[{"type":"java.lang.String","name":"actionName","annotations":[],"modifiers":[]},{"type":"java.lang.Object[]","name":"params","annotations":[],"modifiers":[]},{"type":"java.lang.String[]","name":"signature","annotations":[],"modifiers":[]}],"code":"{\n if (\"increaseMaxLimit\".equals(actionName)) {\n increaseLimit();\n return \"Max limit increased\";\n } else if (\"resetMaxLimit\".equals(actionName)) {\n resetLimit();\n return \"Max limit reset\";\n } else {\n throw new MBeanException(new UnsupportedOperationException(getClass().getSimpleName() + \" does not support operation \" + actionName));\n }\n}","start_line":43,"end_line":56,"return_type":"java.lang.Object","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":[],"call_sites":[{"method_name":"equals","receiver_expr":"\"increaseMaxLimit\"","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":46,"start_column":7,"end_line":46,"end_column":43},{"method_name":"increaseLimit","receiver_expr":"","receiver_type":"","argument_types":[],"return_type":"","callee_signature":"increaseLimit()","is_public":false,"is_protected":false,"is_private":true,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":47,"start_column":4,"end_line":47,"end_column":18},{"method_name":"equals","receiver_expr":"\"resetMaxLimit\"","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":49,"start_column":14,"end_line":49,"end_column":47},{"method_name":"resetLimit","receiver_expr":"","receiver_type":"","argument_types":[],"return_type":"","callee_signature":"resetLimit()","is_public":false,"is_protected":false,"is_private":true,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":50,"start_column":4,"end_line":50,"end_column":15},{"method_name":"getSimpleName","receiver_expr":"getClass()","receiver_type":"java.lang.Class","argument_types":[],"return_type":"java.lang.String","callee_signature":"getSimpleName()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":54,"start_column":21,"end_line":54,"end_column":46},{"method_name":"getClass","receiver_expr":"","receiver_type":"","argument_types":[],"return_type":"java.lang.Class","callee_signature":"getClass()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":54,"start_column":21,"end_line":54,"end_column":30},{"method_name":"","receiver_expr":"","receiver_type":"javax.management.MBeanException","argument_types":["java.lang.UnsupportedOperationException"],"return_type":"javax.management.MBeanException","callee_signature":"MBeanException(java.lang.Exception)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":53,"start_column":19,"end_line":54,"end_column":94},{"method_name":"","receiver_expr":"","receiver_type":"java.lang.UnsupportedOperationException","argument_types":["java.lang.String"],"return_type":"java.lang.UnsupportedOperationException","callee_signature":"UnsupportedOperationException(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":53,"start_column":38,"end_line":54,"end_column":93}],"variable_declarations":[],"cyclomatic_complexity":3},"getAttributes(String[])":{"signature":"getAttributes(String[])","comment":"","annotations":["@Override"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public AttributeList getAttributes(String[] attributes)","parameters":[{"type":"java.lang.String[]","name":"attributes","annotations":[],"modifiers":[]}],"code":"{\n return null;\n}","start_line":79,"end_line":82,"return_type":"javax.management.AttributeList","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":[],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"setAttribute(Attribute)":{"signature":"setAttribute(Attribute)","comment":"","annotations":["@Override"],"modifiers":["public"],"thrown_exceptions":["javax.management.AttributeNotFoundException","javax.management.InvalidAttributeValueException","javax.management.MBeanException","javax.management.ReflectionException"],"declaration":"public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException","parameters":[{"type":"javax.management.Attribute","name":"attribute","annotations":[],"modifiers":[]}],"code":"{\n}","start_line":73,"end_line":77,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":[],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"javax.management.MBeanInfo","start_line":18,"end_line":18,"variables":["dMBeanInfo"],"modifiers":["private"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/DefaultWeatherData.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/DefaultWeatherData.java","comment":"","imports":["java.io.ByteArrayOutputStream","java.io.IOException","java.io.InputStream","java.util.logging.Level","java.util.logging.Logger"],"type_declarations":{"com.acme.modres.DefaultWeatherData":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"(String)":{"signature":"DefaultWeatherData(String)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public DefaultWeatherData(String city)","parameters":[{"type":"java.lang.String","name":"city","annotations":[],"modifiers":[]}],"code":"{\n if (city == null) {\n logger.severe(\"fail initializing DefaultWeatherData because the given city value is null\");\n throw new UnsupportedOperationException(\"City is not defined\");\n }\n boolean isSupportedCity = false;\n for (String aSupportedCity : Constants.SUPPORTED_CITIES) {\n if (city.equals(aSupportedCity)) {\n isSupportedCity = true;\n }\n }\n if (isSupportedCity) {\n this.city = city;\n } else {\n logger.severe(\"fail initializing DefaultWeatherData because the given city \" + city + \" is not supported\");\n throw new UnsupportedOperationException(\"City is invalid. It must be one of \" + Constants.SUPPORTED_CITIES.toString());\n }\n}","start_line":19,"end_line":37,"is_implicit":false,"is_constructor":true,"referenced_types":["java.lang.String"],"accessed_fields":["com.acme.modres.DefaultWeatherData.city","com.acme.modres.Constants.SUPPORTED_CITIES","com.acme.modres.DefaultWeatherData.logger"],"call_sites":[{"method_name":"severe","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.lang.String"],"return_type":"","callee_signature":"severe(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":21,"start_column":4,"end_line":21,"end_column":93},{"method_name":"equals","receiver_expr":"city","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":27,"start_column":8,"end_line":27,"end_column":34},{"method_name":"severe","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.lang.String"],"return_type":"","callee_signature":"severe(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":34,"start_column":4,"end_line":34,"end_column":109},{"method_name":"toString","receiver_expr":"Constants.SUPPORTED_CITIES","receiver_type":"","argument_types":[],"return_type":"java.lang.String","callee_signature":"toString()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":35,"start_column":84,"end_line":35,"end_column":120},{"method_name":"","receiver_expr":"","receiver_type":"java.lang.UnsupportedOperationException","argument_types":["java.lang.String"],"return_type":"java.lang.UnsupportedOperationException","callee_signature":"UnsupportedOperationException(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":22,"start_column":10,"end_line":22,"end_column":65},{"method_name":"","receiver_expr":"","receiver_type":"java.lang.UnsupportedOperationException","argument_types":["java.lang.String"],"return_type":"java.lang.UnsupportedOperationException","callee_signature":"UnsupportedOperationException(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":35,"start_column":10,"end_line":35,"end_column":121}],"variable_declarations":[{"name":"isSupportedCity","type":"boolean","initializer":"false","start_line":24,"start_column":11,"end_line":24,"end_column":33},{"name":"aSupportedCity","type":"java.lang.String","initializer":"","start_line":26,"start_column":15,"end_line":26,"end_column":28}],"cyclomatic_complexity":5},"getDefaultWeatherData()":{"signature":"getDefaultWeatherData()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":["java.io.IOException"],"declaration":"public String getDefaultWeatherData() throws IOException","parameters":[],"code":"{\n String dataFileName = null;\n if (Constants.PARIS.equals(getCity())) {\n dataFileName = Constants.PARIS_WEATHER_FILE;\n } else if (Constants.LAS_VEGAS.equals(getCity())) {\n dataFileName = Constants.LAS_VEGAS_WEATHER_FILE;\n } else if (Constants.SAN_FRANCISCO.equals(getCity())) {\n dataFileName = Constants.SAN_FRANCESCO_WEATHER_FILE;\n } else if (Constants.MIAMI.equals(getCity())) {\n dataFileName = Constants.MIAMI_WEATHER_FILE;\n } else if (Constants.CORK.equals(getCity())) {\n dataFileName = Constants.CORK_WEATHER_FILE;\n } else if (Constants.BARCELONA.equals(getCity())) {\n dataFileName = Constants.BACELONA_WEATHER_FILE;\n } else {\n throw new UnsupportedOperationException(\"The default weather information for the selected city: \" + city + \" is not provided. Valid selections are: \" + Constants.SUPPORTED_CITIES);\n }\n dataFileName = \"data/\" + dataFileName;\n logger.log(Level.FINE, \"dataFileName: \" + dataFileName);\n InputStream inputStream = null;\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n try {\n inputStream = getClass().getClassLoader().getResourceAsStream(dataFileName);\n byte[] buf = new byte[4096];\n for (int n; 0 < (n = inputStream.read(buf)); ) {\n out.write(buf, 0, n);\n }\n } finally {\n out.close();\n if (inputStream != null) {\n inputStream.close();\n }\n inputStream = null;\n }\n String resultStr = new String(out.toByteArray(), \"UTF-8\");\n logger.log(Level.FINEST, \"resultStr: \" + resultStr);\n out = null;\n return resultStr;\n}","start_line":39,"end_line":86,"return_type":"java.lang.String","is_implicit":false,"is_constructor":false,"referenced_types":["java.io.ByteArrayOutputStream","java.lang.String","java.io.InputStream","java.util.logging.Level"],"accessed_fields":["com.acme.modres.DefaultWeatherData.city","com.acme.modres.Constants.BARCELONA","com.acme.modres.Constants.CORK","com.acme.modres.Constants.PARIS","com.acme.modres.Constants.LAS_VEGAS","com.acme.modres.Constants.MIAMI","com.acme.modres.Constants.SAN_FRANCESCO_WEATHER_FILE","com.acme.modres.Constants.CORK_WEATHER_FILE","com.acme.modres.Constants.PARIS_WEATHER_FILE","com.acme.modres.Constants.MIAMI_WEATHER_FILE","com.acme.modres.Constants.BACELONA_WEATHER_FILE","com.acme.modres.Constants.SUPPORTED_CITIES","com.acme.modres.DefaultWeatherData.logger","com.acme.modres.Constants.SAN_FRANCISCO","com.acme.modres.Constants.LAS_VEGAS_WEATHER_FILE","java.util.logging.Level.FINEST","java.util.logging.Level.FINE"],"call_sites":[{"method_name":"equals","receiver_expr":"Constants.PARIS","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":42,"start_column":7,"end_line":42,"end_column":39},{"method_name":"getCity","receiver_expr":"","receiver_type":"","argument_types":[],"return_type":"java.lang.String","callee_signature":"getCity()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":42,"start_column":30,"end_line":42,"end_column":38},{"method_name":"equals","receiver_expr":"Constants.LAS_VEGAS","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":44,"start_column":14,"end_line":44,"end_column":50},{"method_name":"getCity","receiver_expr":"","receiver_type":"","argument_types":[],"return_type":"java.lang.String","callee_signature":"getCity()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":44,"start_column":41,"end_line":44,"end_column":49},{"method_name":"equals","receiver_expr":"Constants.SAN_FRANCISCO","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":46,"start_column":14,"end_line":46,"end_column":54},{"method_name":"getCity","receiver_expr":"","receiver_type":"","argument_types":[],"return_type":"java.lang.String","callee_signature":"getCity()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":46,"start_column":45,"end_line":46,"end_column":53},{"method_name":"equals","receiver_expr":"Constants.MIAMI","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":48,"start_column":14,"end_line":48,"end_column":46},{"method_name":"getCity","receiver_expr":"","receiver_type":"","argument_types":[],"return_type":"java.lang.String","callee_signature":"getCity()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":48,"start_column":37,"end_line":48,"end_column":45},{"method_name":"equals","receiver_expr":"Constants.CORK","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":50,"start_column":14,"end_line":50,"end_column":45},{"method_name":"getCity","receiver_expr":"","receiver_type":"","argument_types":[],"return_type":"java.lang.String","callee_signature":"getCity()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":50,"start_column":36,"end_line":50,"end_column":44},{"method_name":"equals","receiver_expr":"Constants.BARCELONA","receiver_type":"java.lang.String","argument_types":["java.lang.String"],"return_type":"","callee_signature":"equals(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":52,"start_column":14,"end_line":52,"end_column":50},{"method_name":"getCity","receiver_expr":"","receiver_type":"","argument_types":[],"return_type":"java.lang.String","callee_signature":"getCity()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":52,"start_column":41,"end_line":52,"end_column":49},{"method_name":"log","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.util.logging.Level","java.lang.String"],"return_type":"","callee_signature":"log(java.util.logging.Level, java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":61,"start_column":3,"end_line":61,"end_column":57},{"method_name":"getResourceAsStream","receiver_expr":"getClass().getClassLoader()","receiver_type":"java.lang.ClassLoader","argument_types":["java.lang.String"],"return_type":"java.io.InputStream","callee_signature":"getResourceAsStream(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":67,"start_column":18,"end_line":67,"end_column":78},{"method_name":"getClassLoader","receiver_expr":"getClass()","receiver_type":"java.lang.Class","argument_types":[],"return_type":"java.lang.ClassLoader","callee_signature":"getClassLoader()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":67,"start_column":18,"end_line":67,"end_column":44},{"method_name":"getClass","receiver_expr":"","receiver_type":"","argument_types":[],"return_type":"java.lang.Class","callee_signature":"getClass()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":67,"start_column":18,"end_line":67,"end_column":27},{"method_name":"read","receiver_expr":"inputStream","receiver_type":"java.io.InputStream","argument_types":[""],"return_type":"","callee_signature":"read(byte[])","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":69,"start_column":25,"end_line":69,"end_column":45},{"method_name":"write","receiver_expr":"out","receiver_type":"java.io.ByteArrayOutputStream","argument_types":["","",""],"return_type":"","callee_signature":"write(byte[], int, int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":70,"start_column":5,"end_line":70,"end_column":24},{"method_name":"close","receiver_expr":"out","receiver_type":"java.io.ByteArrayOutputStream","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":73,"start_column":4,"end_line":73,"end_column":14},{"method_name":"close","receiver_expr":"inputStream","receiver_type":"java.io.InputStream","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":76,"start_column":5,"end_line":76,"end_column":23},{"method_name":"toByteArray","receiver_expr":"out","receiver_type":"java.io.ByteArrayOutputStream","argument_types":[],"return_type":"","callee_signature":"toByteArray()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":81,"start_column":36,"end_line":81,"end_column":52},{"method_name":"log","receiver_expr":"logger","receiver_type":"java.util.logging.Logger","argument_types":["java.util.logging.Level","java.lang.String"],"return_type":"","callee_signature":"log(java.util.logging.Level, java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":82,"start_column":6,"end_line":82,"end_column":56},{"method_name":"","receiver_expr":"","receiver_type":"java.lang.UnsupportedOperationException","argument_types":["java.lang.String"],"return_type":"java.lang.UnsupportedOperationException","callee_signature":"UnsupportedOperationException(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":55,"start_column":10,"end_line":56,"end_column":78},{"method_name":"","receiver_expr":"","receiver_type":"java.io.ByteArrayOutputStream","argument_types":[],"return_type":"java.io.ByteArrayOutputStream","callee_signature":"ByteArrayOutputStream()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":65,"start_column":31,"end_line":65,"end_column":57},{"method_name":"","receiver_expr":"","receiver_type":"java.lang.String","argument_types":["","java.lang.String"],"return_type":"java.lang.String","callee_signature":"String(byte[], java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":81,"start_column":25,"end_line":81,"end_column":62}],"variable_declarations":[{"name":"dataFileName","type":"java.lang.String","initializer":"null","start_line":41,"start_column":10,"end_line":41,"end_column":28},{"name":"inputStream","type":"java.io.InputStream","initializer":"null","start_line":63,"start_column":15,"end_line":63,"end_column":32},{"name":"out","type":"java.io.ByteArrayOutputStream","initializer":"new ByteArrayOutputStream()","start_line":65,"start_column":25,"end_line":65,"end_column":57},{"name":"buf","type":"byte[]","initializer":"new byte[4096]","start_line":68,"start_column":11,"end_line":68,"end_column":30},{"name":"n","type":"int","initializer":"","start_line":69,"start_column":13,"end_line":69,"end_column":13},{"name":"resultStr","type":"java.lang.String","initializer":"new String(out.toByteArray(), \"UTF-8\")","start_line":81,"start_column":13,"end_line":81,"end_column":62}],"cyclomatic_complexity":10},"getCity()":{"signature":"getCity()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public String getCity()","parameters":[],"code":"{\n return city;\n}","start_line":15,"end_line":17,"return_type":"java.lang.String","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.DefaultWeatherData.city"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"java.util.logging.Logger","start_line":11,"end_line":11,"variables":["logger"],"modifiers":["final","static"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":13,"end_line":13,"variables":["city"],"modifiers":["private"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/Reservation.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/Reservation.java","comment":"","imports":[],"type_declarations":{"com.acme.modres.mbean.reservation.Reservation":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"setToDate(String)":{"signature":"setToDate(String)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void setToDate(String toDate)","parameters":[{"type":"java.lang.String","name":"toDate","annotations":[],"modifiers":[]}],"code":"{\n this.toDate = toDate;\n}","start_line":19,"end_line":21,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.String"],"accessed_fields":["com.acme.modres.mbean.reservation.Reservation.toDate"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"getFromDate()":{"signature":"getFromDate()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public String getFromDate()","parameters":[],"code":"{\n return fromDate;\n}","start_line":23,"end_line":25,"return_type":"java.lang.String","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.reservation.Reservation.fromDate"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"setFromDate(String)":{"signature":"setFromDate(String)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void setFromDate(String fromDate)","parameters":[{"type":"java.lang.String","name":"fromDate","annotations":[],"modifiers":[]}],"code":"{\n this.fromDate = fromDate;\n}","start_line":15,"end_line":17,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.String"],"accessed_fields":["com.acme.modres.mbean.reservation.Reservation.fromDate"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"()":{"signature":"Reservation()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public Reservation()","parameters":[],"code":"{\n}","start_line":7,"end_line":8,"is_implicit":false,"is_constructor":true,"referenced_types":[],"accessed_fields":[],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"(String, String)":{"signature":"Reservation(String, String)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public Reservation(String fromDate, String toDate)","parameters":[{"type":"java.lang.String","name":"fromDate","annotations":[],"modifiers":[]},{"type":"java.lang.String","name":"toDate","annotations":[],"modifiers":[]}],"code":"{\n this.fromDate = fromDate;\n this.toDate = toDate;\n}","start_line":10,"end_line":13,"is_implicit":false,"is_constructor":true,"referenced_types":["java.lang.String"],"accessed_fields":["com.acme.modres.mbean.reservation.Reservation.toDate","com.acme.modres.mbean.reservation.Reservation.fromDate"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1},"getToDate()":{"signature":"getToDate()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public String getToDate()","parameters":[],"code":"{\n return toDate;\n}","start_line":27,"end_line":29,"return_type":"java.lang.String","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":["com.acme.modres.mbean.reservation.Reservation.toDate"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"java.lang.String","start_line":4,"end_line":4,"variables":["fromDate"],"modifiers":["private"],"annotations":[]},{"comment":"","type":"java.lang.String","start_line":5,"end_line":5,"variables":["toDate"],"modifiers":["private"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/DateChecker.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/DateChecker.java","comment":"","imports":["java.text.SimpleDateFormat","java.util.Date","com.acme.modres.Constants"],"type_declarations":{"com.acme.modres.mbean.reservation.DateChecker":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":["java.lang.Runnable"],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"run()":{"signature":"run()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void run()","parameters":[],"code":"{\n data.setAvailablility(true);\n for (Reservation resveration : data.getReservationList().getReservations()) {\n try {\n Date selectedDate = data.getSelectedDate();\n Date fromDate = new SimpleDateFormat(Constants.DATA_FORMAT).parse(resveration.getFromDate());\n Date toDate = new SimpleDateFormat(Constants.DATA_FORMAT).parse(resveration.getToDate());\n if (selectedDate.after(fromDate) && selectedDate.before(toDate)) {\n data.setAvailablility(false);\n break;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n}","start_line":15,"end_line":31,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.Date","com.acme.modres.mbean.reservation.Reservation","java.lang.String"],"accessed_fields":["com.acme.modres.Constants.DATA_FORMAT","com.acme.modres.mbean.reservation.DateChecker.data"],"call_sites":[{"method_name":"setAvailablility","receiver_expr":"data","receiver_type":"com.acme.modres.mbean.reservation.ReservationCheckerData","argument_types":[""],"return_type":"","callee_signature":"setAvailablility(java.lang.Boolean)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":16,"start_column":9,"end_line":16,"end_column":35},{"method_name":"getReservations","receiver_expr":"data.getReservationList()","receiver_type":"com.acme.modres.mbean.reservation.ReservationList","argument_types":[],"return_type":"java.util.List","callee_signature":"getReservations()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":17,"start_column":32,"end_line":17,"end_column":74},{"method_name":"getReservationList","receiver_expr":"data","receiver_type":"com.acme.modres.mbean.reservation.ReservationCheckerData","argument_types":[],"return_type":"com.acme.modres.mbean.reservation.ReservationList","callee_signature":"getReservationList()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":17,"start_column":32,"end_line":17,"end_column":56},{"method_name":"getSelectedDate","receiver_expr":"data","receiver_type":"com.acme.modres.mbean.reservation.ReservationCheckerData","argument_types":[],"return_type":"java.util.Date","callee_signature":"getSelectedDate()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":19,"start_column":37,"end_line":19,"end_column":58},{"method_name":"parse","receiver_expr":"new SimpleDateFormat(Constants.DATA_FORMAT)","receiver_type":"java.text.SimpleDateFormat","argument_types":["java.lang.String"],"return_type":"java.util.Date","callee_signature":"parse(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":20,"start_column":21,"end_line":20,"end_column":96},{"method_name":"getFromDate","receiver_expr":"resveration","receiver_type":"com.acme.modres.mbean.reservation.Reservation","argument_types":[],"return_type":"java.lang.String","callee_signature":"getFromDate()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":20,"start_column":71,"end_line":20,"end_column":95},{"method_name":"parse","receiver_expr":"new SimpleDateFormat(Constants.DATA_FORMAT)","receiver_type":"java.text.SimpleDateFormat","argument_types":["java.lang.String"],"return_type":"java.util.Date","callee_signature":"parse(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":21,"start_column":19,"end_line":21,"end_column":92},{"method_name":"getToDate","receiver_expr":"resveration","receiver_type":"com.acme.modres.mbean.reservation.Reservation","argument_types":[],"return_type":"java.lang.String","callee_signature":"getToDate()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":21,"start_column":69,"end_line":21,"end_column":91},{"method_name":"after","receiver_expr":"selectedDate","receiver_type":"java.util.Date","argument_types":["java.util.Date"],"return_type":"","callee_signature":"after(java.util.Date)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":23,"start_column":9,"end_line":23,"end_column":36},{"method_name":"before","receiver_expr":"selectedDate","receiver_type":"java.util.Date","argument_types":["java.util.Date"],"return_type":"","callee_signature":"before(java.util.Date)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":23,"start_column":41,"end_line":23,"end_column":67},{"method_name":"setAvailablility","receiver_expr":"data","receiver_type":"com.acme.modres.mbean.reservation.ReservationCheckerData","argument_types":[""],"return_type":"","callee_signature":"setAvailablility(java.lang.Boolean)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":24,"start_column":21,"end_line":24,"end_column":48},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"java.lang.Exception","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":28,"start_column":5,"end_line":28,"end_column":23},{"method_name":"","receiver_expr":"","receiver_type":"java.text.SimpleDateFormat","argument_types":["java.lang.String"],"return_type":"java.text.SimpleDateFormat","callee_signature":"SimpleDateFormat(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":20,"start_column":21,"end_line":20,"end_column":63},{"method_name":"","receiver_expr":"","receiver_type":"java.text.SimpleDateFormat","argument_types":["java.lang.String"],"return_type":"java.text.SimpleDateFormat","callee_signature":"SimpleDateFormat(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":21,"start_column":19,"end_line":21,"end_column":61}],"variable_declarations":[{"name":"resveration","type":"com.acme.modres.mbean.reservation.Reservation","initializer":"","start_line":17,"start_column":19,"end_line":17,"end_column":29},{"name":"selectedDate","type":"java.util.Date","initializer":"data.getSelectedDate()","start_line":19,"start_column":22,"end_line":19,"end_column":58},{"name":"fromDate","type":"java.util.Date","initializer":"new SimpleDateFormat(Constants.DATA_FORMAT).parse(resveration.getFromDate())","start_line":20,"start_column":10,"end_line":20,"end_column":96},{"name":"toDate","type":"java.util.Date","initializer":"new SimpleDateFormat(Constants.DATA_FORMAT).parse(resveration.getToDate())","start_line":21,"start_column":10,"end_line":21,"end_column":92}],"cyclomatic_complexity":4},"(ReservationCheckerData)":{"signature":"DateChecker(ReservationCheckerData)","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public DateChecker(ReservationCheckerData data)","parameters":[{"type":"com.acme.modres.mbean.reservation.ReservationCheckerData","name":"data","annotations":[],"modifiers":[]}],"code":"{\n this.data = data;\n}","start_line":11,"end_line":13,"is_implicit":false,"is_constructor":true,"referenced_types":["com.acme.modres.mbean.reservation.ReservationCheckerData"],"accessed_fields":["com.acme.modres.mbean.reservation.DateChecker.data"],"call_sites":[],"variable_declarations":[],"cyclomatic_complexity":1}},"field_declarations":[{"comment":"","type":"com.acme.modres.mbean.reservation.ReservationCheckerData","start_line":9,"end_line":9,"variables":["data"],"modifiers":[],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/FirstServlet.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/FirstServlet.java","comment":"","imports":["java.io.IOException","java.io.PrintWriter","javax.servlet.ServletException","javax.servlet.http.HttpServlet","javax.servlet.http.HttpServletRequest","javax.servlet.http.HttpServletResponse"],"type_declarations":{"com.acme.modres.FirstServlet":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":["javax.servlet.http.HttpServlet"],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"doGet(HttpServletRequest, HttpServletResponse)":{"signature":"doGet(HttpServletRequest, HttpServletResponse)","comment":"","annotations":["@Override"],"modifiers":["protected"],"thrown_exceptions":["javax.servlet.ServletException","java.io.IOException"],"declaration":"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException","parameters":[{"type":"javax.servlet.http.HttpServletRequest","name":"request","annotations":[],"modifiers":[]},{"type":"javax.servlet.http.HttpServletResponse","name":"response","annotations":[],"modifiers":[]}],"code":"{\n response.setContentType(\"text/plain\");\n String user = request.getParameter(\"user\");\n if (user == null) {\n user = \"defaultUser\";\n }\n PrintWriter out = response.getWriter();\n out.print(\"Welcome \" + user);\n}","start_line":15,"end_line":27,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.io.PrintWriter","java.lang.String"],"accessed_fields":[],"call_sites":[{"method_name":"setContentType","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setContentType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":18,"start_column":3,"end_line":18,"end_column":39},{"method_name":"getParameter","receiver_expr":"request","receiver_type":"javax.servlet.http.HttpServletRequest","argument_types":["java.lang.String"],"return_type":"java.lang.String","callee_signature":"getParameter(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":20,"start_column":17,"end_line":20,"end_column":44},{"method_name":"getWriter","receiver_expr":"response","receiver_type":"javax.servlet.http.HttpServletResponse","argument_types":[],"return_type":"java.io.PrintWriter","callee_signature":"getWriter()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":25,"start_column":21,"end_line":25,"end_column":40},{"method_name":"print","receiver_expr":"out","receiver_type":"java.io.PrintWriter","argument_types":["java.lang.String"],"return_type":"","callee_signature":"print(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":26,"start_column":6,"end_line":26,"end_column":33}],"variable_declarations":[{"name":"user","type":"java.lang.String","initializer":"request.getParameter(\"user\")","start_line":20,"start_column":10,"end_line":20,"end_column":44},{"name":"out","type":"java.io.PrintWriter","initializer":"response.getWriter()","start_line":25,"start_column":15,"end_line":25,"end_column":40}],"cyclomatic_complexity":2}},"field_declarations":[{"comment":"","type":"long","start_line":13,"end_line":13,"variables":["serialVersionUID"],"modifiers":["private","static","final"],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/db/ModResortsCustomerInformation.java":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/db/ModResortsCustomerInformation.java","comment":"","imports":["javax.annotation.Resource","javax.ejb.Singleton","javax.ejb.Startup","javax.sql.DataSource","java.sql.Connection","java.sql.PreparedStatement","java.sql.ResultSet","java.sql.SQLException","java.util.ArrayList"],"type_declarations":{"com.acme.modres.db.ModResortsCustomerInformation":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":["@Singleton","@Startup"],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"getCustomerInformation()":{"signature":"getCustomerInformation()","comment":"","annotations":[],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public ArrayList getCustomerInformation()","parameters":[],"code":"{\n Connection conn = null;\n PreparedStatement stmt = null;\n ResultSet rs = null;\n ArrayList customerInfo = new ArrayList<>();\n try {\n // Get a connection from the injected data source\n conn = dataSource.getConnection();\n // Create a prepared statement\n stmt = conn.prepareStatement(SELECT_CUSTOMERS_QUERY);\n // Execute the query\n rs = stmt.executeQuery();\n // Process the results\n while (rs.next()) {\n String info = rs.getString(\"INFO\");\n customerInfo.add(info);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n // Close the result set, statement, and connection\n try {\n if (rs != null)\n rs.close();\n if (stmt != null)\n stmt.close();\n if (conn != null)\n conn.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n return customerInfo;\n}","start_line":23,"end_line":59,"return_type":"java.util.ArrayList","is_implicit":false,"is_constructor":false,"referenced_types":["java.sql.Connection","java.sql.ResultSet","java.util.ArrayList","java.lang.String","java.sql.PreparedStatement"],"accessed_fields":["com.acme.modres.db.ModResortsCustomerInformation.SELECT_CUSTOMERS_QUERY","com.acme.modres.db.ModResortsCustomerInformation.dataSource"],"call_sites":[{"method_name":"getConnection","receiver_expr":"dataSource","receiver_type":"javax.sql.DataSource","argument_types":[],"return_type":"java.sql.Connection","callee_signature":"getConnection()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":32,"start_column":20,"end_line":32,"end_column":45},{"method_name":"prepareStatement","receiver_expr":"conn","receiver_type":"java.sql.Connection","argument_types":["java.lang.String"],"return_type":"java.sql.PreparedStatement","callee_signature":"prepareStatement(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":36,"start_column":20,"end_line":36,"end_column":64},{"method_name":"executeQuery","receiver_expr":"stmt","receiver_type":"java.sql.PreparedStatement","argument_types":[],"return_type":"java.sql.ResultSet","callee_signature":"executeQuery()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":38,"start_column":18,"end_line":38,"end_column":36},{"method_name":"next","receiver_expr":"rs","receiver_type":"java.sql.ResultSet","argument_types":[],"return_type":"","callee_signature":"next()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":41,"start_column":20,"end_line":41,"end_column":28},{"method_name":"getString","receiver_expr":"rs","receiver_type":"java.sql.ResultSet","argument_types":["java.lang.String"],"return_type":"java.lang.String","callee_signature":"getString(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":42,"start_column":31,"end_line":42,"end_column":50},{"method_name":"add","receiver_expr":"customerInfo","receiver_type":"java.util.ArrayList","argument_types":["java.lang.String"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":43,"start_column":17,"end_line":43,"end_column":38},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"java.sql.SQLException","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":47,"start_column":13,"end_line":47,"end_column":31},{"method_name":"close","receiver_expr":"rs","receiver_type":"java.sql.ResultSet","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":51,"start_column":33,"end_line":51,"end_column":42},{"method_name":"close","receiver_expr":"stmt","receiver_type":"java.sql.PreparedStatement","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":52,"start_column":35,"end_line":52,"end_column":46},{"method_name":"close","receiver_expr":"conn","receiver_type":"java.sql.Connection","argument_types":[],"return_type":"","callee_signature":"close()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":53,"start_column":35,"end_line":53,"end_column":46},{"method_name":"printStackTrace","receiver_expr":"e","receiver_type":"java.sql.SQLException","argument_types":[],"return_type":"","callee_signature":"printStackTrace()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":55,"start_column":17,"end_line":55,"end_column":35},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":28,"start_column":42,"end_line":28,"end_column":58}],"variable_declarations":[{"name":"conn","type":"java.sql.Connection","initializer":"null","start_line":24,"start_column":20,"end_line":24,"end_column":30},{"name":"stmt","type":"java.sql.PreparedStatement","initializer":"null","start_line":26,"start_column":27,"end_line":26,"end_column":37},{"name":"rs","type":"java.sql.ResultSet","initializer":"null","start_line":27,"start_column":19,"end_line":27,"end_column":27},{"name":"customerInfo","type":"java.util.ArrayList","initializer":"new ArrayList<>()","start_line":28,"start_column":27,"end_line":28,"end_column":58},{"name":"info","type":"java.lang.String","initializer":"rs.getString(\"INFO\")","start_line":42,"start_column":24,"end_line":42,"end_column":50}],"cyclomatic_complexity":11}},"field_declarations":[{"comment":"","type":"java.lang.String","start_line":16,"end_line":16,"variables":["SELECT_CUSTOMERS_QUERY"],"modifiers":["private","static","final"],"annotations":[]},{"comment":"","type":"javax.sql.DataSource","start_line":18,"end_line":21,"variables":["dataSource"],"modifiers":["private"],"annotations":["@Resource(lookup = \"jdbc/ModResortsJndi\")"]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/test/java/com/acme/modres/security/WCA_Service_Test_Passing.java":{"file_path":"/Users/anonymous/development/modresorts/src/test/java/com/acme/modres/security/WCA_Service_Test_Passing.java","comment":"/**\n * Generated by IBM watsonx Code Assistant for Enterprise Java Applications\n */","imports":["java.util.concurrent.TimeUnit","org.junit.jupiter.api.Assertions","org.junit.jupiter.api.Test","org.junit.jupiter.api.Timeout","org.junit.jupiter.api.Timeout.ThreadMode","org.junit.jupiter.api.Assertions.assertTrue","org.junit.jupiter.api.Timeout.ThreadMode.SEPARATE_THREAD"],"type_declarations":{"com.acme.modres.security.WCA_Service_Test_Passing":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"testOperationWithSecurityManager_jZRM0()":{"signature":"testOperationWithSecurityManager_jZRM0()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void testOperationWithSecurityManager_jZRM0()","parameters":[],"code":"{\n Service service = new Service();\n service.operation();\n assertTrue(true);\n}","start_line":33,"end_line":39,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.security.Service"],"accessed_fields":[],"call_sites":[{"method_name":"operation","receiver_expr":"service","receiver_type":"com.acme.modres.security.Service","argument_types":[],"return_type":"","callee_signature":"operation()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":37,"start_column":3,"end_line":37,"end_column":21},{"method_name":"assertTrue","receiver_expr":"","receiver_type":"","argument_types":[""],"return_type":"","callee_signature":"assertTrue(boolean)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":38,"start_column":3,"end_line":38,"end_column":18},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.security.Service","argument_types":[],"return_type":"com.acme.modres.security.Service","callee_signature":"Service()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":36,"start_column":21,"end_line":36,"end_column":33}],"variable_declarations":[{"name":"service","type":"com.acme.modres.security.Service","initializer":"new Service()","start_line":36,"start_column":11,"end_line":36,"end_column":33}],"cyclomatic_complexity":0},"testOperationWithoutSecurityManager_dwsK1()":{"signature":"testOperationWithoutSecurityManager_dwsK1()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void testOperationWithoutSecurityManager_dwsK1()","parameters":[],"code":"{\n System.setSecurityManager(null);\n Service service = new Service();\n service.operation();\n Assertions.assertTrue(true);\n}","start_line":24,"end_line":31,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.security.Service"],"accessed_fields":[],"call_sites":[{"method_name":"setSecurityManager","receiver_expr":"System","receiver_type":"java.lang.System","argument_types":[""],"return_type":"","callee_signature":"setSecurityManager(java.lang.SecurityManager)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":27,"start_column":3,"end_line":27,"end_column":33},{"method_name":"operation","receiver_expr":"service","receiver_type":"com.acme.modres.security.Service","argument_types":[],"return_type":"","callee_signature":"operation()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":29,"start_column":3,"end_line":29,"end_column":21},{"method_name":"assertTrue","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertTrue(boolean)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":30,"start_column":3,"end_line":30,"end_column":29},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.security.Service","argument_types":[],"return_type":"com.acme.modres.security.Service","callee_signature":"Service()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":28,"start_column":21,"end_line":28,"end_column":33}],"variable_declarations":[{"name":"service","type":"com.acme.modres.security.Service","initializer":"new Service()","start_line":28,"start_column":11,"end_line":28,"end_column":33}],"cyclomatic_complexity":0},"testOperationWithoutSecurityManager_prDe1()":{"signature":"testOperationWithoutSecurityManager_prDe1()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void testOperationWithoutSecurityManager_prDe1()","parameters":[],"code":"{\n System.setSecurityManager(null);\n Service service = new Service();\n service.operation();\n assertTrue(true);\n}","start_line":41,"end_line":48,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.security.Service"],"accessed_fields":[],"call_sites":[{"method_name":"setSecurityManager","receiver_expr":"System","receiver_type":"java.lang.System","argument_types":[""],"return_type":"","callee_signature":"setSecurityManager(java.lang.SecurityManager)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":44,"start_column":3,"end_line":44,"end_column":33},{"method_name":"operation","receiver_expr":"service","receiver_type":"com.acme.modres.security.Service","argument_types":[],"return_type":"","callee_signature":"operation()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":46,"start_column":3,"end_line":46,"end_column":21},{"method_name":"assertTrue","receiver_expr":"","receiver_type":"","argument_types":[""],"return_type":"","callee_signature":"assertTrue(boolean)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":47,"start_column":3,"end_line":47,"end_column":18},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.security.Service","argument_types":[],"return_type":"com.acme.modres.security.Service","callee_signature":"Service()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":45,"start_column":21,"end_line":45,"end_column":33}],"variable_declarations":[{"name":"service","type":"com.acme.modres.security.Service","initializer":"new Service()","start_line":45,"start_column":11,"end_line":45,"end_column":33}],"cyclomatic_complexity":0},"testOperationWithSecurityManager_LTHe0()":{"signature":"testOperationWithSecurityManager_LTHe0()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void testOperationWithSecurityManager_LTHe0()","parameters":[],"code":"{\n Service service = new Service();\n service.operation();\n Assertions.assertTrue(true);\n}","start_line":16,"end_line":22,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.security.Service"],"accessed_fields":[],"call_sites":[{"method_name":"operation","receiver_expr":"service","receiver_type":"com.acme.modres.security.Service","argument_types":[],"return_type":"","callee_signature":"operation()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":20,"start_column":3,"end_line":20,"end_column":21},{"method_name":"assertTrue","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertTrue(boolean)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":21,"start_column":3,"end_line":21,"end_column":29},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.security.Service","argument_types":[],"return_type":"com.acme.modres.security.Service","callee_signature":"Service()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":19,"start_column":21,"end_line":19,"end_column":33}],"variable_declarations":[{"name":"service","type":"com.acme.modres.security.Service","initializer":"new Service()","start_line":19,"start_column":11,"end_line":19,"end_column":33}],"cyclomatic_complexity":0}},"field_declarations":[]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/test/java/com/acme/modres/db/WCA_ModResortsCustomerInformation_Test_Passing.java":{"file_path":"/Users/anonymous/development/modresorts/src/test/java/com/acme/modres/db/WCA_ModResortsCustomerInformation_Test_Passing.java","comment":"/**\n * Generated by IBM watsonx Code Assistant for Enterprise Java Applications\n */","imports":["java.lang.reflect.Field","java.sql","java.util.ArrayList","java.util.concurrent.TimeUnit","javax.sql.DataSource","org.junit.jupiter.api.BeforeEach","org.junit.jupiter.api.Test","org.junit.jupiter.api.ThreadMode","org.junit.jupiter.api.Timeout","org.junit.jupiter.api.extension.ExtendWith","org.mockito.Mock","org.mockito.junit.jupiter.MockitoExtension","org.junit.jupiter.api.Assertions.assertEquals","org.junit.jupiter.api.Timeout.ThreadMode.SEPARATE_THREAD","org.mockito.Mockito"],"type_declarations":{"com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":["@ExtendWith(MockitoExtension.class)"],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"setup()":{"signature":"setup()","comment":"","annotations":["@BeforeEach"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void setup() throws Exception","parameters":[],"code":"{\n modresortscustomerinformation = new ModResortsCustomerInformation();\n preparedstatement = mock(PreparedStatement.class);\n resultset = mock(ResultSet.class);\n connection = mock(Connection.class);\n Field field_dataSource = ModResortsCustomerInformation.class.getDeclaredField(\"dataSource\");\n field_dataSource.setAccessible(true);\n field_dataSource.set(modresortscustomerinformation, dataSource);\n}","start_line":33,"end_line":42,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.reflect.Field"],"accessed_fields":["com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.modresortscustomerinformation","com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.connection","com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.dataSource","com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.preparedstatement","com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.resultset"],"call_sites":[{"method_name":"mock","receiver_expr":"","receiver_type":"","argument_types":["java.lang.Class"],"return_type":"java.sql.PreparedStatement","callee_signature":"mock(java.lang.Class)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":36,"start_column":23,"end_line":36,"end_column":51},{"method_name":"mock","receiver_expr":"","receiver_type":"","argument_types":["java.lang.Class"],"return_type":"java.sql.ResultSet","callee_signature":"mock(java.lang.Class)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":37,"start_column":15,"end_line":37,"end_column":35},{"method_name":"mock","receiver_expr":"","receiver_type":"","argument_types":["java.lang.Class"],"return_type":"java.sql.Connection","callee_signature":"mock(java.lang.Class)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":38,"start_column":16,"end_line":38,"end_column":37},{"method_name":"getDeclaredField","receiver_expr":"ModResortsCustomerInformation.class","receiver_type":"java.lang.Class","argument_types":["java.lang.String"],"return_type":"java.lang.reflect.Field","callee_signature":"getDeclaredField(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":39,"start_column":28,"end_line":39,"end_column":93},{"method_name":"setAccessible","receiver_expr":"field_dataSource","receiver_type":"java.lang.reflect.Field","argument_types":[""],"return_type":"","callee_signature":"setAccessible(boolean)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":40,"start_column":3,"end_line":40,"end_column":38},{"method_name":"set","receiver_expr":"field_dataSource","receiver_type":"java.lang.reflect.Field","argument_types":["com.acme.modres.db.ModResortsCustomerInformation","javax.sql.DataSource"],"return_type":"","callee_signature":"set(java.lang.Object, java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":41,"start_column":3,"end_line":41,"end_column":65},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"com.acme.modres.db.ModResortsCustomerInformation","callee_signature":"ModResortsCustomerInformation()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":35,"start_column":35,"end_line":35,"end_column":69}],"variable_declarations":[{"name":"field_dataSource","type":"java.lang.reflect.Field","initializer":"ModResortsCustomerInformation.class.getDeclaredField(\"dataSource\")","start_line":39,"start_column":9,"end_line":39,"end_column":93}],"cyclomatic_complexity":0},"getCustomerInformationTest_2()":{"signature":"getCustomerInformationTest_2()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.sql.SQLException"],"declaration":"public void getCustomerInformationTest_2() throws SQLException","parameters":[],"code":"{\n // Mock the resultSet to return a dummy value for the \"INFO\" column\n when(preparedstatement.executeQuery()).thenReturn(resultset);\n when(resultset.next()).thenReturn(true).thenReturn(false);\n when(resultset.getString(\"INFO\")).thenReturn(\"Dummy Customer Information\");\n // Mock the dataSource to return a mocked connection and preparedStatement\n when(dataSource.getConnection()).thenReturn(connection);\n when(connection.prepareStatement(SELECT_CUSTOMERS_QUERY)).thenReturn(preparedstatement);\n // Call the method under test and verify the results\n ArrayList customerInfo = modresortscustomerinformation.getCustomerInformation();\n assertEquals(\"Dummy Customer Information\", customerInfo.get(0));\n}","start_line":59,"end_line":72,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.ArrayList"],"accessed_fields":["com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.modresortscustomerinformation","com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.connection","com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.dataSource","com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.preparedstatement","com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.resultset","com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.SELECT_CUSTOMERS_QUERY"],"call_sites":[{"method_name":"thenReturn","receiver_expr":"when(preparedstatement.executeQuery())","receiver_type":"org.mockito.stubbing.OngoingStubbing","argument_types":["java.sql.ResultSet"],"return_type":"","callee_signature":"thenReturn(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":63,"start_column":3,"end_line":63,"end_column":62},{"method_name":"when","receiver_expr":"","receiver_type":"","argument_types":["java.sql.ResultSet"],"return_type":"org.mockito.stubbing.OngoingStubbing","callee_signature":"when(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":63,"start_column":3,"end_line":63,"end_column":40},{"method_name":"executeQuery","receiver_expr":"preparedstatement","receiver_type":"java.sql.PreparedStatement","argument_types":[],"return_type":"java.sql.ResultSet","callee_signature":"executeQuery()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":63,"start_column":8,"end_line":63,"end_column":39},{"method_name":"thenReturn","receiver_expr":"when(resultset.next()).thenReturn(true)","receiver_type":"","argument_types":[""],"return_type":"","callee_signature":"","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":false,"start_line":64,"start_column":3,"end_line":64,"end_column":59},{"method_name":"thenReturn","receiver_expr":"when(resultset.next())","receiver_type":"org.mockito.stubbing.OngoingStubbing","argument_types":[""],"return_type":"","callee_signature":"thenReturn(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":64,"start_column":3,"end_line":64,"end_column":41},{"method_name":"when","receiver_expr":"","receiver_type":"","argument_types":[""],"return_type":"org.mockito.stubbing.OngoingStubbing","callee_signature":"when(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":64,"start_column":3,"end_line":64,"end_column":24},{"method_name":"next","receiver_expr":"resultset","receiver_type":"java.sql.ResultSet","argument_types":[],"return_type":"","callee_signature":"next()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":64,"start_column":8,"end_line":64,"end_column":23},{"method_name":"thenReturn","receiver_expr":"when(resultset.getString(\"INFO\"))","receiver_type":"org.mockito.stubbing.OngoingStubbing","argument_types":["java.lang.String"],"return_type":"","callee_signature":"thenReturn(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":65,"start_column":3,"end_line":65,"end_column":76},{"method_name":"when","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String"],"return_type":"org.mockito.stubbing.OngoingStubbing","callee_signature":"when(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":65,"start_column":3,"end_line":65,"end_column":35},{"method_name":"getString","receiver_expr":"resultset","receiver_type":"java.sql.ResultSet","argument_types":["java.lang.String"],"return_type":"java.lang.String","callee_signature":"getString(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":65,"start_column":8,"end_line":65,"end_column":34},{"method_name":"thenReturn","receiver_expr":"when(dataSource.getConnection())","receiver_type":"org.mockito.stubbing.OngoingStubbing","argument_types":["java.sql.Connection"],"return_type":"","callee_signature":"thenReturn(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":67,"start_column":3,"end_line":67,"end_column":57},{"method_name":"when","receiver_expr":"","receiver_type":"","argument_types":["java.sql.Connection"],"return_type":"org.mockito.stubbing.OngoingStubbing","callee_signature":"when(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":67,"start_column":3,"end_line":67,"end_column":34},{"method_name":"getConnection","receiver_expr":"dataSource","receiver_type":"javax.sql.DataSource","argument_types":[],"return_type":"java.sql.Connection","callee_signature":"getConnection()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":67,"start_column":8,"end_line":67,"end_column":33},{"method_name":"thenReturn","receiver_expr":"when(connection.prepareStatement(SELECT_CUSTOMERS_QUERY))","receiver_type":"org.mockito.stubbing.OngoingStubbing","argument_types":["java.sql.PreparedStatement"],"return_type":"","callee_signature":"thenReturn(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":68,"start_column":3,"end_line":68,"end_column":89},{"method_name":"when","receiver_expr":"","receiver_type":"","argument_types":["java.sql.PreparedStatement"],"return_type":"org.mockito.stubbing.OngoingStubbing","callee_signature":"when(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":68,"start_column":3,"end_line":68,"end_column":59},{"method_name":"prepareStatement","receiver_expr":"connection","receiver_type":"java.sql.Connection","argument_types":["java.lang.String"],"return_type":"java.sql.PreparedStatement","callee_signature":"prepareStatement(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":68,"start_column":8,"end_line":68,"end_column":58},{"method_name":"getCustomerInformation","receiver_expr":"modresortscustomerinformation","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"getCustomerInformation()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":70,"start_column":36,"end_line":70,"end_column":89},{"method_name":"assertEquals","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String","java.lang.String"],"return_type":"","callee_signature":"assertEquals(java.lang.Object, java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":71,"start_column":3,"end_line":71,"end_column":65},{"method_name":"get","receiver_expr":"customerInfo","receiver_type":"java.util.ArrayList","argument_types":[""],"return_type":"java.lang.String","callee_signature":"get(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":71,"start_column":46,"end_line":71,"end_column":64}],"variable_declarations":[{"name":"customerInfo","type":"java.util.ArrayList","initializer":"modresortscustomerinformation.getCustomerInformation()","start_line":70,"start_column":21,"end_line":70,"end_column":89}],"cyclomatic_complexity":0},"getCustomerInformationTest_1()":{"signature":"getCustomerInformationTest_1()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.sql.SQLException"],"declaration":"public void getCustomerInformationTest_1() throws SQLException","parameters":[],"code":"{\n // Mock the resultSet to return a dummy value for the \"INFO\" column\n when(preparedstatement.executeQuery()).thenReturn(resultset);\n when(resultset.next()).thenReturn(true).thenReturn(false);\n when(resultset.getString(\"INFO\")).thenReturn(\"Dummy Customer Information\");\n // Mock the dataSource to return a mocked connection and preparedStatement\n when(dataSource.getConnection()).thenReturn(connection);\n when(connection.prepareStatement(SELECT_CUSTOMERS_QUERY)).thenReturn(preparedstatement);\n // Call the method under test and verify the results\n ArrayList customerInfo = modresortscustomerinformation.getCustomerInformation();\n assertEquals(1, customerInfo.size());\n}","start_line":44,"end_line":57,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.ArrayList"],"accessed_fields":["com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.modresortscustomerinformation","com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.connection","com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.dataSource","com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.preparedstatement","com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.resultset","com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Passing.SELECT_CUSTOMERS_QUERY"],"call_sites":[{"method_name":"thenReturn","receiver_expr":"when(preparedstatement.executeQuery())","receiver_type":"org.mockito.stubbing.OngoingStubbing","argument_types":["java.sql.ResultSet"],"return_type":"","callee_signature":"thenReturn(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":48,"start_column":3,"end_line":48,"end_column":62},{"method_name":"when","receiver_expr":"","receiver_type":"","argument_types":["java.sql.ResultSet"],"return_type":"org.mockito.stubbing.OngoingStubbing","callee_signature":"when(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":48,"start_column":3,"end_line":48,"end_column":40},{"method_name":"executeQuery","receiver_expr":"preparedstatement","receiver_type":"java.sql.PreparedStatement","argument_types":[],"return_type":"java.sql.ResultSet","callee_signature":"executeQuery()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":48,"start_column":8,"end_line":48,"end_column":39},{"method_name":"thenReturn","receiver_expr":"when(resultset.next()).thenReturn(true)","receiver_type":"","argument_types":[""],"return_type":"","callee_signature":"","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":false,"start_line":49,"start_column":3,"end_line":49,"end_column":59},{"method_name":"thenReturn","receiver_expr":"when(resultset.next())","receiver_type":"org.mockito.stubbing.OngoingStubbing","argument_types":[""],"return_type":"","callee_signature":"thenReturn(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":49,"start_column":3,"end_line":49,"end_column":41},{"method_name":"when","receiver_expr":"","receiver_type":"","argument_types":[""],"return_type":"org.mockito.stubbing.OngoingStubbing","callee_signature":"when(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":49,"start_column":3,"end_line":49,"end_column":24},{"method_name":"next","receiver_expr":"resultset","receiver_type":"java.sql.ResultSet","argument_types":[],"return_type":"","callee_signature":"next()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":49,"start_column":8,"end_line":49,"end_column":23},{"method_name":"thenReturn","receiver_expr":"when(resultset.getString(\"INFO\"))","receiver_type":"org.mockito.stubbing.OngoingStubbing","argument_types":["java.lang.String"],"return_type":"","callee_signature":"thenReturn(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":50,"start_column":3,"end_line":50,"end_column":76},{"method_name":"when","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String"],"return_type":"org.mockito.stubbing.OngoingStubbing","callee_signature":"when(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":50,"start_column":3,"end_line":50,"end_column":35},{"method_name":"getString","receiver_expr":"resultset","receiver_type":"java.sql.ResultSet","argument_types":["java.lang.String"],"return_type":"java.lang.String","callee_signature":"getString(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":50,"start_column":8,"end_line":50,"end_column":34},{"method_name":"thenReturn","receiver_expr":"when(dataSource.getConnection())","receiver_type":"org.mockito.stubbing.OngoingStubbing","argument_types":["java.sql.Connection"],"return_type":"","callee_signature":"thenReturn(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":52,"start_column":3,"end_line":52,"end_column":57},{"method_name":"when","receiver_expr":"","receiver_type":"","argument_types":["java.sql.Connection"],"return_type":"org.mockito.stubbing.OngoingStubbing","callee_signature":"when(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":52,"start_column":3,"end_line":52,"end_column":34},{"method_name":"getConnection","receiver_expr":"dataSource","receiver_type":"javax.sql.DataSource","argument_types":[],"return_type":"java.sql.Connection","callee_signature":"getConnection()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":52,"start_column":8,"end_line":52,"end_column":33},{"method_name":"thenReturn","receiver_expr":"when(connection.prepareStatement(SELECT_CUSTOMERS_QUERY))","receiver_type":"org.mockito.stubbing.OngoingStubbing","argument_types":["java.sql.PreparedStatement"],"return_type":"","callee_signature":"thenReturn(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":53,"start_column":3,"end_line":53,"end_column":89},{"method_name":"when","receiver_expr":"","receiver_type":"","argument_types":["java.sql.PreparedStatement"],"return_type":"org.mockito.stubbing.OngoingStubbing","callee_signature":"when(T)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":53,"start_column":3,"end_line":53,"end_column":59},{"method_name":"prepareStatement","receiver_expr":"connection","receiver_type":"java.sql.Connection","argument_types":["java.lang.String"],"return_type":"java.sql.PreparedStatement","callee_signature":"prepareStatement(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":53,"start_column":8,"end_line":53,"end_column":58},{"method_name":"getCustomerInformation","receiver_expr":"modresortscustomerinformation","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"getCustomerInformation()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":55,"start_column":36,"end_line":55,"end_column":89},{"method_name":"assertEquals","receiver_expr":"","receiver_type":"","argument_types":["",""],"return_type":"","callee_signature":"assertEquals(int, int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":56,"start_column":3,"end_line":56,"end_column":38},{"method_name":"size","receiver_expr":"customerInfo","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"","callee_signature":"size()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":56,"start_column":19,"end_line":56,"end_column":37}],"variable_declarations":[{"name":"customerInfo","type":"java.util.ArrayList","initializer":"modresortscustomerinformation.getCustomerInformation()","start_line":55,"start_column":21,"end_line":55,"end_column":89}],"cyclomatic_complexity":0}},"field_declarations":[{"comment":"","type":"java.lang.String","start_line":25,"end_line":25,"variables":["SELECT_CUSTOMERS_QUERY"],"modifiers":["private","static","final"],"annotations":[]},{"comment":"","type":"javax.sql.DataSource","start_line":26,"end_line":27,"variables":["dataSource"],"modifiers":["private"],"annotations":["@Mock"]},{"comment":"","type":"com.acme.modres.db.ModResortsCustomerInformation","start_line":28,"end_line":28,"variables":["modresortscustomerinformation"],"modifiers":[],"annotations":[]},{"comment":"","type":"java.sql.PreparedStatement","start_line":29,"end_line":29,"variables":["preparedstatement"],"modifiers":[],"annotations":[]},{"comment":"","type":"java.sql.ResultSet","start_line":30,"end_line":30,"variables":["resultset"],"modifiers":[],"annotations":[]},{"comment":"","type":"java.sql.Connection","start_line":31,"end_line":31,"variables":["connection"],"modifiers":[],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/test/java/com/acme/modres/db/WCA_ModResortsCustomerInformation_Test_Failing.java":{"file_path":"/Users/anonymous/development/modresorts/src/test/java/com/acme/modres/db/WCA_ModResortsCustomerInformation_Test_Failing.java","comment":"/**\n * Generated by IBM watsonx Code Assistant for Enterprise Java Applications\n */","imports":["java.sql.Connection","java.sql.PreparedStatement","java.sql.ResultSet","java.util.ArrayList","java.util.concurrent.TimeUnit","javax.sql.DataSource","org.junit.jupiter.api.Assertions","org.junit.jupiter.api.Test","org.junit.jupiter.api.Timeout","org.junit.jupiter.api.Timeout.ThreadMode","org.junit.jupiter.api.extension.ExtendWith","org.mockito.Mock","org.mockito.junit.jupiter.MockitoExtension","org.mockito.junit.jupiter.MockitoSettings","org.mockito.quality.Strictness","org.junit.jupiter.api.Assertions","org.junit.jupiter.api.Timeout.ThreadMode.SEPARATE_THREAD"],"type_declarations":{"com.acme.modres.db.WCA_ModResortsCustomerInformation_Test_Failing":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":["@ExtendWith(MockitoExtension.class)","@MockitoSettings(strictness = Strictness.LENIENT)"],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"getCustomerInformationTest6_trkn5()":{"signature":"getCustomerInformationTest6_trkn5()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void getCustomerInformationTest6_trkn5()","parameters":[],"code":"{\n ModResortsCustomerInformation customerInformation = new ModResortsCustomerInformation();\n ArrayList customerInfo = customerInformation.getCustomerInformation();\n Assertions.assertTrue(customerInfo.isEmpty());\n}","start_line":54,"end_line":60,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.db.ModResortsCustomerInformation","java.util.ArrayList"],"accessed_fields":[],"call_sites":[{"method_name":"getCustomerInformation","receiver_expr":"customerInformation","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"getCustomerInformation()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":58,"start_column":36,"end_line":58,"end_column":79},{"method_name":"assertTrue","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertTrue(boolean)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":59,"start_column":3,"end_line":59,"end_column":47},{"method_name":"isEmpty","receiver_expr":"customerInfo","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"","callee_signature":"isEmpty()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":59,"start_column":25,"end_line":59,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"com.acme.modres.db.ModResortsCustomerInformation","callee_signature":"ModResortsCustomerInformation()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":57,"start_column":55,"end_line":57,"end_column":89}],"variable_declarations":[{"name":"customerInformation","type":"com.acme.modres.db.ModResortsCustomerInformation","initializer":"new ModResortsCustomerInformation()","start_line":57,"start_column":33,"end_line":57,"end_column":89},{"name":"customerInfo","type":"java.util.ArrayList","initializer":"customerInformation.getCustomerInformation()","start_line":58,"start_column":21,"end_line":58,"end_column":79}],"cyclomatic_complexity":0},"getCustomerInformationTest1_kXNp0()":{"signature":"getCustomerInformationTest1_kXNp0()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void getCustomerInformationTest1_kXNp0()","parameters":[],"code":"{\n ModResortsCustomerInformation customerInfo = new ModResortsCustomerInformation();\n ArrayList info = customerInfo.getCustomerInformation();\n Assertions.assertNotNull(info);\n}","start_line":70,"end_line":76,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.db.ModResortsCustomerInformation","java.util.ArrayList"],"accessed_fields":[],"call_sites":[{"method_name":"getCustomerInformation","receiver_expr":"customerInfo","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"getCustomerInformation()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":74,"start_column":28,"end_line":74,"end_column":64},{"method_name":"assertNotNull","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":["java.util.ArrayList"],"return_type":"","callee_signature":"assertNotNull(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":75,"start_column":3,"end_line":75,"end_column":32},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"com.acme.modres.db.ModResortsCustomerInformation","callee_signature":"ModResortsCustomerInformation()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":73,"start_column":48,"end_line":73,"end_column":82}],"variable_declarations":[{"name":"customerInfo","type":"com.acme.modres.db.ModResortsCustomerInformation","initializer":"new ModResortsCustomerInformation()","start_line":73,"start_column":33,"end_line":73,"end_column":82},{"name":"info","type":"java.util.ArrayList","initializer":"customerInfo.getCustomerInformation()","start_line":74,"start_column":21,"end_line":74,"end_column":64}],"cyclomatic_complexity":0},"getCustomerInformationTest1_bDuV0()":{"signature":"getCustomerInformationTest1_bDuV0()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void getCustomerInformationTest1_bDuV0()","parameters":[],"code":"{\n ModResortsCustomerInformation customerInformation = new ModResortsCustomerInformation();\n ArrayList customerInfo = customerInformation.getCustomerInformation();\n Assertions.assertNotNull(customerInfo);\n}","start_line":46,"end_line":52,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.db.ModResortsCustomerInformation","java.util.ArrayList"],"accessed_fields":[],"call_sites":[{"method_name":"getCustomerInformation","receiver_expr":"customerInformation","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"getCustomerInformation()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":50,"start_column":36,"end_line":50,"end_column":79},{"method_name":"assertNotNull","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":["java.util.ArrayList"],"return_type":"","callee_signature":"assertNotNull(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":51,"start_column":3,"end_line":51,"end_column":40},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"com.acme.modres.db.ModResortsCustomerInformation","callee_signature":"ModResortsCustomerInformation()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":49,"start_column":55,"end_line":49,"end_column":89}],"variable_declarations":[{"name":"customerInformation","type":"com.acme.modres.db.ModResortsCustomerInformation","initializer":"new ModResortsCustomerInformation()","start_line":49,"start_column":33,"end_line":49,"end_column":89},{"name":"customerInfo","type":"java.util.ArrayList","initializer":"customerInformation.getCustomerInformation()","start_line":50,"start_column":21,"end_line":50,"end_column":79}],"cyclomatic_complexity":0},"getCustomerInformationTest5_Nwco4()":{"signature":"getCustomerInformationTest5_Nwco4()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void getCustomerInformationTest5_Nwco4()","parameters":[],"code":"{\n ModResortsCustomerInformation customerInfo = new ModResortsCustomerInformation();\n ArrayList info = customerInfo.getCustomerInformation();\n Assertions.assertTrue(info.isEmpty());\n}","start_line":78,"end_line":84,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.db.ModResortsCustomerInformation","java.util.ArrayList"],"accessed_fields":[],"call_sites":[{"method_name":"getCustomerInformation","receiver_expr":"customerInfo","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"getCustomerInformation()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":82,"start_column":28,"end_line":82,"end_column":64},{"method_name":"assertTrue","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertTrue(boolean)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":83,"start_column":3,"end_line":83,"end_column":39},{"method_name":"isEmpty","receiver_expr":"info","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"","callee_signature":"isEmpty()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":83,"start_column":25,"end_line":83,"end_column":38},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"com.acme.modres.db.ModResortsCustomerInformation","callee_signature":"ModResortsCustomerInformation()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":81,"start_column":48,"end_line":81,"end_column":82}],"variable_declarations":[{"name":"customerInfo","type":"com.acme.modres.db.ModResortsCustomerInformation","initializer":"new ModResortsCustomerInformation()","start_line":81,"start_column":33,"end_line":81,"end_column":82},{"name":"info","type":"java.util.ArrayList","initializer":"customerInfo.getCustomerInformation()","start_line":82,"start_column":21,"end_line":82,"end_column":64}],"cyclomatic_complexity":0},"test1_NGoz0()":{"signature":"test1_NGoz0()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void test1_NGoz0()","parameters":[],"code":"{\n ModResortsCustomerInformation customer = new ModResortsCustomerInformation();\n ArrayList customerInfo = customer.getCustomerInformation();\n assertEquals(true, customerInfo.isEmpty());\n}","start_line":37,"end_line":44,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.db.ModResortsCustomerInformation","java.util.ArrayList"],"accessed_fields":[],"call_sites":[{"method_name":"getCustomerInformation","receiver_expr":"customer","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"getCustomerInformation()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":42,"start_column":36,"end_line":42,"end_column":68},{"method_name":"assertEquals","receiver_expr":"","receiver_type":"","argument_types":["",""],"return_type":"","callee_signature":"assertEquals(java.lang.Object, java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":43,"start_column":3,"end_line":43,"end_column":44},{"method_name":"isEmpty","receiver_expr":"customerInfo","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"","callee_signature":"isEmpty()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":43,"start_column":22,"end_line":43,"end_column":43},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"com.acme.modres.db.ModResortsCustomerInformation","callee_signature":"ModResortsCustomerInformation()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":41,"start_column":44,"end_line":41,"end_column":78}],"variable_declarations":[{"name":"customer","type":"com.acme.modres.db.ModResortsCustomerInformation","initializer":"new ModResortsCustomerInformation()","start_line":41,"start_column":33,"end_line":41,"end_column":78},{"name":"customerInfo","type":"java.util.ArrayList","initializer":"customer.getCustomerInformation()","start_line":42,"start_column":21,"end_line":42,"end_column":68}],"cyclomatic_complexity":0},"getCustomerInformationTest1_Qprl0()":{"signature":"getCustomerInformationTest1_Qprl0()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void getCustomerInformationTest1_Qprl0()","parameters":[],"code":"{\n ModResortsCustomerInformation customerInfo = new ModResortsCustomerInformation();\n ArrayList info = customerInfo.getCustomerInformation();\n assertTrue(info.size() > 0);\n}","start_line":62,"end_line":68,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.db.ModResortsCustomerInformation","java.util.ArrayList"],"accessed_fields":[],"call_sites":[{"method_name":"getCustomerInformation","receiver_expr":"customerInfo","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"getCustomerInformation()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":66,"start_column":28,"end_line":66,"end_column":64},{"method_name":"assertTrue","receiver_expr":"","receiver_type":"","argument_types":[""],"return_type":"","callee_signature":"assertTrue(boolean)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":67,"start_column":3,"end_line":67,"end_column":29},{"method_name":"size","receiver_expr":"info","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"","callee_signature":"size()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":67,"start_column":14,"end_line":67,"end_column":24},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"com.acme.modres.db.ModResortsCustomerInformation","callee_signature":"ModResortsCustomerInformation()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":65,"start_column":48,"end_line":65,"end_column":82}],"variable_declarations":[{"name":"customerInfo","type":"com.acme.modres.db.ModResortsCustomerInformation","initializer":"new ModResortsCustomerInformation()","start_line":65,"start_column":33,"end_line":65,"end_column":82},{"name":"info","type":"java.util.ArrayList","initializer":"customerInfo.getCustomerInformation()","start_line":66,"start_column":21,"end_line":66,"end_column":64}],"cyclomatic_complexity":0},"getCustomerInformationTest9_vfTj8()":{"signature":"getCustomerInformationTest9_vfTj8()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void getCustomerInformationTest9_vfTj8()","parameters":[],"code":"{\n ModResortsCustomerInformation customerInfo = new ModResortsCustomerInformation();\n ArrayList info = customerInfo.getCustomerInformation();\n Assertions.assertEquals(3, info.size());\n}","start_line":86,"end_line":92,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.db.ModResortsCustomerInformation","java.util.ArrayList"],"accessed_fields":[],"call_sites":[{"method_name":"getCustomerInformation","receiver_expr":"customerInfo","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"getCustomerInformation()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":90,"start_column":28,"end_line":90,"end_column":64},{"method_name":"assertEquals","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":["",""],"return_type":"","callee_signature":"assertEquals(int, int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":91,"start_column":3,"end_line":91,"end_column":41},{"method_name":"size","receiver_expr":"info","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"","callee_signature":"size()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":91,"start_column":30,"end_line":91,"end_column":40},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.db.ModResortsCustomerInformation","argument_types":[],"return_type":"com.acme.modres.db.ModResortsCustomerInformation","callee_signature":"ModResortsCustomerInformation()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":89,"start_column":48,"end_line":89,"end_column":82}],"variable_declarations":[{"name":"customerInfo","type":"com.acme.modres.db.ModResortsCustomerInformation","initializer":"new ModResortsCustomerInformation()","start_line":89,"start_column":33,"end_line":89,"end_column":82},{"name":"info","type":"java.util.ArrayList","initializer":"customerInfo.getCustomerInformation()","start_line":90,"start_column":21,"end_line":90,"end_column":64}],"cyclomatic_complexity":0}},"field_declarations":[{"comment":"","type":"java.lang.String","start_line":28,"end_line":28,"variables":["SELECT_CUSTOMERS_QUERY"],"modifiers":["private","static"],"annotations":[]},{"comment":"","type":"javax.sql.DataSource","start_line":29,"end_line":30,"variables":["dataSource"],"modifiers":["private"],"annotations":["@Mock"]},{"comment":"","type":"com.acme.modres.db.ModResortsCustomerInformation","start_line":31,"end_line":31,"variables":["modresortscustomerinformation"],"modifiers":[],"annotations":[]},{"comment":"","type":"javax.sql.DataSource","start_line":32,"end_line":32,"variables":["datasource"],"modifiers":[],"annotations":[]},{"comment":"","type":"java.sql.Connection","start_line":33,"end_line":33,"variables":["connection"],"modifiers":[],"annotations":[]},{"comment":"","type":"java.sql.PreparedStatement","start_line":34,"end_line":34,"variables":["preparedstatement"],"modifiers":[],"annotations":[]},{"comment":"","type":"java.sql.ResultSet","start_line":35,"end_line":35,"variables":["resultset"],"modifiers":[],"annotations":[]}]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/test/java/com/acme/modres/mbean/WCA_DMBeanUtils_Test_Failing.java":{"file_path":"/Users/anonymous/development/modresorts/src/test/java/com/acme/modres/mbean/WCA_DMBeanUtils_Test_Failing.java","comment":"/**\n * Generated by IBM watsonx Code Assistant for Enterprise Java Applications\n */","imports":["java.util.ArrayList","java.util.List","java.util.concurrent.TimeUnit","javax.management.MBeanOperationInfo","org.junit.jupiter.api.Assertions","org.junit.jupiter.api.Test","org.junit.jupiter.api.Timeout","org.junit.jupiter.api.Timeout.ThreadMode","org.junit.jupiter.api.Assertions","org.junit.jupiter.api.Timeout.ThreadMode.SEPARATE_THREAD"],"type_declarations":{"com.acme.modres.mbean.WCA_DMBeanUtils_Test_Failing":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"testGetOps_noqH0_3_fid2()":{"signature":"testGetOps_noqH0_3_fid2()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOps_noqH0_3_fid2() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList();\n opList.setOpMetadatList(opMetadatList);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n OpMetadata opMetadata = new OpMetadata();\n opMetadata.setName(\"test\");\n opMetadata.setDescription(\"test\");\n opMetadata.setType(\"test\");\n opMetadata.setImpact(1);\n opMetadatList.add(opMetadata);\n ops = DMBeanUtils.getOps(opList);\n opMetadatList.clear();\n for (int i = 0; i < 5; i++) {\n opMetadata = new OpMetadata();\n opMetadata.setName(\"test\" + i);\n opMetadata.setDescription(\"test\" + i);\n opMetadata.setType(\"test\" + i);\n opMetadata.setImpact(i);\n opMetadatList.add(opMetadata);\n }\n ops = DMBeanUtils.getOps(opList);\n Assertions.assertEquals(1, ops.length);\n}","start_line":129,"end_line":154,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":["length"],"call_sites":[{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":["java.util.List"],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":134,"start_column":3,"end_line":134,"end_column":40},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":135,"start_column":30,"end_line":135,"end_column":55},{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":137,"start_column":3,"end_line":137,"end_column":28},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":138,"start_column":3,"end_line":138,"end_column":35},{"method_name":"setType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":139,"start_column":3,"end_line":139,"end_column":28},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":140,"start_column":3,"end_line":140,"end_column":25},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":141,"start_column":3,"end_line":141,"end_column":31},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":142,"start_column":9,"end_line":142,"end_column":34},{"method_name":"clear","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":[],"return_type":"","callee_signature":"clear()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":143,"start_column":3,"end_line":143,"end_column":23},{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":146,"start_column":4,"end_line":146,"end_column":33},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":147,"start_column":4,"end_line":147,"end_column":40},{"method_name":"setType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":148,"start_column":4,"end_line":148,"end_column":33},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":149,"start_column":4,"end_line":149,"end_column":26},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":150,"start_column":4,"end_line":150,"end_column":32},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":152,"start_column":9,"end_line":152,"end_column":34},{"method_name":"assertEquals","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":["",""],"return_type":"","callee_signature":"assertEquals(int, int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":153,"start_column":3,"end_line":153,"end_column":40},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":132,"start_column":27,"end_line":132,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":133,"start_column":36,"end_line":133,"end_column":62},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":136,"start_column":27,"end_line":136,"end_column":42},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":145,"start_column":17,"end_line":145,"end_column":32}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":132,"start_column":18,"end_line":132,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList()","start_line":133,"start_column":20,"end_line":133,"end_column":62},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":135,"start_column":24,"end_line":135,"end_column":55},{"name":"opMetadata","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata()","start_line":136,"start_column":14,"end_line":136,"end_column":42},{"name":"i","type":"int","initializer":"0","start_line":144,"start_column":12,"end_line":144,"end_column":16}],"cyclomatic_complexity":0},"testGetOps_noqH0_4()":{"signature":"testGetOps_noqH0_4()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOps_noqH0_4() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList();\n opList.setOpMetadatList(opMetadatList);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n OpMetadata opMetadata = new OpMetadata();\n opMetadata.setName(\"test\");\n opMetadata.setDescription(\"test\");\n opMetadata.setType(\"test\");\n opMetadata.setImpact(1);\n opMetadatList.add(opMetadata);\n ops = DMBeanUtils.getOps(opList);\n opMetadatList.clear();\n for (int i = 0; i < 5; i++) {\n opMetadata = new OpMetadata();\n opMetadata.setName(\"test\" + i);\n opMetadata.setDescription(\"test\" + i);\n opMetadata.setType(\"test\" + i);\n opMetadata.setImpact(i);\n opMetadatList.add(opMetadata);\n }\n ops = DMBeanUtils.getOps(opList);\n Assertions.assertNotNull(ops);\n opMetadata.setImpact(4);\n Assertions.assertThrows(IllegalArgumentException.class, () -> DMBeanUtils.getOps(opList));\n}","start_line":73,"end_line":100,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":[],"call_sites":[{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":["java.util.List"],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":78,"start_column":3,"end_line":78,"end_column":40},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":79,"start_column":30,"end_line":79,"end_column":55},{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":81,"start_column":3,"end_line":81,"end_column":28},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":82,"start_column":3,"end_line":82,"end_column":35},{"method_name":"setType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":83,"start_column":3,"end_line":83,"end_column":28},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":84,"start_column":3,"end_line":84,"end_column":25},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":85,"start_column":3,"end_line":85,"end_column":31},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":86,"start_column":9,"end_line":86,"end_column":34},{"method_name":"clear","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":[],"return_type":"","callee_signature":"clear()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":87,"start_column":3,"end_line":87,"end_column":23},{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":90,"start_column":4,"end_line":90,"end_column":33},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":91,"start_column":4,"end_line":91,"end_column":40},{"method_name":"setType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":92,"start_column":4,"end_line":92,"end_column":33},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":93,"start_column":4,"end_line":93,"end_column":26},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":94,"start_column":4,"end_line":94,"end_column":32},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":96,"start_column":9,"end_line":96,"end_column":34},{"method_name":"assertNotNull","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertNotNull(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":97,"start_column":3,"end_line":97,"end_column":31},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":98,"start_column":3,"end_line":98,"end_column":25},{"method_name":"assertThrows","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":["java.lang.Class",""],"return_type":"","callee_signature":"assertThrows(java.lang.Class, org.junit.jupiter.api.function.Executable)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":99,"start_column":3,"end_line":99,"end_column":91},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":99,"start_column":65,"end_line":99,"end_column":90},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":76,"start_column":27,"end_line":76,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":77,"start_column":36,"end_line":77,"end_column":62},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":80,"start_column":27,"end_line":80,"end_column":42},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":89,"start_column":17,"end_line":89,"end_column":32}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":76,"start_column":18,"end_line":76,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList()","start_line":77,"start_column":20,"end_line":77,"end_column":62},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":79,"start_column":24,"end_line":79,"end_column":55},{"name":"opMetadata","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata()","start_line":80,"start_column":14,"end_line":80,"end_column":42},{"name":"i","type":"int","initializer":"0","start_line":88,"start_column":12,"end_line":88,"end_column":16}],"cyclomatic_complexity":0},"testGetOps_noqH0_2_fid2()":{"signature":"testGetOps_noqH0_2_fid2()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOps_noqH0_2_fid2() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList();\n opList.setOpMetadatList(opMetadatList);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n OpMetadata opMetadata = new OpMetadata();\n opMetadata.setName(\"test\");\n opMetadata.setDescription(\"test\");\n opMetadata.setType(\"test\");\n opMetadata.setImpact(1);\n opMetadatList.add(opMetadata);\n ops = DMBeanUtils.getOps(opList);\n opMetadatList.clear();\n for (int i = 0; i < 5; i++) {\n opMetadata = new OpMetadata();\n opMetadata.setName(\"test\" + i);\n opMetadata.setDescription(\"test\" + i);\n opMetadata.setType(\"test\" + i);\n opMetadata.setImpact(i);\n opMetadatList.add(opMetadata);\n }\n ops = DMBeanUtils.getOps(opList);\n Assertions.assertNotNull(ops);\n}","start_line":102,"end_line":127,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":[],"call_sites":[{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":["java.util.List"],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":107,"start_column":3,"end_line":107,"end_column":40},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":108,"start_column":30,"end_line":108,"end_column":55},{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":110,"start_column":3,"end_line":110,"end_column":28},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":111,"start_column":3,"end_line":111,"end_column":35},{"method_name":"setType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":112,"start_column":3,"end_line":112,"end_column":28},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":113,"start_column":3,"end_line":113,"end_column":25},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":114,"start_column":3,"end_line":114,"end_column":31},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":115,"start_column":9,"end_line":115,"end_column":34},{"method_name":"clear","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":[],"return_type":"","callee_signature":"clear()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":116,"start_column":3,"end_line":116,"end_column":23},{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":119,"start_column":4,"end_line":119,"end_column":33},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":120,"start_column":4,"end_line":120,"end_column":40},{"method_name":"setType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":121,"start_column":4,"end_line":121,"end_column":33},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":122,"start_column":4,"end_line":122,"end_column":26},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":123,"start_column":4,"end_line":123,"end_column":32},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":125,"start_column":9,"end_line":125,"end_column":34},{"method_name":"assertNotNull","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertNotNull(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":126,"start_column":3,"end_line":126,"end_column":31},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":105,"start_column":27,"end_line":105,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":106,"start_column":36,"end_line":106,"end_column":62},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":109,"start_column":27,"end_line":109,"end_column":42},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":118,"start_column":17,"end_line":118,"end_column":32}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":105,"start_column":18,"end_line":105,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList()","start_line":106,"start_column":20,"end_line":106,"end_column":62},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":108,"start_column":24,"end_line":108,"end_column":55},{"name":"opMetadata","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata()","start_line":109,"start_column":14,"end_line":109,"end_column":42},{"name":"i","type":"int","initializer":"0","start_line":117,"start_column":12,"end_line":117,"end_column":16}],"cyclomatic_complexity":0},"testGetOps_noqH0_3()":{"signature":"testGetOps_noqH0_3()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOps_noqH0_3() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList();\n opList.setOpMetadatList(opMetadatList);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n OpMetadata opMetadata = new OpMetadata();\n opMetadata.setName(\"test\");\n opMetadata.setDescription(\"test\");\n opMetadata.setType(\"test\");\n opMetadata.setImpact(1);\n opMetadatList.add(opMetadata);\n ops = DMBeanUtils.getOps(opList);\n opMetadatList.clear();\n for (int i = 0; i < 5; i++) {\n opMetadata = new OpMetadata();\n opMetadata.setName(\"test\" + i);\n opMetadata.setDescription(\"test\" + i);\n opMetadata.setType(\"test\" + i);\n opMetadata.setImpact(i);\n opMetadatList.add(opMetadata);\n }\n ops = DMBeanUtils.getOps(opList);\n Assertions.assertEquals(5, ops.length);\n}","start_line":46,"end_line":71,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":["length"],"call_sites":[{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":["java.util.List"],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":51,"start_column":3,"end_line":51,"end_column":40},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":52,"start_column":30,"end_line":52,"end_column":55},{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":54,"start_column":3,"end_line":54,"end_column":28},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":55,"start_column":3,"end_line":55,"end_column":35},{"method_name":"setType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":56,"start_column":3,"end_line":56,"end_column":28},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":57,"start_column":3,"end_line":57,"end_column":25},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":58,"start_column":3,"end_line":58,"end_column":31},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":59,"start_column":9,"end_line":59,"end_column":34},{"method_name":"clear","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":[],"return_type":"","callee_signature":"clear()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":60,"start_column":3,"end_line":60,"end_column":23},{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":63,"start_column":4,"end_line":63,"end_column":33},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":64,"start_column":4,"end_line":64,"end_column":40},{"method_name":"setType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":65,"start_column":4,"end_line":65,"end_column":33},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":66,"start_column":4,"end_line":66,"end_column":26},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":67,"start_column":4,"end_line":67,"end_column":32},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":69,"start_column":9,"end_line":69,"end_column":34},{"method_name":"assertEquals","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":["",""],"return_type":"","callee_signature":"assertEquals(int, int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":70,"start_column":3,"end_line":70,"end_column":40},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":49,"start_column":27,"end_line":49,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":50,"start_column":36,"end_line":50,"end_column":62},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":53,"start_column":27,"end_line":53,"end_column":42},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":62,"start_column":17,"end_line":62,"end_column":32}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":49,"start_column":18,"end_line":49,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList()","start_line":50,"start_column":20,"end_line":50,"end_column":62},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":52,"start_column":24,"end_line":52,"end_column":55},{"name":"opMetadata","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata()","start_line":53,"start_column":14,"end_line":53,"end_column":42},{"name":"i","type":"int","initializer":"0","start_line":61,"start_column":12,"end_line":61,"end_column":16}],"cyclomatic_complexity":0},"testGetOps_noqH0_1()":{"signature":"testGetOps_noqH0_1()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOps_noqH0_1() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList();\n opList.setOpMetadatList(opMetadatList);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n OpMetadata opMetadata = new OpMetadata();\n opMetadata.setName(\"test\");\n opMetadata.setDescription(\"test\");\n opMetadata.setType(\"test\");\n opMetadata.setImpact(1);\n opMetadatList.add(opMetadata);\n ops = DMBeanUtils.getOps(opList);\n opMetadatList.clear();\n for (int i = 0; i < 5; i++) {\n opMetadata = new OpMetadata();\n opMetadata.setName(\"test\" + i);\n opMetadata.setDescription(\"test\" + i);\n opMetadata.setType(\"test\" + i);\n opMetadata.setImpact(i);\n opMetadatList.add(opMetadata);\n }\n ops = DMBeanUtils.getOps(opList);\n Assertions.assertNull(ops);\n}","start_line":19,"end_line":44,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":[],"call_sites":[{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":["java.util.List"],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":24,"start_column":3,"end_line":24,"end_column":40},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":25,"start_column":30,"end_line":25,"end_column":55},{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":27,"start_column":3,"end_line":27,"end_column":28},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":28,"start_column":3,"end_line":28,"end_column":35},{"method_name":"setType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":29,"start_column":3,"end_line":29,"end_column":28},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":30,"start_column":3,"end_line":30,"end_column":25},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":31,"start_column":3,"end_line":31,"end_column":31},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":32,"start_column":9,"end_line":32,"end_column":34},{"method_name":"clear","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":[],"return_type":"","callee_signature":"clear()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":33,"start_column":3,"end_line":33,"end_column":23},{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":36,"start_column":4,"end_line":36,"end_column":33},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":37,"start_column":4,"end_line":37,"end_column":40},{"method_name":"setType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":38,"start_column":4,"end_line":38,"end_column":33},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":39,"start_column":4,"end_line":39,"end_column":26},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":40,"start_column":4,"end_line":40,"end_column":32},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":42,"start_column":9,"end_line":42,"end_column":34},{"method_name":"assertNull","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertNull(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":43,"start_column":3,"end_line":43,"end_column":28},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":22,"start_column":27,"end_line":22,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":23,"start_column":36,"end_line":23,"end_column":62},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":26,"start_column":27,"end_line":26,"end_column":42},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":35,"start_column":17,"end_line":35,"end_column":32}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":22,"start_column":18,"end_line":22,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList()","start_line":23,"start_column":20,"end_line":23,"end_column":62},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":25,"start_column":24,"end_line":25,"end_column":55},{"name":"opMetadata","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata()","start_line":26,"start_column":14,"end_line":26,"end_column":42},{"name":"i","type":"int","initializer":"0","start_line":34,"start_column":12,"end_line":34,"end_column":16}],"cyclomatic_complexity":0}},"field_declarations":[]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/test/java/com/acme/modres/exception/WCA_ExceptionHandler_Test_Passing.java":{"file_path":"/Users/anonymous/development/modresorts/src/test/java/com/acme/modres/exception/WCA_ExceptionHandler_Test_Passing.java","comment":"/**\n * Generated by IBM watsonx Code Assistant for Enterprise Java Applications\n */","imports":["java.util.concurrent.TimeUnit","java.util.logging.Logger","javax.servlet.ServletException","org.junit.jupiter.api.Test","org.junit.jupiter.api.Timeout","org.junit.jupiter.api.Timeout.ThreadMode","org.junit.jupiter.api.Assertions.assertEquals","org.junit.jupiter.api.Assertions.fail","org.junit.jupiter.api.Timeout.ThreadMode.SEPARATE_THREAD"],"type_declarations":{"com.acme.modres.exception.WCA_ExceptionHandler_Test_Passing":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"handleExceptionWithExceptionTest_nKhx1()":{"signature":"handleExceptionWithExceptionTest_nKhx1()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void handleExceptionWithExceptionTest_nKhx1()","parameters":[],"code":"{\n Exception e = new Exception(\"This is an exception\");\n String errorMsg = \"This is an error message\";\n Logger logger = Logger.getLogger(\"Exception Logger\");\n try {\n ExceptionHandler.handleException(e, errorMsg, logger);\n } catch (ServletException se) {\n assertEquals(se.getMessage(), errorMsg);\n assertEquals(se.getCause(), e);\n return;\n }\n fail(\"handleException did not throw ServletException when Exception is not null\");\n}","start_line":66,"end_line":81,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.String","java.util.logging.Logger","java.lang.Exception"],"accessed_fields":[],"call_sites":[{"method_name":"getLogger","receiver_expr":"Logger","receiver_type":"java.util.logging.Logger","argument_types":["java.lang.String"],"return_type":"java.util.logging.Logger","callee_signature":"getLogger(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":72,"start_column":19,"end_line":72,"end_column":54},{"method_name":"handleException","receiver_expr":"ExceptionHandler","receiver_type":"com.acme.modres.exception.ExceptionHandler","argument_types":["java.lang.Exception","java.lang.String","java.util.logging.Logger"],"return_type":"","callee_signature":"handleException(java.lang.Exception, java.lang.String, java.util.logging.Logger)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":74,"start_column":4,"end_line":74,"end_column":56},{"method_name":"assertEquals","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String","java.lang.String"],"return_type":"","callee_signature":"assertEquals(java.lang.Object, java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":76,"start_column":4,"end_line":76,"end_column":42},{"method_name":"getMessage","receiver_expr":"se","receiver_type":"javax.servlet.ServletException","argument_types":[],"return_type":"java.lang.String","callee_signature":"getMessage()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":76,"start_column":17,"end_line":76,"end_column":31},{"method_name":"assertEquals","receiver_expr":"","receiver_type":"","argument_types":["java.lang.Throwable","java.lang.Exception"],"return_type":"","callee_signature":"assertEquals(java.lang.Object, java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":77,"start_column":4,"end_line":77,"end_column":33},{"method_name":"getCause","receiver_expr":"se","receiver_type":"javax.servlet.ServletException","argument_types":[],"return_type":"java.lang.Throwable","callee_signature":"getCause()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":77,"start_column":17,"end_line":77,"end_column":29},{"method_name":"fail","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String"],"return_type":"","callee_signature":"fail(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":80,"start_column":3,"end_line":80,"end_column":83},{"method_name":"","receiver_expr":"","receiver_type":"java.lang.Exception","argument_types":["java.lang.String"],"return_type":"java.lang.Exception","callee_signature":"Exception(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":70,"start_column":17,"end_line":70,"end_column":53}],"variable_declarations":[{"name":"e","type":"java.lang.Exception","initializer":"new Exception(\"This is an exception\")","start_line":70,"start_column":13,"end_line":70,"end_column":53},{"name":"errorMsg","type":"java.lang.String","initializer":"\"This is an error message\"","start_line":71,"start_column":10,"end_line":71,"end_column":46},{"name":"logger","type":"java.util.logging.Logger","initializer":"Logger.getLogger(\"Exception Logger\")","start_line":72,"start_column":10,"end_line":72,"end_column":54}],"cyclomatic_complexity":0},"testHandleException2_RfeX1()":{"signature":"testHandleException2_RfeX1()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void testHandleException2_RfeX1()","parameters":[],"code":"{\n Exception e = null;\n String errorMsg = \"Test Error Message\";\n Logger logger = Logger.getLogger(\"Test Logger\");\n try {\n ExceptionHandler.handleException(e, errorMsg, logger);\n } catch (ServletException ex) {\n assertEquals(ex.getMessage(), errorMsg);\n assertEquals(ex.getCause(), e);\n return;\n }\n fail(\"handleException should have thrown a ServletException\");\n}","start_line":34,"end_line":48,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.String","java.util.logging.Logger","java.lang.Exception"],"accessed_fields":[],"call_sites":[{"method_name":"getLogger","receiver_expr":"Logger","receiver_type":"java.util.logging.Logger","argument_types":["java.lang.String"],"return_type":"java.util.logging.Logger","callee_signature":"getLogger(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":39,"start_column":19,"end_line":39,"end_column":49},{"method_name":"handleException","receiver_expr":"ExceptionHandler","receiver_type":"com.acme.modres.exception.ExceptionHandler","argument_types":["java.lang.Exception","java.lang.String","java.util.logging.Logger"],"return_type":"","callee_signature":"handleException(java.lang.Exception, java.lang.String, java.util.logging.Logger)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":41,"start_column":4,"end_line":41,"end_column":56},{"method_name":"assertEquals","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String","java.lang.String"],"return_type":"","callee_signature":"assertEquals(java.lang.Object, java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":43,"start_column":4,"end_line":43,"end_column":42},{"method_name":"getMessage","receiver_expr":"ex","receiver_type":"javax.servlet.ServletException","argument_types":[],"return_type":"java.lang.String","callee_signature":"getMessage()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":43,"start_column":17,"end_line":43,"end_column":31},{"method_name":"assertEquals","receiver_expr":"","receiver_type":"","argument_types":["java.lang.Throwable","java.lang.Exception"],"return_type":"","callee_signature":"assertEquals(java.lang.Object, java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":44,"start_column":4,"end_line":44,"end_column":33},{"method_name":"getCause","receiver_expr":"ex","receiver_type":"javax.servlet.ServletException","argument_types":[],"return_type":"java.lang.Throwable","callee_signature":"getCause()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":44,"start_column":17,"end_line":44,"end_column":29},{"method_name":"fail","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String"],"return_type":"","callee_signature":"fail(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":47,"start_column":3,"end_line":47,"end_column":63}],"variable_declarations":[{"name":"e","type":"java.lang.Exception","initializer":"null","start_line":37,"start_column":13,"end_line":37,"end_column":20},{"name":"errorMsg","type":"java.lang.String","initializer":"\"Test Error Message\"","start_line":38,"start_column":10,"end_line":38,"end_column":40},{"name":"logger","type":"java.util.logging.Logger","initializer":"Logger.getLogger(\"Test Logger\")","start_line":39,"start_column":10,"end_line":39,"end_column":49}],"cyclomatic_complexity":0},"handleExceptionWithNullExceptionTest_MXIX0()":{"signature":"handleExceptionWithNullExceptionTest_MXIX0()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void handleExceptionWithNullExceptionTest_MXIX0()","parameters":[],"code":"{\n Exception e = null;\n String errorMsg = \"This is an error message\";\n Logger logger = Logger.getLogger(\"Exception Logger\");\n try {\n ExceptionHandler.handleException(e, errorMsg, logger);\n } catch (ServletException se) {\n assertEquals(se.getMessage(), errorMsg);\n return;\n }\n fail(\"handleException did not throw ServletException when Exception is null\");\n}","start_line":50,"end_line":64,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.String","java.util.logging.Logger","java.lang.Exception"],"accessed_fields":[],"call_sites":[{"method_name":"getLogger","receiver_expr":"Logger","receiver_type":"java.util.logging.Logger","argument_types":["java.lang.String"],"return_type":"java.util.logging.Logger","callee_signature":"getLogger(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":56,"start_column":19,"end_line":56,"end_column":54},{"method_name":"handleException","receiver_expr":"ExceptionHandler","receiver_type":"com.acme.modres.exception.ExceptionHandler","argument_types":["java.lang.Exception","java.lang.String","java.util.logging.Logger"],"return_type":"","callee_signature":"handleException(java.lang.Exception, java.lang.String, java.util.logging.Logger)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":58,"start_column":4,"end_line":58,"end_column":56},{"method_name":"assertEquals","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String","java.lang.String"],"return_type":"","callee_signature":"assertEquals(java.lang.Object, java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":60,"start_column":4,"end_line":60,"end_column":42},{"method_name":"getMessage","receiver_expr":"se","receiver_type":"javax.servlet.ServletException","argument_types":[],"return_type":"java.lang.String","callee_signature":"getMessage()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":60,"start_column":17,"end_line":60,"end_column":31},{"method_name":"fail","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String"],"return_type":"","callee_signature":"fail(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":63,"start_column":3,"end_line":63,"end_column":79}],"variable_declarations":[{"name":"e","type":"java.lang.Exception","initializer":"null","start_line":54,"start_column":13,"end_line":54,"end_column":20},{"name":"errorMsg","type":"java.lang.String","initializer":"\"This is an error message\"","start_line":55,"start_column":10,"end_line":55,"end_column":46},{"name":"logger","type":"java.util.logging.Logger","initializer":"Logger.getLogger(\"Exception Logger\")","start_line":56,"start_column":10,"end_line":56,"end_column":54}],"cyclomatic_complexity":0},"testHandleException1_Aved0()":{"signature":"testHandleException1_Aved0()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":[],"declaration":"public void testHandleException1_Aved0()","parameters":[],"code":"{\n Exception e = new Exception(\"Test Exception\");\n String errorMsg = \"Test Error Message\";\n Logger logger = Logger.getLogger(\"Test Logger\");\n try {\n ExceptionHandler.handleException(e, errorMsg, logger);\n } catch (ServletException ex) {\n assertEquals(ex.getMessage(), errorMsg);\n assertEquals(ex.getCause(), e);\n return;\n }\n fail(\"handleException should have thrown a ServletException\");\n}","start_line":18,"end_line":32,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.lang.String","java.util.logging.Logger","java.lang.Exception"],"accessed_fields":[],"call_sites":[{"method_name":"getLogger","receiver_expr":"Logger","receiver_type":"java.util.logging.Logger","argument_types":["java.lang.String"],"return_type":"java.util.logging.Logger","callee_signature":"getLogger(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":23,"start_column":19,"end_line":23,"end_column":49},{"method_name":"handleException","receiver_expr":"ExceptionHandler","receiver_type":"com.acme.modres.exception.ExceptionHandler","argument_types":["java.lang.Exception","java.lang.String","java.util.logging.Logger"],"return_type":"","callee_signature":"handleException(java.lang.Exception, java.lang.String, java.util.logging.Logger)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":25,"start_column":4,"end_line":25,"end_column":56},{"method_name":"assertEquals","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String","java.lang.String"],"return_type":"","callee_signature":"assertEquals(java.lang.Object, java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":27,"start_column":4,"end_line":27,"end_column":42},{"method_name":"getMessage","receiver_expr":"ex","receiver_type":"javax.servlet.ServletException","argument_types":[],"return_type":"java.lang.String","callee_signature":"getMessage()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":27,"start_column":17,"end_line":27,"end_column":31},{"method_name":"assertEquals","receiver_expr":"","receiver_type":"","argument_types":["java.lang.Throwable","java.lang.Exception"],"return_type":"","callee_signature":"assertEquals(java.lang.Object, java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":28,"start_column":4,"end_line":28,"end_column":33},{"method_name":"getCause","receiver_expr":"ex","receiver_type":"javax.servlet.ServletException","argument_types":[],"return_type":"java.lang.Throwable","callee_signature":"getCause()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":28,"start_column":17,"end_line":28,"end_column":29},{"method_name":"fail","receiver_expr":"","receiver_type":"","argument_types":["java.lang.String"],"return_type":"","callee_signature":"fail(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":31,"start_column":3,"end_line":31,"end_column":63},{"method_name":"","receiver_expr":"","receiver_type":"java.lang.Exception","argument_types":["java.lang.String"],"return_type":"java.lang.Exception","callee_signature":"Exception(java.lang.String)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":21,"start_column":17,"end_line":21,"end_column":47}],"variable_declarations":[{"name":"e","type":"java.lang.Exception","initializer":"new Exception(\"Test Exception\")","start_line":21,"start_column":13,"end_line":21,"end_column":47},{"name":"errorMsg","type":"java.lang.String","initializer":"\"Test Error Message\"","start_line":22,"start_column":10,"end_line":22,"end_column":40},{"name":"logger","type":"java.util.logging.Logger","initializer":"Logger.getLogger(\"Test Logger\")","start_line":23,"start_column":10,"end_line":23,"end_column":49}],"cyclomatic_complexity":0}},"field_declarations":[]}},"is_modified":false},"/Users/anonymous/development/modresorts/src/test/java/com/acme/modres/mbean/WCA_DMBeanUtils_Test_Passing.java":{"file_path":"/Users/anonymous/development/modresorts/src/test/java/com/acme/modres/mbean/WCA_DMBeanUtils_Test_Passing.java","comment":"/**\n * Generated by IBM watsonx Code Assistant for Enterprise Java Applications\n */","imports":["java.util.ArrayList","java.util.List","java.util.concurrent.TimeUnit","javax.management.MBeanOperationInfo","org.junit.jupiter.api.Assertions","org.junit.jupiter.api.Test","org.junit.jupiter.api.Timeout","org.junit.jupiter.api.Timeout.ThreadMode","org.junit.jupiter.api.Assertions","org.junit.jupiter.api.Timeout.ThreadMode.SEPARATE_THREAD"],"type_declarations":{"com.acme.modres.mbean.WCA_DMBeanUtils_Test_Passing":{"is_interface":false,"is_inner_class":false,"is_local_class":false,"extends_list":[],"is_nested_type":false,"is_class_or_interface_declaration":true,"is_enum_declaration":false,"is_annotation_declaration":false,"is_record_declaration":false,"comment":"","implements_list":[],"modifiers":["public"],"annotations":[],"parent_type":"","nested_type_declarations":[],"callable_declarations":{"testGetOps_HYBF0()":{"signature":"testGetOps_HYBF0()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOps_HYBF0() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList();\n opList.setOpMetadatList(opMetadatList);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n Assertions.assertNull(ops);\n}","start_line":159,"end_line":167,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList"],"accessed_fields":[],"call_sites":[{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":["java.util.List"],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":164,"start_column":3,"end_line":164,"end_column":40},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":165,"start_column":30,"end_line":165,"end_column":55},{"method_name":"assertNull","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertNull(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":166,"start_column":3,"end_line":166,"end_column":28},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":162,"start_column":27,"end_line":162,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":163,"start_column":36,"end_line":163,"end_column":62}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":162,"start_column":18,"end_line":162,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList()","start_line":163,"start_column":20,"end_line":163,"end_column":62},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":165,"start_column":24,"end_line":165,"end_column":55}],"cyclomatic_complexity":0},"testGetOpsWithNullOpList_lksM7()":{"signature":"testGetOpsWithNullOpList_lksM7()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOpsWithNullOpList_lksM7() throws Exception","parameters":[],"code":"{\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(null);\n Assertions.assertNull(ops);\n}","start_line":49,"end_line":54,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":[],"accessed_fields":[],"call_sites":[{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":[""],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":52,"start_column":30,"end_line":52,"end_column":53},{"method_name":"assertNull","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertNull(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":53,"start_column":3,"end_line":53,"end_column":28}],"variable_declarations":[{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(null)","start_line":52,"start_column":24,"end_line":52,"end_column":53}],"cyclomatic_complexity":0},"testGetOps_jLvE0()":{"signature":"testGetOps_jLvE0()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOps_jLvE0() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadataList = new ArrayList<>();\n opList.setOpMetadatList(opMetadataList);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n Assertions.assertNull(ops);\n}","start_line":110,"end_line":118,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList"],"accessed_fields":[],"call_sites":[{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":["java.util.List"],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":115,"start_column":3,"end_line":115,"end_column":41},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":116,"start_column":30,"end_line":116,"end_column":55},{"method_name":"assertNull","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertNull(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":117,"start_column":3,"end_line":117,"end_column":28},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":113,"start_column":27,"end_line":113,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":114,"start_column":37,"end_line":114,"end_column":53}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":113,"start_column":18,"end_line":113,"end_column":46},{"name":"opMetadataList","type":"java.util.List","initializer":"new ArrayList<>()","start_line":114,"start_column":20,"end_line":114,"end_column":53},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":116,"start_column":24,"end_line":116,"end_column":55}],"cyclomatic_complexity":0},"testGetOps_DTND0()":{"signature":"testGetOps_DTND0()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOps_DTND0() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList<>();\n opList.setOpMetadatList(opMetadatList);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n Assertions.assertNull(ops);\n}","start_line":19,"end_line":27,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList"],"accessed_fields":[],"call_sites":[{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":["java.util.List"],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":24,"start_column":3,"end_line":24,"end_column":40},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":25,"start_column":30,"end_line":25,"end_column":55},{"method_name":"assertNull","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertNull(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":26,"start_column":3,"end_line":26,"end_column":28},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":22,"start_column":27,"end_line":22,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":23,"start_column":36,"end_line":23,"end_column":52}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":22,"start_column":18,"end_line":22,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList<>()","start_line":23,"start_column":20,"end_line":23,"end_column":52},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":25,"start_column":24,"end_line":25,"end_column":55}],"cyclomatic_complexity":0},"testGetOpsWithMultipleOps_HiiA4()":{"signature":"testGetOpsWithMultipleOps_HiiA4()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOpsWithMultipleOps_HiiA4() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList<>();\n OpMetadata opMetadata1 = new OpMetadata();\n opMetadata1.setName(\"Test Operation 1\");\n opMetadata1.setDescription(\"This is the first test operation\");\n}","start_line":39,"end_line":47,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":[],"call_sites":[{"method_name":"setName","receiver_expr":"opMetadata1","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":45,"start_column":3,"end_line":45,"end_column":41},{"method_name":"setDescription","receiver_expr":"opMetadata1","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":46,"start_column":3,"end_line":46,"end_column":64},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":42,"start_column":27,"end_line":42,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":43,"start_column":36,"end_line":43,"end_column":52},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":44,"start_column":28,"end_line":44,"end_column":43}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":42,"start_column":18,"end_line":42,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList<>()","start_line":43,"start_column":20,"end_line":43,"end_column":52},{"name":"opMetadata1","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata()","start_line":44,"start_column":14,"end_line":44,"end_column":43}],"cyclomatic_complexity":0},"testGetOpsWithOneElement_GRtb1_2()":{"signature":"testGetOpsWithOneElement_GRtb1_2()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOpsWithOneElement_GRtb1_2() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList();\n OpMetadata opMetadata = new OpMetadata(\"opName\", \"opDescription\", \"opType\", 1);\n opMetadatList.add(opMetadata);\n opList.setOpMetadatList(opMetadatList);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n Assertions.assertEquals(1, ops.length);\n}","start_line":181,"end_line":191,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":["length"],"call_sites":[{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":187,"start_column":3,"end_line":187,"end_column":31},{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":["java.util.List"],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":188,"start_column":3,"end_line":188,"end_column":40},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":189,"start_column":30,"end_line":189,"end_column":55},{"method_name":"assertEquals","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":["",""],"return_type":"","callee_signature":"assertEquals(int, int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":190,"start_column":3,"end_line":190,"end_column":40},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":184,"start_column":27,"end_line":184,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":185,"start_column":36,"end_line":185,"end_column":62},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String","java.lang.String","java.lang.String",""],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata(java.lang.String, java.lang.String, java.lang.String, int)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":186,"start_column":27,"end_line":186,"end_column":80}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":184,"start_column":18,"end_line":184,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList()","start_line":185,"start_column":20,"end_line":185,"end_column":62},{"name":"opMetadata","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata(\"opName\", \"opDescription\", \"opType\", 1)","start_line":186,"start_column":14,"end_line":186,"end_column":80},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":189,"start_column":24,"end_line":189,"end_column":55}],"cyclomatic_complexity":0},"testGetOps_noqH0_5()":{"signature":"testGetOps_noqH0_5()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOps_noqH0_5() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList();\n opList.setOpMetadatList(opMetadatList);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n OpMetadata opMetadata = new OpMetadata();\n opMetadata.setName(\"test\");\n opMetadata.setDescription(\"test\");\n opMetadata.setType(\"test\");\n opMetadata.setImpact(1);\n opMetadatList.add(opMetadata);\n ops = DMBeanUtils.getOps(opList);\n opMetadatList.clear();\n for (int i = 0; i < 5; i++) {\n opMetadata = new OpMetadata();\n opMetadata.setName(\"test\" + i);\n opMetadata.setDescription(\"test\" + i);\n opMetadata.setType(\"test\" + i);\n opMetadata.setImpact(MBeanOperationInfo.UNKNOWN);\n opMetadatList.add(opMetadata);\n }\n ops = DMBeanUtils.getOps(opList);\n Assertions.assertEquals(5, ops.length);\n}","start_line":83,"end_line":108,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":["length","javax.management.MBeanOperationInfo.UNKNOWN"],"call_sites":[{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":["java.util.List"],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":88,"start_column":3,"end_line":88,"end_column":40},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":89,"start_column":30,"end_line":89,"end_column":55},{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":91,"start_column":3,"end_line":91,"end_column":28},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":92,"start_column":3,"end_line":92,"end_column":35},{"method_name":"setType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":93,"start_column":3,"end_line":93,"end_column":28},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":94,"start_column":3,"end_line":94,"end_column":25},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":95,"start_column":3,"end_line":95,"end_column":31},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":96,"start_column":9,"end_line":96,"end_column":34},{"method_name":"clear","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":[],"return_type":"","callee_signature":"clear()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":97,"start_column":3,"end_line":97,"end_column":23},{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":100,"start_column":4,"end_line":100,"end_column":33},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":101,"start_column":4,"end_line":101,"end_column":40},{"method_name":"setType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":102,"start_column":4,"end_line":102,"end_column":33},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":103,"start_column":4,"end_line":103,"end_column":51},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":104,"start_column":4,"end_line":104,"end_column":32},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":106,"start_column":9,"end_line":106,"end_column":34},{"method_name":"assertEquals","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":["",""],"return_type":"","callee_signature":"assertEquals(int, int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":107,"start_column":3,"end_line":107,"end_column":40},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":86,"start_column":27,"end_line":86,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":87,"start_column":36,"end_line":87,"end_column":62},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":90,"start_column":27,"end_line":90,"end_column":42},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":99,"start_column":17,"end_line":99,"end_column":32}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":86,"start_column":18,"end_line":86,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList()","start_line":87,"start_column":20,"end_line":87,"end_column":62},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":89,"start_column":24,"end_line":89,"end_column":55},{"name":"opMetadata","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata()","start_line":90,"start_column":14,"end_line":90,"end_column":42},{"name":"i","type":"int","initializer":"0","start_line":98,"start_column":12,"end_line":98,"end_column":16}],"cyclomatic_complexity":0},"testGetOpsWithOneElement_GRtb1_1()":{"signature":"testGetOpsWithOneElement_GRtb1_1()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOpsWithOneElement_GRtb1_1() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList();\n OpMetadata opMetadata = new OpMetadata(\"opName\", \"opDescription\", \"opType\", 1);\n opMetadatList.add(opMetadata);\n opList.setOpMetadatList(opMetadatList);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n Assertions.assertNotNull(ops);\n}","start_line":169,"end_line":179,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":[],"call_sites":[{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":175,"start_column":3,"end_line":175,"end_column":31},{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":["java.util.List"],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":176,"start_column":3,"end_line":176,"end_column":40},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":177,"start_column":30,"end_line":177,"end_column":55},{"method_name":"assertNotNull","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertNotNull(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":178,"start_column":3,"end_line":178,"end_column":31},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":172,"start_column":27,"end_line":172,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":173,"start_column":36,"end_line":173,"end_column":62},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String","java.lang.String","java.lang.String",""],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata(java.lang.String, java.lang.String, java.lang.String, int)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":174,"start_column":27,"end_line":174,"end_column":80}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":172,"start_column":18,"end_line":172,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList()","start_line":173,"start_column":20,"end_line":173,"end_column":62},{"name":"opMetadata","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata(\"opName\", \"opDescription\", \"opType\", 1)","start_line":174,"start_column":14,"end_line":174,"end_column":80},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":177,"start_column":24,"end_line":177,"end_column":55}],"cyclomatic_complexity":0},"testGetOpsWithMultipleElements_IqUu2_1()":{"signature":"testGetOpsWithMultipleElements_IqUu2_1()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOpsWithMultipleElements_IqUu2_1() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList();\n OpMetadata opMetadata1 = new OpMetadata(\"opName1\", \"opDescription1\", \"opType1\", 1);\n OpMetadata opMetadata2 = new OpMetadata(\"opName2\", \"opDescription2\", \"opType2\", 2);\n OpMetadata opMetadata3 = new OpMetadata(\"opName3\", \"opDescription3\", \"opType3\", 3);\n opMetadatList.add(opMetadata1);\n opMetadatList.add(opMetadata2);\n opMetadatList.add(opMetadata3);\n opList.setOpMetadatList(opMetadatList);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n Assertions.assertNotNull(ops);\n}","start_line":193,"end_line":207,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":[],"call_sites":[{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":201,"start_column":3,"end_line":201,"end_column":32},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":202,"start_column":3,"end_line":202,"end_column":32},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":203,"start_column":3,"end_line":203,"end_column":32},{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":["java.util.List"],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":204,"start_column":3,"end_line":204,"end_column":40},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":205,"start_column":30,"end_line":205,"end_column":55},{"method_name":"assertNotNull","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertNotNull(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":206,"start_column":3,"end_line":206,"end_column":31},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":196,"start_column":27,"end_line":196,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":197,"start_column":36,"end_line":197,"end_column":62},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String","java.lang.String","java.lang.String",""],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata(java.lang.String, java.lang.String, java.lang.String, int)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":198,"start_column":28,"end_line":198,"end_column":84},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String","java.lang.String","java.lang.String",""],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata(java.lang.String, java.lang.String, java.lang.String, int)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":199,"start_column":28,"end_line":199,"end_column":84},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String","java.lang.String","java.lang.String",""],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata(java.lang.String, java.lang.String, java.lang.String, int)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":200,"start_column":28,"end_line":200,"end_column":84}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":196,"start_column":18,"end_line":196,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList()","start_line":197,"start_column":20,"end_line":197,"end_column":62},{"name":"opMetadata1","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata(\"opName1\", \"opDescription1\", \"opType1\", 1)","start_line":198,"start_column":14,"end_line":198,"end_column":84},{"name":"opMetadata2","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata(\"opName2\", \"opDescription2\", \"opType2\", 2)","start_line":199,"start_column":14,"end_line":199,"end_column":84},{"name":"opMetadata3","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata(\"opName3\", \"opDescription3\", \"opType3\", 3)","start_line":200,"start_column":14,"end_line":200,"end_column":84},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":205,"start_column":24,"end_line":205,"end_column":55}],"cyclomatic_complexity":0},"testGetOpsWithMultipleElements_IqUu2_2()":{"signature":"testGetOpsWithMultipleElements_IqUu2_2()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOpsWithMultipleElements_IqUu2_2() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList();\n OpMetadata opMetadata1 = new OpMetadata(\"opName1\", \"opDescription1\", \"opType1\", 1);\n OpMetadata opMetadata2 = new OpMetadata(\"opName2\", \"opDescription2\", \"opType2\", 2);\n OpMetadata opMetadata3 = new OpMetadata(\"opName3\", \"opDescription3\", \"opType3\", 3);\n opMetadatList.add(opMetadata1);\n opMetadatList.add(opMetadata2);\n opMetadatList.add(opMetadata3);\n opList.setOpMetadatList(opMetadatList);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n Assertions.assertEquals(3, ops.length);\n}","start_line":209,"end_line":223,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":["length"],"call_sites":[{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":217,"start_column":3,"end_line":217,"end_column":32},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":218,"start_column":3,"end_line":218,"end_column":32},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":219,"start_column":3,"end_line":219,"end_column":32},{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":["java.util.List"],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":220,"start_column":3,"end_line":220,"end_column":40},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":221,"start_column":30,"end_line":221,"end_column":55},{"method_name":"assertEquals","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":["",""],"return_type":"","callee_signature":"assertEquals(int, int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":222,"start_column":3,"end_line":222,"end_column":40},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":212,"start_column":27,"end_line":212,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":213,"start_column":36,"end_line":213,"end_column":62},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String","java.lang.String","java.lang.String",""],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata(java.lang.String, java.lang.String, java.lang.String, int)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":214,"start_column":28,"end_line":214,"end_column":84},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String","java.lang.String","java.lang.String",""],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata(java.lang.String, java.lang.String, java.lang.String, int)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":215,"start_column":28,"end_line":215,"end_column":84},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String","java.lang.String","java.lang.String",""],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata(java.lang.String, java.lang.String, java.lang.String, int)","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":216,"start_column":28,"end_line":216,"end_column":84}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":212,"start_column":18,"end_line":212,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList()","start_line":213,"start_column":20,"end_line":213,"end_column":62},{"name":"opMetadata1","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata(\"opName1\", \"opDescription1\", \"opType1\", 1)","start_line":214,"start_column":14,"end_line":214,"end_column":84},{"name":"opMetadata2","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata(\"opName2\", \"opDescription2\", \"opType2\", 2)","start_line":215,"start_column":14,"end_line":215,"end_column":84},{"name":"opMetadata3","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata(\"opName3\", \"opDescription3\", \"opType3\", 3)","start_line":216,"start_column":14,"end_line":216,"end_column":84},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":221,"start_column":24,"end_line":221,"end_column":55}],"cyclomatic_complexity":0},"testGetOpsWithMultipleOpMetadata_upfi4()":{"signature":"testGetOpsWithMultipleOpMetadata_upfi4()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOpsWithMultipleOpMetadata_upfi4() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadataList = new ArrayList<>();\n OpMetadata opMetadata1 = new OpMetadata();\n opMetadata1.setName(\"testOp1\");\n opMetadata1.setDescription(\"Test operation 1\");\n}","start_line":130,"end_line":138,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":[],"call_sites":[{"method_name":"setName","receiver_expr":"opMetadata1","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":136,"start_column":3,"end_line":136,"end_column":32},{"method_name":"setDescription","receiver_expr":"opMetadata1","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":137,"start_column":3,"end_line":137,"end_column":48},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":133,"start_column":27,"end_line":133,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":134,"start_column":37,"end_line":134,"end_column":53},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":135,"start_column":28,"end_line":135,"end_column":43}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":133,"start_column":18,"end_line":133,"end_column":46},{"name":"opMetadataList","type":"java.util.List","initializer":"new ArrayList<>()","start_line":134,"start_column":20,"end_line":134,"end_column":53},{"name":"opMetadata1","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata()","start_line":135,"start_column":14,"end_line":135,"end_column":43}],"cyclomatic_complexity":0},"testGetOpsWithNullOpMetadataList_lZxj7()":{"signature":"testGetOpsWithNullOpMetadataList_lZxj7()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOpsWithNullOpMetadataList_lZxj7() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n opList.setOpMetadatList(null);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n Assertions.assertNull(ops);\n}","start_line":140,"end_line":147,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["com.acme.modres.mbean.OpMetadataList"],"accessed_fields":[],"call_sites":[{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[""],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":144,"start_column":3,"end_line":144,"end_column":31},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":145,"start_column":30,"end_line":145,"end_column":55},{"method_name":"assertNull","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertNull(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":146,"start_column":3,"end_line":146,"end_column":28},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":143,"start_column":27,"end_line":143,"end_column":46}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":143,"start_column":18,"end_line":143,"end_column":46},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":145,"start_column":24,"end_line":145,"end_column":55}],"cyclomatic_complexity":0},"testGetOpsWithMultipleElements_bqWq4()":{"signature":"testGetOpsWithMultipleElements_bqWq4()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOpsWithMultipleElements_bqWq4() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList<>();\n OpMetadata opMetadata1 = new OpMetadata();\n opMetadata1.setName(\"Test Operation 1\");\n opMetadata1.setDescription(\"This is a test operation 1\");\n}","start_line":149,"end_line":157,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":[],"call_sites":[{"method_name":"setName","receiver_expr":"opMetadata1","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":155,"start_column":3,"end_line":155,"end_column":41},{"method_name":"setDescription","receiver_expr":"opMetadata1","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":156,"start_column":3,"end_line":156,"end_column":58},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":152,"start_column":27,"end_line":152,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":153,"start_column":36,"end_line":153,"end_column":52},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":154,"start_column":28,"end_line":154,"end_column":43}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":152,"start_column":18,"end_line":152,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList<>()","start_line":153,"start_column":20,"end_line":153,"end_column":52},{"name":"opMetadata1","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata()","start_line":154,"start_column":14,"end_line":154,"end_column":43}],"cyclomatic_complexity":0},"testGetOps_noqH0_2()":{"signature":"testGetOps_noqH0_2()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOps_noqH0_2() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList();\n opList.setOpMetadatList(opMetadatList);\n MBeanOperationInfo[] ops = DMBeanUtils.getOps(opList);\n OpMetadata opMetadata = new OpMetadata();\n opMetadata.setName(\"test\");\n opMetadata.setDescription(\"test\");\n opMetadata.setType(\"test\");\n opMetadata.setImpact(1);\n opMetadatList.add(opMetadata);\n ops = DMBeanUtils.getOps(opList);\n opMetadatList.clear();\n for (int i = 0; i < 5; i++) {\n opMetadata = new OpMetadata();\n opMetadata.setName(\"test\" + i);\n opMetadata.setDescription(\"test\" + i);\n opMetadata.setType(\"test\" + i);\n opMetadata.setImpact(MBeanOperationInfo.UNKNOWN);\n opMetadatList.add(opMetadata);\n }\n ops = DMBeanUtils.getOps(opList);\n Assertions.assertNotNull(ops);\n}","start_line":56,"end_line":81,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":["javax.management.MBeanOperationInfo.UNKNOWN"],"call_sites":[{"method_name":"setOpMetadatList","receiver_expr":"opList","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":["java.util.List"],"return_type":"","callee_signature":"setOpMetadatList(java.util.List)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":61,"start_column":3,"end_line":61,"end_column":40},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":62,"start_column":30,"end_line":62,"end_column":55},{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":64,"start_column":3,"end_line":64,"end_column":28},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":65,"start_column":3,"end_line":65,"end_column":35},{"method_name":"setType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":66,"start_column":3,"end_line":66,"end_column":28},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":67,"start_column":3,"end_line":67,"end_column":25},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":68,"start_column":3,"end_line":68,"end_column":31},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":69,"start_column":9,"end_line":69,"end_column":34},{"method_name":"clear","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":[],"return_type":"","callee_signature":"clear()","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":70,"start_column":3,"end_line":70,"end_column":23},{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":73,"start_column":4,"end_line":73,"end_column":33},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":74,"start_column":4,"end_line":74,"end_column":40},{"method_name":"setType","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setType(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":75,"start_column":4,"end_line":75,"end_column":33},{"method_name":"setImpact","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[""],"return_type":"","callee_signature":"setImpact(int)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":76,"start_column":4,"end_line":76,"end_column":51},{"method_name":"add","receiver_expr":"opMetadatList","receiver_type":"java.util.List","argument_types":["com.acme.modres.mbean.OpMetadata"],"return_type":"","callee_signature":"add(E)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":77,"start_column":4,"end_line":77,"end_column":32},{"method_name":"getOps","receiver_expr":"DMBeanUtils","receiver_type":"com.acme.modres.mbean.DMBeanUtils","argument_types":["com.acme.modres.mbean.OpMetadataList"],"return_type":"","callee_signature":"getOps(com.acme.modres.mbean.OpMetadataList)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":79,"start_column":9,"end_line":79,"end_column":34},{"method_name":"assertNotNull","receiver_expr":"Assertions","receiver_type":"org.junit.jupiter.api.Assertions","argument_types":[""],"return_type":"","callee_signature":"assertNotNull(java.lang.Object)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":true,"is_constructor_call":false,"start_line":80,"start_column":3,"end_line":80,"end_column":31},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":59,"start_column":27,"end_line":59,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":60,"start_column":36,"end_line":60,"end_column":62},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":63,"start_column":27,"end_line":63,"end_column":42},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":72,"start_column":17,"end_line":72,"end_column":32}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":59,"start_column":18,"end_line":59,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList()","start_line":60,"start_column":20,"end_line":60,"end_column":62},{"name":"ops","type":"javax.management.MBeanOperationInfo[]","initializer":"DMBeanUtils.getOps(opList)","start_line":62,"start_column":24,"end_line":62,"end_column":55},{"name":"opMetadata","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata()","start_line":63,"start_column":14,"end_line":63,"end_column":42},{"name":"i","type":"int","initializer":"0","start_line":71,"start_column":12,"end_line":71,"end_column":16}],"cyclomatic_complexity":0},"testGetOpsWithOpMetadata_ZHuj1()":{"signature":"testGetOpsWithOpMetadata_ZHuj1()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOpsWithOpMetadata_ZHuj1() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadataList = new ArrayList<>();\n OpMetadata opMetadata = new OpMetadata();\n opMetadata.setName(\"testOp\");\n opMetadata.setDescription(\"Test operation\");\n}","start_line":120,"end_line":128,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":[],"call_sites":[{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":126,"start_column":3,"end_line":126,"end_column":30},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":127,"start_column":3,"end_line":127,"end_column":45},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":123,"start_column":27,"end_line":123,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":124,"start_column":37,"end_line":124,"end_column":53},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":125,"start_column":27,"end_line":125,"end_column":42}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":123,"start_column":18,"end_line":123,"end_column":46},{"name":"opMetadataList","type":"java.util.List","initializer":"new ArrayList<>()","start_line":124,"start_column":20,"end_line":124,"end_column":53},{"name":"opMetadata","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata()","start_line":125,"start_column":14,"end_line":125,"end_column":42}],"cyclomatic_complexity":0},"testGetOpsWithOneOp_Copi1()":{"signature":"testGetOpsWithOneOp_Copi1()","comment":"","annotations":["@Test","@Timeout(value = 1, unit = TimeUnit.SECONDS, threadMode = SEPARATE_THREAD)"],"modifiers":["public"],"thrown_exceptions":["java.lang.Exception"],"declaration":"public void testGetOpsWithOneOp_Copi1() throws Exception","parameters":[],"code":"{\n OpMetadataList opList = new OpMetadataList();\n List opMetadatList = new ArrayList<>();\n OpMetadata opMetadata = new OpMetadata();\n opMetadata.setName(\"Test Operation\");\n opMetadata.setDescription(\"This is a test operation\");\n}","start_line":29,"end_line":37,"return_type":"void","is_implicit":false,"is_constructor":false,"referenced_types":["java.util.List","com.acme.modres.mbean.OpMetadataList","com.acme.modres.mbean.OpMetadata"],"accessed_fields":[],"call_sites":[{"method_name":"setName","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setName(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":35,"start_column":3,"end_line":35,"end_column":38},{"method_name":"setDescription","receiver_expr":"opMetadata","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":["java.lang.String"],"return_type":"","callee_signature":"setDescription(java.lang.String)","is_public":true,"is_protected":false,"is_private":false,"is_unspecified":false,"is_static_call":false,"is_constructor_call":false,"start_line":36,"start_column":3,"end_line":36,"end_column":55},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadataList","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadataList","callee_signature":"OpMetadataList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":32,"start_column":27,"end_line":32,"end_column":46},{"method_name":"","receiver_expr":"","receiver_type":"java.util.ArrayList","argument_types":[],"return_type":"java.util.ArrayList","callee_signature":"ArrayList()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":33,"start_column":36,"end_line":33,"end_column":52},{"method_name":"","receiver_expr":"","receiver_type":"com.acme.modres.mbean.OpMetadata","argument_types":[],"return_type":"com.acme.modres.mbean.OpMetadata","callee_signature":"OpMetadata()","is_public":false,"is_protected":false,"is_private":false,"is_unspecified":true,"is_static_call":false,"is_constructor_call":true,"start_line":34,"start_column":27,"end_line":34,"end_column":42}],"variable_declarations":[{"name":"opList","type":"com.acme.modres.mbean.OpMetadataList","initializer":"new OpMetadataList()","start_line":32,"start_column":18,"end_line":32,"end_column":46},{"name":"opMetadatList","type":"java.util.List","initializer":"new ArrayList<>()","start_line":33,"start_column":20,"end_line":33,"end_column":52},{"name":"opMetadata","type":"com.acme.modres.mbean.OpMetadata","initializer":"new OpMetadata()","start_line":34,"start_column":14,"end_line":34,"end_column":42}],"cyclomatic_complexity":0}},"field_declarations":[]}},"is_modified":false}},"system_dependency_graph":[{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/ZipValidator.java","type_declaration":"com.acme.modres.util.ZipValidator","callable_declaration":"isValid()","signature":"isValid()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/ZipValidator.java","type_declaration":"com.acme.modres.util.ZipValidator","callable_declaration":"(File)","signature":"ZipValidator(File)"},"source_kind":"NORMAL","type":"CONTROL_DEP","destination_kind":"METHOD_ENTRY","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/ZipValidator.java","type_declaration":"com.acme.modres.util.ZipValidator","callable_declaration":"isValid()","signature":"isValid()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java","type_declaration":"com.acme.modres.AvailabilityCheckerServlet","callable_declaration":"exportRevervations(String)","signature":"exportRevervations(String)"},"source_kind":"NORMAL_RET_CALLEE","type":"DATA_DEP","destination_kind":"NORMAL_RET_CALLER","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/AppInfo.java","type_declaration":"com.acme.modres.mbean.AppInfo","callable_declaration":"invoke(String, Object[], String[])","signature":"invoke(String, Object[], String[])"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/AppInfo.java","type_declaration":"com.acme.modres.mbean.AppInfo","callable_declaration":"increaseLimit()","signature":"increaseLimit()"},"source_kind":"NORMAL","type":"CONTROL_DEP","destination_kind":"METHOD_ENTRY","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/AppInfo.java","type_declaration":"com.acme.modres.mbean.AppInfo","callable_declaration":"invoke(String, Object[], String[])","signature":"invoke(String, Object[], String[])"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/AppInfo.java","type_declaration":"com.acme.modres.mbean.AppInfo","callable_declaration":"resetLimit()","signature":"resetLimit()"},"source_kind":"NORMAL","type":"CONTROL_DEP","destination_kind":"METHOD_ENTRY","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"setInitialContextProps()","signature":"setInitialContextProps()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"init()","signature":"init()"},"source_kind":"NORMAL_RET_CALLEE","type":"DATA_DEP","destination_kind":"NORMAL_RET_CALLER","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"init()","signature":"init()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"setInitialContextProps()","signature":"setInitialContextProps()"},"source_kind":"NORMAL","type":"CONTROL_DEP","destination_kind":"METHOD_ENTRY","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/DateChecker.java","type_declaration":"com.acme.modres.mbean.reservation.DateChecker","callable_declaration":"run()","signature":"run()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/ReservationCheckerData.java","type_declaration":"com.acme.modres.mbean.reservation.ReservationCheckerData","callable_declaration":"setAvailablility(Boolean)","signature":"setAvailablility(Boolean)"},"type":"CALL_DEP","weight":"2"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/DateChecker.java","type_declaration":"com.acme.modres.mbean.reservation.DateChecker","callable_declaration":"run()","signature":"run()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/ReservationCheckerData.java","type_declaration":"com.acme.modres.mbean.reservation.ReservationCheckerData","callable_declaration":"getReservationList()","signature":"getReservationList()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/DateChecker.java","type_declaration":"com.acme.modres.mbean.reservation.DateChecker","callable_declaration":"run()","signature":"run()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/ReservationList.java","type_declaration":"com.acme.modres.mbean.reservation.ReservationList","callable_declaration":"getReservations()","signature":"getReservations()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/DateChecker.java","type_declaration":"com.acme.modres.mbean.reservation.DateChecker","callable_declaration":"run()","signature":"run()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/ReservationCheckerData.java","type_declaration":"com.acme.modres.mbean.reservation.ReservationCheckerData","callable_declaration":"getSelectedDate()","signature":"getSelectedDate()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/DateChecker.java","type_declaration":"com.acme.modres.mbean.reservation.DateChecker","callable_declaration":"run()","signature":"run()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/Reservation.java","type_declaration":"com.acme.modres.mbean.reservation.Reservation","callable_declaration":"getFromDate()","signature":"getFromDate()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/DateChecker.java","type_declaration":"com.acme.modres.mbean.reservation.DateChecker","callable_declaration":"run()","signature":"run()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/Reservation.java","type_declaration":"com.acme.modres.mbean.reservation.Reservation","callable_declaration":"getToDate()","signature":"getToDate()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/AppInfo.java","type_declaration":"com.acme.modres.mbean.AppInfo","callable_declaration":"()","signature":"AppInfo()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/AppInfo.java","type_declaration":"com.acme.modres.mbean.AppInfo","callable_declaration":"buildDMBeanInfo()","signature":"buildDMBeanInfo()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/AppInfo.java","type_declaration":"com.acme.modres.mbean.AppInfo","callable_declaration":"buildDMBeanInfo()","signature":"buildDMBeanInfo()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java","type_declaration":"com.acme.modres.mbean.IOUtils","callable_declaration":"getOpListFromConfig()","signature":"getOpListFromConfig()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/AppInfo.java","type_declaration":"com.acme.modres.mbean.AppInfo","callable_declaration":"buildDMBeanInfo()","signature":"buildDMBeanInfo()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/DMBeanUtils.java","type_declaration":"com.acme.modres.mbean.DMBeanUtils","callable_declaration":"getOps(OpMetadataList)","signature":"getOps(OpMetadataList)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/DMBeanUtils.java","type_declaration":"com.acme.modres.mbean.DMBeanUtils","callable_declaration":"getOps(OpMetadataList)","signature":"getOps(OpMetadataList)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/OpMetadataList.java","type_declaration":"com.acme.modres.mbean.OpMetadataList","callable_declaration":"getOpMetadatList()","signature":"getOpMetadatList()"},"type":"CALL_DEP","weight":"3"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/DMBeanUtils.java","type_declaration":"com.acme.modres.mbean.DMBeanUtils","callable_declaration":"getOps(OpMetadataList)","signature":"getOps(OpMetadataList)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/OpMetadata.java","type_declaration":"com.acme.modres.mbean.OpMetadata","callable_declaration":"getName()","signature":"getName()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/DMBeanUtils.java","type_declaration":"com.acme.modres.mbean.DMBeanUtils","callable_declaration":"getOps(OpMetadataList)","signature":"getOps(OpMetadataList)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/OpMetadata.java","type_declaration":"com.acme.modres.mbean.OpMetadata","callable_declaration":"getDescription()","signature":"getDescription()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/DMBeanUtils.java","type_declaration":"com.acme.modres.mbean.DMBeanUtils","callable_declaration":"getOps(OpMetadataList)","signature":"getOps(OpMetadataList)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/OpMetadata.java","type_declaration":"com.acme.modres.mbean.OpMetadata","callable_declaration":"getType()","signature":"getType()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/DMBeanUtils.java","type_declaration":"com.acme.modres.mbean.DMBeanUtils","callable_declaration":"getOps(OpMetadataList)","signature":"getOps(OpMetadataList)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/OpMetadata.java","type_declaration":"com.acme.modres.mbean.OpMetadata","callable_declaration":"getImpact()","signature":"getImpact()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java","type_declaration":"com.acme.modres.AvailabilityCheckerServlet","callable_declaration":"init()","signature":"init()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java","type_declaration":"com.acme.modres.mbean.IOUtils","callable_declaration":"getReservationListFromConfig()","signature":"getReservationListFromConfig()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java","type_declaration":"com.acme.modres.AvailabilityCheckerServlet","callable_declaration":"init()","signature":"init()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/ReservationCheckerData.java","type_declaration":"com.acme.modres.mbean.reservation.ReservationCheckerData","callable_declaration":"(ReservationList)","signature":"ReservationCheckerData(ReservationList)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java","type_declaration":"com.acme.modres.AvailabilityCheckerServlet","callable_declaration":"doGet(HttpServletRequest, HttpServletResponse)","signature":"doGet(HttpServletRequest, HttpServletResponse)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/ReservationCheckerData.java","type_declaration":"com.acme.modres.mbean.reservation.ReservationCheckerData","callable_declaration":"setSelectedDate(String)","signature":"setSelectedDate(String)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java","type_declaration":"com.acme.modres.AvailabilityCheckerServlet","callable_declaration":"doGet(HttpServletRequest, HttpServletResponse)","signature":"doGet(HttpServletRequest, HttpServletResponse)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/ReservationCheckerData.java","type_declaration":"com.acme.modres.mbean.reservation.ReservationCheckerData","callable_declaration":"getReservationList()","signature":"getReservationList()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java","type_declaration":"com.acme.modres.AvailabilityCheckerServlet","callable_declaration":"doGet(HttpServletRequest, HttpServletResponse)","signature":"doGet(HttpServletRequest, HttpServletResponse)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/ReservationCheckerData.java","type_declaration":"com.acme.modres.mbean.reservation.ReservationCheckerData","callable_declaration":"setAvailablility(Boolean)","signature":"setAvailablility(Boolean)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java","type_declaration":"com.acme.modres.AvailabilityCheckerServlet","callable_declaration":"doGet(HttpServletRequest, HttpServletResponse)","signature":"doGet(HttpServletRequest, HttpServletResponse)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/DateChecker.java","type_declaration":"com.acme.modres.mbean.reservation.DateChecker","callable_declaration":"(ReservationCheckerData)","signature":"DateChecker(ReservationCheckerData)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java","type_declaration":"com.acme.modres.AvailabilityCheckerServlet","callable_declaration":"doGet(HttpServletRequest, HttpServletResponse)","signature":"doGet(HttpServletRequest, HttpServletResponse)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/ReservationCheckerData.java","type_declaration":"com.acme.modres.mbean.reservation.ReservationCheckerData","callable_declaration":"isAvailible()","signature":"isAvailible()"},"type":"CALL_DEP","weight":"2"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java","type_declaration":"com.acme.modres.AvailabilityCheckerServlet","callable_declaration":"doPost(HttpServletRequest, HttpServletResponse)","signature":"doPost(HttpServletRequest, HttpServletResponse)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java","type_declaration":"com.acme.modres.AvailabilityCheckerServlet","callable_declaration":"doGet(HttpServletRequest, HttpServletResponse)","signature":"doGet(HttpServletRequest, HttpServletResponse)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java","type_declaration":"com.acme.modres.AvailabilityCheckerServlet","callable_declaration":"exportRevervations(String)","signature":"exportRevervations(String)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java","type_declaration":"com.acme.modres.mbean.IOUtils","callable_declaration":"getFileFromRelativePath(String)","signature":"getFileFromRelativePath(String)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java","type_declaration":"com.acme.modres.AvailabilityCheckerServlet","callable_declaration":"exportRevervations(String)","signature":"exportRevervations(String)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/ZipValidator.java","type_declaration":"com.acme.modres.util.ZipValidator","callable_declaration":"(File)","signature":"ZipValidator(File)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/AvailabilityCheckerServlet.java","type_declaration":"com.acme.modres.AvailabilityCheckerServlet","callable_declaration":"exportRevervations(String)","signature":"exportRevervations(String)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/ZipValidator.java","type_declaration":"com.acme.modres.util.ZipValidator","callable_declaration":"isValid()","signature":"isValid()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/JsonInputStream.java","type_declaration":"com.acme.modres.util.JsonInputStream","callable_declaration":"parseJsonAs(Class)","signature":"parseJsonAs(Class)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/JsonInputStream.java","type_declaration":"com.acme.modres.util.JsonInputStream","callable_declaration":"(File)","signature":"JsonInputStream(File)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"init()","signature":"init()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/AppInfo.java","type_declaration":"com.acme.modres.mbean.AppInfo","callable_declaration":"()","signature":"AppInfo()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"doGet(HttpServletRequest, HttpServletResponse)","signature":"doGet(HttpServletRequest, HttpServletResponse)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"mockKey(String)","signature":"mockKey(String)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"doGet(HttpServletRequest, HttpServletResponse)","signature":"doGet(HttpServletRequest, HttpServletResponse)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"getRealTimeWeatherData(String, String, HttpServletResponse)","signature":"getRealTimeWeatherData(String, String, HttpServletResponse)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"doGet(HttpServletRequest, HttpServletResponse)","signature":"doGet(HttpServletRequest, HttpServletResponse)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"getDefaultWeatherData(String, HttpServletResponse)","signature":"getDefaultWeatherData(String, HttpServletResponse)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"getRealTimeWeatherData(String, String, HttpServletResponse)","signature":"getRealTimeWeatherData(String, String, HttpServletResponse)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/exception/ExceptionHandler.java","type_declaration":"com.acme.modres.exception.ExceptionHandler","callable_declaration":"handleException(Exception, String, Logger)","signature":"handleException(Exception, String, Logger)"},"type":"CALL_DEP","weight":"6"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"getDefaultWeatherData(String, HttpServletResponse)","signature":"getDefaultWeatherData(String, HttpServletResponse)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/DefaultWeatherData.java","type_declaration":"com.acme.modres.DefaultWeatherData","callable_declaration":"(String)","signature":"DefaultWeatherData(String)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"getDefaultWeatherData(String, HttpServletResponse)","signature":"getDefaultWeatherData(String, HttpServletResponse)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/exception/ExceptionHandler.java","type_declaration":"com.acme.modres.exception.ExceptionHandler","callable_declaration":"handleException(Exception, String, Logger)","signature":"handleException(Exception, String, Logger)"},"type":"CALL_DEP","weight":"2"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"getDefaultWeatherData(String, HttpServletResponse)","signature":"getDefaultWeatherData(String, HttpServletResponse)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/DefaultWeatherData.java","type_declaration":"com.acme.modres.DefaultWeatherData","callable_declaration":"getDefaultWeatherData()","signature":"getDefaultWeatherData()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"doPost(HttpServletRequest, HttpServletResponse)","signature":"doPost(HttpServletRequest, HttpServletResponse)"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/WeatherServlet.java","type_declaration":"com.acme.modres.WeatherServlet","callable_declaration":"doGet(HttpServletRequest, HttpServletResponse)","signature":"doGet(HttpServletRequest, HttpServletResponse)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/DefaultWeatherData.java","type_declaration":"com.acme.modres.DefaultWeatherData","callable_declaration":"getDefaultWeatherData()","signature":"getDefaultWeatherData()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/DefaultWeatherData.java","type_declaration":"com.acme.modres.DefaultWeatherData","callable_declaration":"getCity()","signature":"getCity()"},"type":"CALL_DEP","weight":"6"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java","type_declaration":"com.acme.modres.mbean.IOUtils","callable_declaration":"getOpListFromConfig()","signature":"getOpListFromConfig()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java","type_declaration":"com.acme.modres.mbean.IOUtils","callable_declaration":"getFileFromRelativePath(String)","signature":"getFileFromRelativePath(String)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java","type_declaration":"com.acme.modres.mbean.IOUtils","callable_declaration":"getOpListFromConfig()","signature":"getOpListFromConfig()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/JsonInputStream.java","type_declaration":"com.acme.modres.util.JsonInputStream","callable_declaration":"(File)","signature":"JsonInputStream(File)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java","type_declaration":"com.acme.modres.mbean.IOUtils","callable_declaration":"getOpListFromConfig()","signature":"getOpListFromConfig()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/OpMetadataList.java","type_declaration":"com.acme.modres.mbean.OpMetadataList","callable_declaration":"()","signature":"OpMetadataList()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java","type_declaration":"com.acme.modres.mbean.IOUtils","callable_declaration":"getOpListFromConfig()","signature":"getOpListFromConfig()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/JsonInputStream.java","type_declaration":"com.acme.modres.util.JsonInputStream","callable_declaration":"parseJsonAs(Class)","signature":"parseJsonAs(Class)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java","type_declaration":"com.acme.modres.mbean.IOUtils","callable_declaration":"getReservationListFromConfig()","signature":"getReservationListFromConfig()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java","type_declaration":"com.acme.modres.mbean.IOUtils","callable_declaration":"getFileFromRelativePath(String)","signature":"getFileFromRelativePath(String)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java","type_declaration":"com.acme.modres.mbean.IOUtils","callable_declaration":"getReservationListFromConfig()","signature":"getReservationListFromConfig()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/JsonInputStream.java","type_declaration":"com.acme.modres.util.JsonInputStream","callable_declaration":"(File)","signature":"JsonInputStream(File)"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java","type_declaration":"com.acme.modres.mbean.IOUtils","callable_declaration":"getReservationListFromConfig()","signature":"getReservationListFromConfig()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/reservation/ReservationList.java","type_declaration":"com.acme.modres.mbean.reservation.ReservationList","callable_declaration":"()","signature":"ReservationList()"},"type":"CALL_DEP","weight":"1"},{"source":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/mbean/IOUtils.java","type_declaration":"com.acme.modres.mbean.IOUtils","callable_declaration":"getReservationListFromConfig()","signature":"getReservationListFromConfig()"},"target":{"file_path":"/Users/anonymous/development/modresorts/src/main/java/com/acme/modres/util/JsonInputStream.java","type_declaration":"com.acme.modres.util.JsonInputStream","callable_declaration":"parseJsonAs(Class)","signature":"parseJsonAs(Class)"},"type":"CALL_DEP","weight":"1"}]} \ No newline at end of file From 270a1d4dddae0a9e4489df5dc33a46b2a11b10cf Mon Sep 17 00:00:00 2001 From: Rahul Krishna Date: Tue, 29 Oct 2024 13:17:06 -0400 Subject: [PATCH 3/3] Update JSON schema Signed-off-by: Rahul Krishna --- .../com/ibm/cldk/utils/AnalysisUtils.java | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/ibm/cldk/utils/AnalysisUtils.java b/src/main/java/com/ibm/cldk/utils/AnalysisUtils.java index 48661b7..0ecf9ba 100644 --- a/src/main/java/com/ibm/cldk/utils/AnalysisUtils.java +++ b/src/main/java/com/ibm/cldk/utils/AnalysisUtils.java @@ -78,11 +78,16 @@ public static Map createAndPutNewCallableInSymbolTable(IMethod m newCallable.setAnnotations(method.getAnnotations().stream().map(annotation -> annotation.toString().replace("[", "(").replace("]", ")").replace("Annotation type ", "@")).collect(Collectors.toList())); declaredMethodsAndConstructors.put(declaringClassSignature, methodSignature, newCallable); - + String signature = newCallable.getSignature(); + if (signature.contains("")) { + signature = signature.replace("", declaringClassSignature.substring(declaringClassSignature.lastIndexOf(".") + 1)); + } else if (signature.contains("")) { + signature = signature.replace("", declaringClassSignature.substring(declaringClassSignature.lastIndexOf(".") + 1)); + } return Map.ofEntries( Map.entry("typeDeclaration", declaringClassSignature), - Map.entry("filePath", ""), - Map.entry("signature", newCallable.getSignature()), + Map.entry("filePath", "<>"), + Map.entry("signature", signature), Map.entry("callableDeclaration", newCallable.getDeclaration()) ); } @@ -130,13 +135,21 @@ public static Map getCallableFromSymbolTable(IMethod method) { if (callable == null) return null; - else + else{ + String signature = callable.getSignature(); + if (signature.contains("")) { + signature = signature.replace("", declaringClassSignature.substring(declaringClassSignature.lastIndexOf(".") + 1)); + System.out.println("signature: " + signature); + } else if (signature.contains("")) { + signature = signature.replace("", declaringClassSignature.substring(declaringClassSignature.lastIndexOf(".") + 1)); + } return Map.ofEntries( Map.entry("typeDeclaration", declaringClassSignature), Map.entry("filePath", callable.getFilePath()), - Map.entry("signature", callable.getSignature()), - Map.entry("callableDeclaration", callable.getDeclaration()) + Map.entry("signature", signature), + Map.entry("callableDeclaration", callable.getSignature()) ); + } } /**