final ResourceTracker<Resource> resourceTracker = getResourceTracker(classContext, method);  final MethodGen methodGen = classContext.getMethodGen(method); if (methodGen == null) continue; final CFG cfg = classContext.getCFG(method); final DepthFirstSearch dfs = classContext.getDepthFirstSearch(method);  if (DEBUG) System.out.println(SignatureConverter.convertMethodSignature(methodGen));  new LocationScanner(cfg).scan(new LocationScanner.Callback() { public void visitLocation(Location location) { BasicBlock basicBlock = location.getBasicBlock(); InstructionHandle handle = location.getHandle();  try { Resource resource = resourceTracker.isResourceCreation(basicBlock, handle, methodGen.getConstantPool()); if (resource != null) { if (DEBUG) System.out.println("Resource creation at " + handle.getPosition()); ResourceValueAnalysis<Resource> analysis = new ResourceValueAnalysis<Resource>(methodGen, cfg, dfs, resourceTracker, resource, bugReporter); Dataflow<ResourceValueFrame, ResourceValueAnalysis<Resource>> dataflow = new Dataflow<ResourceValueFrame, ResourceValueAnalysis<Resource>>(cfg, analysis);  dataflow.execute(); inspectResult(jclass, methodGen, cfg, dataflow, resource); } } catch (DataflowAnalysisException e) { throw new AnalysisException("FindOpenResource caught exception: " + e.toString(), e); } } });
analyzeMethod(classContext, method);
	public void visitClassContext(ClassContext classContext) {		try {			final JavaClass jclass = classContext.getJavaClass();			Method[] methodList = jclass.getMethods();			for (int i = 0; i < methodList.length; ++i) {				Method method = methodList[i];				if (method.isAbstract() || method.isNative())					continue;				if (!prescreen(classContext, method))					continue;				final ResourceTracker<Resource> resourceTracker = getResourceTracker(classContext, method);				final MethodGen methodGen = classContext.getMethodGen(method);				if (methodGen == null)					continue;				final CFG cfg = classContext.getCFG(method);				final DepthFirstSearch dfs = classContext.getDepthFirstSearch(method);				if (DEBUG) System.out.println(SignatureConverter.convertMethodSignature(methodGen));				new LocationScanner(cfg).scan(new LocationScanner.Callback() {					public void visitLocation(Location location) {						BasicBlock basicBlock = location.getBasicBlock();						InstructionHandle handle = location.getHandle();						try {							Resource resource = resourceTracker.isResourceCreation(basicBlock, handle, methodGen.getConstantPool());							if (resource != null) {								if (DEBUG) System.out.println("Resource creation at " + handle.getPosition());								ResourceValueAnalysis<Resource> analysis =									new ResourceValueAnalysis<Resource>(methodGen, cfg, dfs, resourceTracker, resource, bugReporter);								Dataflow<ResourceValueFrame, ResourceValueAnalysis<Resource>> dataflow =									new Dataflow<ResourceValueFrame, ResourceValueAnalysis<Resource>>(cfg, analysis);									dataflow.execute();								inspectResult(jclass, methodGen, cfg, dataflow, resource);							}						} catch (DataflowAnalysisException e) {							throw new AnalysisException("FindOpenResource caught exception: " + e.toString(), e);						}					}				});			}		} catch (CFGBuilderException e) {			throw new AnalysisException(e.toString(), e);		} catch (DataflowAnalysisException e) {			throw new AnalysisException(e.toString(), e);		}	}