public ReachableMethods getReachableMethods() { if (reachableMethods == null) { reachableMethods = new ReachableMethods(getCallGraph(), new ArrayList<MethodOrMethodContext>(getEntryPoints())); } reachableMethods.update(); return reachableMethods; }
public CallChain getNextCallChainBetween(SootMethod start, SootMethod goal, List previouslyFound) { // callChains.add(new LinkedList()); // Represents the one way to get from goal to goal (which is to already be there) // Is this worthwhile? Fast? Slow? Broken? Applicable inside the recursive method? // If method is unreachable, don't bother trying to make chains // CACHEABLE? ReachableMethods rm = null; if (rmCache.containsKey(start)) { rm = rmCache.get(start); } else { List<MethodOrMethodContext> entryPoints = new ArrayList<MethodOrMethodContext>(); entryPoints.add(start); rm = new ReachableMethods(cg, entryPoints); rm.update(); rmCache.put(start, rm); } if (rm.contains(goal)) { // Set methodsInAnyChain = new HashSet(); // methodsInAnyChain.add(goal); return getNextCallChainBetween(rm, start, goal, null, null, previouslyFound); } return null; // new ArrayList(); }
/** * This constructor builds the incomplete hack call graph for the Dava ThrowFinder. It uses all application class methods * as entry points, and it ignores any calls by non-application class methods. Don't use this constructor if you need a * real call graph. */ public CallGraphBuilder() { logger.warn("using incomplete callgraph containing " + "only application classes."); pa = soot.jimple.toolkits.pointer.DumbPointerAnalysis.v(); cg = Scene.v().internalMakeCallGraph(); Scene.v().setCallGraph(cg); List<MethodOrMethodContext> entryPoints = new ArrayList<MethodOrMethodContext>(); entryPoints.addAll(EntryPoints.v().methodsOfApplicationClasses()); entryPoints.addAll(EntryPoints.v().implicit()); reachables = new ReachableMethods(cg, entryPoints); ContextManager cm = new ContextInsensitiveContextManager(cg); ofcgb = new OnFlyCallGraphBuilder(cm, reachables, true); }
= new ReachableMethods(cg, Collections.<MethodOrMethodContext>singletonList(container)); reachableMethods.update(); for (Iterator<MethodOrMethodContext> iterator = reachableMethods.listener(); iterator.hasNext();) {
public ReachableMethods getReachableMethods() { if( reachableMethods == null ) { reachableMethods = new ReachableMethods( getCallGraph(), new ArrayList<MethodOrMethodContext>(getEntryPoints()) ); } reachableMethods.update(); return reachableMethods; } public void setReachableMethods( ReachableMethods rm ) {
public ReachableMethods getReachableMethods() { if( reachableMethods == null ) { reachableMethods = new ReachableMethods( getCallGraph(), new ArrayList<MethodOrMethodContext>(getEntryPoints()) ); } reachableMethods.update(); return reachableMethods; } public void setReachableMethods( ReachableMethods rm ) {
public CallChain getNextCallChainBetween(SootMethod start, SootMethod goal, List previouslyFound) { // callChains.add(new LinkedList()); // Represents the one way to get from goal to goal (which is to already be there) // Is this worthwhile? Fast? Slow? Broken? Applicable inside the recursive method? // If method is unreachable, don't bother trying to make chains // CACHEABLE? ReachableMethods rm = null; if(rmCache.containsKey(start)) rm = rmCache.get(start); else { List<MethodOrMethodContext> entryPoints = new ArrayList<MethodOrMethodContext>(); entryPoints.add(start); rm = new ReachableMethods(cg, entryPoints); rm.update(); rmCache.put(start, rm); } if(rm.contains(goal)) { // Set methodsInAnyChain = new HashSet(); // methodsInAnyChain.add(goal); return getNextCallChainBetween(rm, start, goal, null, null, previouslyFound); } return null; // new ArrayList(); }
public CallChain getNextCallChainBetween(SootMethod start, SootMethod goal, List previouslyFound) { // callChains.add(new LinkedList()); // Represents the one way to get from goal to goal (which is to already be there) // Is this worthwhile? Fast? Slow? Broken? Applicable inside the recursive method? // If method is unreachable, don't bother trying to make chains // CACHEABLE? ReachableMethods rm = null; if(rmCache.containsKey(start)) rm = rmCache.get(start); else { List<MethodOrMethodContext> entryPoints = new ArrayList<MethodOrMethodContext>(); entryPoints.add(start); rm = new ReachableMethods(cg, entryPoints); rm.update(); rmCache.put(start, rm); } if(rm.contains(goal)) { // Set methodsInAnyChain = new HashSet(); // methodsInAnyChain.add(goal); return getNextCallChainBetween(rm, start, goal, null, null, previouslyFound); } return null; // new ArrayList(); }
new ArrayList<MethodOrMethodContext>(Scene.v().getEntryPoints()); ReachableMethods reachableMethods = new ReachableMethods(Scene.v().getCallGraph(), eps.iterator(), null); reachableMethods.update(); for (Iterator<MethodOrMethodContext> iter = reachableMethods.listener(); iter.hasNext();) {
/** This constructor builds the incomplete hack call graph for the * Dava ThrowFinder. * It uses all application class methods as entry points, and it ignores * any calls by non-application class methods. * Don't use this constructor if you need a real call graph. */ public CallGraphBuilder() { G.v().out.println( "Warning: using incomplete callgraph containing "+ "only application classes." ); pa = soot.jimple.toolkits.pointer.DumbPointerAnalysis.v(); cg = new CallGraph(); Scene.v().setCallGraph(cg); List<MethodOrMethodContext> entryPoints = new ArrayList<MethodOrMethodContext>(); entryPoints.addAll( EntryPoints.v().methodsOfApplicationClasses() ); entryPoints.addAll( EntryPoints.v().implicit() ); reachables = new ReachableMethods( cg, entryPoints ); ContextManager cm = new ContextInsensitiveContextManager( cg ); ofcgb = new OnFlyCallGraphBuilder( cm, reachables, true ); } public void build() {
/** This constructor builds the incomplete hack call graph for the * Dava ThrowFinder. * It uses all application class methods as entry points, and it ignores * any calls by non-application class methods. * Don't use this constructor if you need a real call graph. */ public CallGraphBuilder() { G.v().out.println( "Warning: using incomplete callgraph containing "+ "only application classes." ); pa = soot.jimple.toolkits.pointer.DumbPointerAnalysis.v(); cg = new CallGraph(); Scene.v().setCallGraph(cg); List<MethodOrMethodContext> entryPoints = new ArrayList<MethodOrMethodContext>(); entryPoints.addAll( EntryPoints.v().methodsOfApplicationClasses() ); entryPoints.addAll( EntryPoints.v().implicit() ); reachables = new ReachableMethods( cg, entryPoints ); ContextManager cm = new ContextInsensitiveContextManager( cg ); ofcgb = new OnFlyCallGraphBuilder( cm, reachables, true ); } public void build() {
ReachableMethods reachableMethods = new ReachableMethods(cg,Collections.<MethodOrMethodContext>singletonList(container)); reachableMethods.update(); for (Iterator<MethodOrMethodContext> iterator = reachableMethods.listener(); iterator.hasNext();) {
ReachableMethods reachableMethods = new ReachableMethods(cg,Collections.<MethodOrMethodContext>singletonList(container)); reachableMethods.update(); for (Iterator<MethodOrMethodContext> iterator = reachableMethods.listener(); iterator.hasNext();) {
new ArrayList<MethodOrMethodContext>(Scene.v().getEntryPoints()); ReachableMethods reachableMethods = new ReachableMethods(Scene.v().getCallGraph(), eps.iterator(), null); reachableMethods.update(); long reachableStatements = 0;