ClassGen classGen = new ClassGen(jclass); ConstantPoolGen cpg = classGen.getConstantPool();
ClassContext classContext = new ClassContext(jclass, lookupFailureCallback);
	public void execute(String classFile, String methodName, int offset)		throws IOException, CFGBuilderException, DataflowAnalysisException {		final RepositoryLookupFailureCallback lookupFailureCallback = new RepositoryLookupFailureCallback() {			public void reportMissingClass(ClassNotFoundException ex) {				ex.printStackTrace();				System.exit(1);			}		};		JavaClass jclass = new ClassParser(classFile).parse();		ClassGen classGen = new ClassGen(jclass);		ConstantPoolGen cpg = classGen.getConstantPool();		Method[] methodList = jclass.getMethods();		for (int i = 0; i < methodList.length; ++i) {			Method method = methodList[i];			if (!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);			BasicBlock creationBlock = null;			InstructionHandle creationInstruction = null;		blockLoop:			for (Iterator<BasicBlock> ii = cfg.blockIterator(); ii.hasNext(); ) {				BasicBlock basicBlock = ii.next();				for (Iterator<InstructionHandle> j = basicBlock.instructionIterator(); j.hasNext(); ) {					InstructionHandle handle = j.next();					if (handle.getPosition() == offset) {						creationBlock = basicBlock;						creationInstruction = handle;						break blockLoop;					}				}			}			if (creationInstruction == null) throw new IllegalArgumentException("No bytecode with offset " + offset);			final ResourceTracker<Resource> resourceTracker = createResourceTracker(lookupFailureCallback, methodGen, cfg);			final Resource resource = resourceTracker.isResourceCreation(creationBlock, creationInstruction, cpg);			if (resource == null)				throw new IllegalArgumentException("offset " + offset + " is not a resource creation");			DataflowTestDriver<ResourceValueFrame, ResourceValueAnalysis<Resource>> driver =				new DataflowTestDriver<ResourceValueFrame, ResourceValueAnalysis<Resource>>() {				public ResourceValueAnalysis<Resource> createAnalysis(MethodGen methodGen, CFG cfg)					throws DataflowAnalysisException {					DepthFirstSearch dfs = new DepthFirstSearch(cfg).search();					return new ResourceValueAnalysis<Resource>(methodGen, cfg, dfs, resourceTracker, resource,						lookupFailureCallback);				}			};			driver.execute(methodGen, cfg);			break;		}	}