String className = argv[0]; JavaClass jclass = new RepositoryClassParser(className).parse(); ClassGen cg = new ClassGen(jclass); ConstantPoolGen cpg = cg.getConstantPool(); String methodName = System.getProperty("sda.method");  Method[] methods = cg.getMethods(); for (int i = 0; i < methods.length; ++i) { Method method = methods[i]; if (method.isAbstract() || method.isNative()) continue; if (methodName != null && !method.getName().equals(methodName)) continue;  MethodGen methodGen = new MethodGen(method, jclass.getClassName(), cpg);  CFGBuilder cfgBuilder = CFGBuilderFactory.create(methodGen); cfgBuilder.build();  CFG cfg = cfgBuilder.getCFG(); cfg.assignEdgeIds(0);  StackDepthAnalysis analysis = new StackDepthAnalysis(cpg); Dataflow<StackDepth> dataflow = new Dataflow<StackDepth>(cfg, analysis);  dataflow.execute();  System.out.println("Finished in " + dataflow.getNumIterations() + " iterations");  StackDepthCFGPrinter printer = new StackDepthCFGPrinter(cfg, dataflow, cpg); printer.print(System.out); } } catch (Exception e) { e.printStackTrace(); }
driver.execute(argv[0]);
	public static void main(String[] argv) {		try {			if (argv.length != 1) {				System.out.println("Usage: edu.umd.cs.daveho.ba.StackDepthAnalysis <class file>");				System.exit(1);			}			String className = argv[0];			JavaClass jclass = new RepositoryClassParser(className).parse();			ClassGen cg = new ClassGen(jclass);			ConstantPoolGen cpg = cg.getConstantPool();			String methodName = System.getProperty("sda.method");			Method[] methods = cg.getMethods();			for (int i = 0; i < methods.length; ++i) {				Method method = methods[i];				if (method.isAbstract() || method.isNative())					continue;				if (methodName != null && !method.getName().equals(methodName))					continue;				MethodGen methodGen = new MethodGen(method, jclass.getClassName(), cpg);				CFGBuilder cfgBuilder = CFGBuilderFactory.create(methodGen);				cfgBuilder.build();				CFG cfg = cfgBuilder.getCFG();				cfg.assignEdgeIds(0);				StackDepthAnalysis analysis = new StackDepthAnalysis(cpg);				Dataflow<StackDepth> dataflow = new Dataflow<StackDepth>(cfg, analysis);				dataflow.execute();				System.out.println("Finished in " + dataflow.getNumIterations() + " iterations");				StackDepthCFGPrinter printer = new StackDepthCFGPrinter(cfg, dataflow, cpg);				printer.print(System.out);			}		} catch (Exception e) {			e.printStackTrace();		}	}