protected void addMethod(List<SootMethod> set, String methodSig) { if (Scene.v().containsMethod(methodSig)) { set.add(Scene.v().getMethod(methodSig)); } }
if (!Scene.v().containsMethod(target)) { throw new RuntimeException("Unknown method for signature: " + target); if (!Scene.v().containsMethod(target)) { throw new RuntimeException("Unknown method for signature: " + target);
private final void addMethod( List<SootMethod> set, String methodSig ) { if( Scene.v().containsMethod( methodSig ) ) { set.add( Scene.v().getMethod( methodSig ) ); } } /** Returns only the application entry points, not including entry points
private final void addMethod( List<SootMethod> set, String methodSig ) { if( Scene.v().containsMethod( methodSig ) ) { set.add( Scene.v().getMethod( methodSig ) ); } } /** Returns only the application entry points, not including entry points
if(!Scene.v().containsMethod(target)) { throw new RuntimeException("Unknown method for signature: "+target); if(!Scene.v().containsMethod(target)) { throw new RuntimeException("Unknown method for signature: "+target);
if(!Scene.v().containsMethod(target)) { throw new RuntimeException("Unknown method for signature: "+target); if(!Scene.v().containsMethod(target)) { throw new RuntimeException("Unknown method for signature: "+target);
@Override public void computeInfoflow(String appPath, String libPath, String entryPoint, ISourceSinkManager sourcesSinks) { if (sourcesSinks == null) { logger.error("Sources are empty!"); return; } initializeSoot(appPath, libPath, SootMethodRepresentationParser.v() .parseClassNames(Collections.singletonList(entryPoint), false).keySet(), entryPoint); if (!Scene.v().containsMethod(entryPoint)) { logger.error("Entry point not found: " + entryPoint); return; } SootMethod ep = Scene.v().getMethod(entryPoint); if (ep.isConcrete()) ep.retrieveActiveBody(); else { logger.debug("Skipping non-concrete method " + ep); return; } this.dummyMainMethod = null; Scene.v().setEntryPoints(Collections.singletonList(ep)); Options.v().set_main_class(ep.getDeclaringClass().getName()); // Compute the additional seeds if they are specified Set<String> seeds = Collections.emptySet(); if (entryPoint != null && !entryPoint.isEmpty()) seeds = Collections.singleton(entryPoint); ipcManager.updateJimpleForICC(); // Run the analysis runAnalysis(sourcesSinks, seeds); }
/** * Gets the flow summaries for the given gap definition, i.e., for the method in * the gap * * @param gap The gap definition * @return The flow summaries for the method in the given gap if they exist, * otherwise null */ private MethodSummaries getFlowSummariesForGap(GapDefinition gap) { // If we have the method in Soot, we can be more clever if (Scene.v().containsMethod(gap.getSignature())) { SootMethod gapMethod = Scene.v().getMethod(gap.getSignature()); ClassSummaries flows = getFlowSummariesForMethod(null, gapMethod, null); if (flows != null && !flows.isEmpty()) { MethodSummaries summaries = new MethodSummaries(); summaries.mergeSummaries(flows.getAllMethodSummaries()); return summaries; } } // If we don't have the method, we can only directly look for the // signature SootMethodAndClass smac = SootMethodRepresentationParser.v().parseSootMethodString(gap.getSignature()); ClassMethodSummaries cms = flows.getMethodFlows(smac.getClassName(), smac.getSubSignature()); return cms == null ? null : cms.getMethodSummaries(); }
if(Scene.v().containsMethod(method)) sm = Scene.v().getMethod(method); else {