<div dir="ltr">Hi,<div><br></div><div>I want to find the caller Stmt and the SootMethod which the Stmt belongs to in the callgraph (for example, given that SootMethod m1 is invoked by SootMethod m2 with m2&#39;s statement s1, now I have m1, and I want to find both m2 and s1). </div><div><br></div><div>I have tried two approaches:</div><div><ol><li><font face="monospace, monospace">JimpleBasedInterproceduralCFG.getCallersOf(SootMethod m)</font>, this method returns a collection of Unit, but from the returned collection of Unit, I cannot get the SootMethod which each Unit belongs to.<br></li><li><font face="monospace, monospace">Scene.v().getCallGraph().edgesInto(SootMethod m)</font>, this method returns an iterator of SootMethod. To get the Stmt, I need to iterate through all the Stmt of each SootMethod and find the one by matching stmt.getInvokeExpr().getMethod() with the given SootMethod by signature. However, I think simply matching by SootMethod&#39;s signature may fail to find the Stmt because the given method can be an override method, so their signatures will not match.</li></ol></div><div>So, is there a method to find the caller Stmt and SootMethod in callgraph accurately even with override and overload?</div><div><br></div><div>Moreover, Marc-André Laverdière mentioned the JimpleBasedInterproceduralCFG-based method in <a href="https://mailman.cs.mcgill.ca/pipermail/soot-list/2014-July/007043.html">https://mailman.cs.mcgill.ca/pipermail/soot-list/2014-July/007043.html</a> with the notion that &quot;as long as you don&#39;t mind context-insensitive results&quot;. Can someone tell me what are &quot;context-insensitive results&quot;?</div><div><br></div><div>Thank you in advance.</div><div><br></div><div><br></div><div>Best Regards,</div><div>R.F.</div></div>