for ( Iterator it = parents.iterator(); it.hasNext(); ) { ParentWithCollection parent = ( ParentWithCollection ) it.next(); parent.clearChildren(); s.delete( parent ); }
synchronized (this) { HashMap temp = (HashMap) map.clone(); temp.clear(); map = temp; }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/event/collection/AbstractCollectionEventTest.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/util/FastHashMap.java
Method name: void cleanupTest() Method name: void clear()
Number of AST nodes: 4 Number of AST nodes: 4
1
for ( Iterator it = parents.iterator(); it.hasNext(); ) {
2
			ParentWithCollection parent = ( ParentWithCollection ) it.next();
3
			parent.clearChildren();
4
			s.delete( parent )
1
synchronized (this) {
2
			HashMap temp = (HashMap) map.clone();
3
			temp.clear();
5
;
4
			map = temp;
6
		}
5
		}
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 locationClones are in different classes
Number of node comparisons1