public boolean addAll(Collection c) { Iterator it = c.iterator(); boolean changed = false; while ( it.hasNext() ) { if ( this.add( it.next() ) ) { changed = true; } } return changed;
public boolean removeAll(Collection c) { Iterator it = c.iterator(); boolean changed = false; while ( it.hasNext() ) { if ( this.remove( it.next() ) ) { changed = true; } } return changed;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/util/IdentitySet.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/util/IdentitySet.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public boolean addAll(Collection c) {
1
public boolean removeAll(Collection c) {
2
		Iterator it = c.iterator();
2
		Iterator it = c.iterator();
3
		boolean changed = false;
3
		boolean changed = false;
4
		while ( it.hasNext() ) {
4
		while ( it.hasNext() ) {
5
			if ( this.add( it.next() ) ) {
5
			if ( this.remove( it.next() ) ) {
6
				changed = true;
6
				changed = true;
7
			}
7
			}
8
		}
8
		}
9
		return changed;
9
		return changed;
10
	
10
	
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0