public void execute() throws BuildException { if( phase_help != null ) addPath("-phase-help", phase_help); if( process_dir != null ) addPath("-process-dir", process_dir); if( dump_body != null ) addPath("-dump-body", dump_body); if( dump_cfg != null ) addPath("-dump-cfg", dump_cfg); if( plugin != null ) addPath("-plugin", plugin); if( include != null ) addPath("-include", include); if( exclude != null ) addPath("-exclude", exclude); if( dynamic_class != null ) addPath("-dynamic-class", dynamic_class); if( dynamic_dir != null ) addPath("-dynamic-dir", dynamic_dir); if( dynamic_package != null ) addPath("-dynamic-package", dynamic_package); if(DEBUG) System.out.println(args); try { soot.Main.main((String[]) args.toArray(new String[0])); soot.G.v().reset(); } catch( Exception e ) { e.printStackTrace(); throw new BuildException(e); } }
public SootToCfg(List<String> resolvedClassNames) { this.resolvedClassNames = resolvedClassNames; // first reset everything: soot.G.reset(); SootTranslationHelpers.initialize(program); }
@Before public void resetSootAndStream() throws IOException { soot.G.reset(); System.gc(); }
@Before public void resetSootAndStream() throws IOException { soot.G.reset(); System.gc(); }
private void loadScene() { File classDir = null; try { classDir = Util.compileJavaFile(this.sourceFile, System.getProperty("java.class.path")); } catch (IOException e) { e.printStackTrace(); Assert.fail(); } if (classDir == null) { Assert.fail(); } soot.G.reset(); SootRunner runner = new SootRunner(); runner.run(classDir.getAbsolutePath(), System.getProperty("java.class.path")); }
@Test public void test() { soot.G.reset(); System.out.println("Running test " + this.sourceFile.getName()); SootToCfg soot2cfg = new SootToCfg(); File classDir = null; try { classDir = Util.compileJavaFile(this.sourceFile, System.getProperty("java.class.path")); } catch (IOException e) { e.printStackTrace(); Assert.fail(); } if (classDir == null) { Assert.fail(); } soot2cfg.run(classDir.getAbsolutePath(), null); }
G.reset(); initializeSoot();
G.reset(); classFetcherRecursive(classPaths, className, methodName, className, element, chapter, fieldType, scopeId, outSet, variableBlock);