Iterator<Method> i = publicReachableMethods.iterator(); while (i.hasNext()) { Method method = i.next();
for (Method method : publicReachableMethods) {
	public void visitClassContext(ClassContext classContext) {		JavaClass javaClass = classContext.getJavaClass();		if (DEBUG) System.out.println("******** Analyzing class " + javaClass.getClassName());				// Build self-call graph		SelfCalls selfCalls = new SelfCalls(classContext) {			public boolean wantCallsFor(Method method) {				return !method.isPublic();			}		};				Set<Method> lockedMethodSet;		Set<Method> publicReachableMethods;				try {			selfCalls.execute();			CallGraph callGraph = selfCalls.getCallGraph();			if (DEBUG)				System.out.println("Call graph (not unlocked methods): " + callGraph.getNumVertices() + " nodes, " +						callGraph.getNumEdges() + " edges");			// Find call edges that are obviously locked			Set<CallSite> obviouslyLockedSites = findObviouslyLockedCallSites(classContext, selfCalls);			lockedMethodSet = findNotUnlockedMethods(classContext, selfCalls, obviouslyLockedSites);			lockedMethodSet.retainAll(findLockedMethods(classContext, selfCalls, obviouslyLockedSites));			publicReachableMethods = findPublicReachableMethods(classContext, selfCalls);		} catch (CFGBuilderException e) {			bugReporter.logError("Error finding locked call sites", e);			return;		} catch (DataflowAnalysisException e) {			bugReporter.logError("Error finding locked call sites", e);			return;		}				Iterator<Method> i = publicReachableMethods.iterator();		while (i.hasNext()) {			Method method = i.next();			if (classContext.getMethodGen(method) == null)				continue;			/*			 if (isConstructor(method.getName()))			 continue;			 */			if (method.getName().startsWith("access$"))				// Ignore inner class access methods;				// we will treat calls to them as field accesses				continue;			try {				analyzeMethod(classContext, method, lockedMethodSet);			} catch (CFGBuilderException e) {				bugReporter.logError("Error analyzing method", e);			} catch (DataflowAnalysisException e) {				bugReporter.logError("Error analyzing method", e);			}		}	}