diff --git a/sootup.analysis.interprocedural/src/main/java/sootup/analysis/interprocedural/icfg/JimpleBasedInterproceduralCFG.java b/sootup.analysis.interprocedural/src/main/java/sootup/analysis/interprocedural/icfg/JimpleBasedInterproceduralCFG.java index ae4d44822ad..3dc36d344e7 100644 --- a/sootup.analysis.interprocedural/src/main/java/sootup/analysis/interprocedural/icfg/JimpleBasedInterproceduralCFG.java +++ b/sootup.analysis.interprocedural/src/main/java/sootup/analysis/interprocedural/icfg/JimpleBasedInterproceduralCFG.java @@ -55,7 +55,6 @@ public class JimpleBasedInterproceduralCFG extends AbstractJimpleBasedICFG { protected static final Logger logger = LoggerFactory.getLogger(JimpleBasedInterproceduralCFG.class); - private List entryPoints; protected boolean includeReflectiveCalls; @@ -123,14 +122,17 @@ public JimpleBasedInterproceduralCFG( super(enableExceptions); this.includeReflectiveCalls = includeReflectiveCalls; this.view = view; - this.entryPoints = cg.getEntryMethods(); this.cg = cg; initializeStmtToOwner(); } + public CallGraph getCg() { + return cg; + } + public String buildICFGGraph(CallGraph callGraph) { Map> signatureToStmtGraph = new LinkedHashMap<>(); - computeAllCalls(entryPoints, signatureToStmtGraph, callGraph); + computeAllCalls(callGraph.getEntryMethods(), signatureToStmtGraph, callGraph); return ICFGDotExporter.buildICFGGraph(signatureToStmtGraph, view, callGraph); } diff --git a/sootup.analysis.interprocedural/src/test/java/sootup/analysis/interprocedural/icfg/BackwardsInterproceduralCFGTest.java b/sootup.analysis.interprocedural/src/test/java/sootup/analysis/interprocedural/icfg/BackwardsInterproceduralCFGTest.java index 616c8c0fb8d..5d9ac4e36a4 100644 --- a/sootup.analysis.interprocedural/src/test/java/sootup/analysis/interprocedural/icfg/BackwardsInterproceduralCFGTest.java +++ b/sootup.analysis.interprocedural/src/test/java/sootup/analysis/interprocedural/icfg/BackwardsInterproceduralCFGTest.java @@ -42,7 +42,8 @@ public static void setup() { @Test void methodStartAndEndPointTest() { JimpleBasedInterproceduralCFG forwardICFG = - new JimpleBasedInterproceduralCFG(view, entryMethodSignature, false, false); + new JimpleBasedInterproceduralCFG( + view, Collections.singletonList(entryMethodSignature), false, false); BackwardsInterproceduralCFG backwardsInterproceduralCFG = new BackwardsInterproceduralCFG(forwardICFG); @@ -58,7 +59,8 @@ void methodStartAndEndPointTest() { @Test void methodToCallerStmtTest() { JimpleBasedInterproceduralCFG forwardICFG = - new JimpleBasedInterproceduralCFG(view, entryMethodSignature, false, false); + new JimpleBasedInterproceduralCFG( + view, Collections.singletonList(entryMethodSignature), false, false); BackwardsInterproceduralCFG backwardsInterproceduralCFG = new BackwardsInterproceduralCFG(forwardICFG);