if ( collectionIsInitialized(collection) ) { // handles arrays and newly instantiated collections return collectionType.getElementsIterator(collection, session); } else { // does not handle arrays (thats ok, cos they can't be lazy) // or newly instantiated collections, so we can do the cast return ( (PersistentCollection) collection ).queuedAdditionIterator(); }
if (value==null) { return null; } else { return (Serializable) deepCopy( value, session.getEntityMode(), session.getFactory() ); }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/CascadingAction.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/type/AbstractType.java
Method name: Iterator getLoadedElementsIterator(SessionImplementor, CollectionType, Object) Method name: Serializable disassemble(Object, SessionImplementor, Object)
Number of AST nodes: 3 Number of AST nodes: 3
1
if ( collectionIsInitialized(collection) ) {
1
if (
2
			// handles arrays and newly instantiated collections
3
			return collectionType.getElementsIterator(collection, session);
4
		}
5
		else {
6
			// does not handle arrays (thats ok, cos they can't be lazy)
7
			// or newly instantiated collections, so we can do the cast
8
			return ( (PersistentCollection) collection ).queuedAdditionIterator(
2
value==null) {
3
			return null;
4
		}
5
		else {
9
);
6
			return (Serializable) deepCopy( value, session.getEntityMode(), session.getFactory() );
10
		}
7
		}
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.1
Clones locationClones are in different classes
Number of node comparisons1