for (Iterator<StreamEscape> i = streamEscapeSet.iterator(); i.hasNext();) { StreamEscape streamEscape = i.next();
for (StreamEscape streamEscape : streamEscapeSet) {
	public void markTransitiveUninterestingStreamEscapes() {		// Eliminate all stream escapes where the target isn't really		// a stream open location point.		for (Iterator<StreamEscape> i = streamEscapeSet.iterator(); i.hasNext();) {			StreamEscape streamEscape = i.next();			if (!isStreamOpenLocation(streamEscape.target)) {				if (FindOpenStream.DEBUG)					System.out.println("Eliminating false stream escape " + streamEscape);				i.remove();			}		}		// Build initial stream equivalence classes.		// Each stream starts out in its own separate		// equivalence class.		for (Iterator<Stream> i = resourceCollection.resourceIterator(); i.hasNext();) {			Stream stream = i.next();			StreamEquivalenceClass equivalenceClass = new StreamEquivalenceClass();			equivalenceClass.addMember(stream);			streamEquivalenceMap.put(stream, equivalenceClass);		}		// Starting with the set of uninteresting stream open location points,		// propagate all uninteresting stream escapes.  Iterate until there		// is no change.  This also builds the map of stream equivalence classes.		Set<Stream> orig = new HashSet<Stream>();		do {			orig.clear();			orig.addAll(uninterestingStreamEscapeSet);			for (Iterator<StreamEscape> i = streamEscapeSet.iterator(); i.hasNext();) {				StreamEscape streamEscape = i.next();				if (isUninterestingStreamEscape(streamEscape.source)) {					if (FindOpenStream.DEBUG)						System.out.println("Propagating stream escape " + streamEscape);					Stream target = streamOpenLocationMap.get(streamEscape.target);					if (target == null)						throw new IllegalStateException();					uninterestingStreamEscapeSet.add(target);					// Combine equivalence classes for source and target					StreamEquivalenceClass sourceClass = streamEquivalenceMap.get(streamEscape.source);					StreamEquivalenceClass targetClass = streamEquivalenceMap.get(target);					if (sourceClass != targetClass) {						sourceClass.addAll(targetClass);						for (Iterator<Stream> j = targetClass.memberIterator(); j.hasNext();) {							Stream stream = j.next();							streamEquivalenceMap.put(stream, sourceClass);						}					}				}			}		} while (!orig.equals(uninterestingStreamEscapeSet));	}