for (int i = 0; i < methodList.length; ++i) { Method method = methodList[i];
for (Method method : methodList) {
	private Set<Method> findNotUnlockedMethods(ClassContext classContext, SelfCalls selfCalls,	                                           Set<CallSite> obviouslyLockedSites)	        throws CFGBuilderException, DataflowAnalysisException {		JavaClass javaClass = classContext.getJavaClass();		Method[] methodList = javaClass.getMethods();		CallGraph callGraph = selfCalls.getCallGraph();		// Initially, assume no methods are called from an		// unlocked context		Set<Method> lockedMethodSet = new HashSet<Method>();		lockedMethodSet.addAll(Arrays.asList(methodList));		// Assume all public methods are called from		// unlocked context		for (int i = 0; i < methodList.length; ++i) {			Method method = methodList[i];			if (method.isPublic()			        && !isConstructor(method.getName())) {				lockedMethodSet.remove(method);			}		}		// Explore the self-call graph to find nonpublic methods		// that can be called from an unlocked context.		boolean change;		do {			change = false;			for (Iterator<CallGraphEdge> i = callGraph.edgeIterator(); i.hasNext();) {				CallGraphEdge edge = i.next();				CallSite callSite = edge.getCallSite();				// Ignore obviously locked edges				if (obviouslyLockedSites.contains(callSite))					continue;				// If the calling method is locked, ignore the edge				if (lockedMethodSet.contains(callSite.getMethod()))					continue;				// Calling method is unlocked, so the called method				// is also unlocked.				CallGraphNode target = edge.getTarget();				if (lockedMethodSet.remove(target.getMethod()))					change = true;			}		} while (change);		if (DEBUG) {			System.out.println("Apparently not unlocked methods:");			for (Iterator<Method> i = lockedMethodSet.iterator(); i.hasNext();) {				Method method = i.next();				System.out.println("\t" + method.getName());			}		}		// We assume that any methods left in the locked set		// are called only from a locked context.		return lockedMethodSet;	}