Bug 94730 [projection] Nondeterministic folding summary
I20050509-2010 With the CU below: - fold the method declaration -> 'bar()' is shown as summary - unfold again - select the method name 'bar' - type 'foo' - fold the method declaration again -> 'void' is shown as summary "interface Bar { void bar(); } "
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/folding/DefaultJavaFoldingStructureProvider.java
boolean matched= false;
					while (x.hasNext()) {
						Tuple tuple= (Tuple) x.next();
						JavaProjectionAnnotation existingAnnotation= tuple.annotation;
						Position existingPosition= tuple.position;
						if (newAnnotation.isComment() == existingAnnotation.isComment()) {
							if (existingPosition != null && (!newPosition.equals(existingPosition))) {
								existingPosition.setOffset(newPosition.getOffset());
								existingPosition.setLength(newPosition.getLength());
								updates.add(existingAnnotation);
							}
							matched= true;
							x.remove();
							break;
						}
					}
					if (!matched)
						additions.put(newAnnotation, newPosition);
					if (annotations.isEmpty())
						previous.remove(element);
				}
			}
			e= previous.values().iterator();
			while (e.hasNext()) {
				List list= (List) e.next();
				int size= list.size();
				for (int i= 0; i < size; i++)
					deletions.add(((Tuple) list.get(i)).annotation);
			}
			match(model, deletions, additions, updates);