if ( collectionLoadContexts != null ) { Iterator itr = collectionLoadContexts.values().iterator(); while ( itr.hasNext() ) { CollectionLoadContext collectionLoadContext = ( CollectionLoadContext ) itr.next(); log.warn( "fail-safe cleanup (collections) : " + collectionLoadContext ); collectionLoadContext.cleanup(); } collectionLoadContexts.clear(); }
if ( entityLoadContexts != null ) { Iterator itr = entityLoadContexts.values().iterator(); while ( itr.hasNext() ) { EntityLoadContext entityLoadContext = ( EntityLoadContext ) itr.next(); log.warn( "fail-safe cleanup (entities) : " + entityLoadContext ); entityLoadContext.cleanup(); } entityLoadContexts.clear(); }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/loading/LoadContexts.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/loading/LoadContexts.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
if ( collectionLoadContexts != null ) {
1
if ( entityLoadContexts != null ) {
2
			Iterator itr = collectionLoadContexts.values().iterator();
2
			Iterator itr = entityLoadContexts.values().iterator();
3
			while ( itr.hasNext() ) {
3
			while ( itr.hasNext() ) {
4
				CollectionLoadContext collectionLoadContext = ( CollectionLoadContext ) itr.next();
4
				EntityLoadContext entityLoadContext = ( EntityLoadContext ) itr.next();
5
				log.warn( "fail-safe cleanup (collections) : " + collectionLoadContext );
5
				log.warn( "fail-safe cleanup (entities) : " + entityLoadContext );
6
				collectionLoadContext.cleanup();
6
				entityLoadContext.cleanup();
7
			}
7
			}
8
			collectionLoadContexts.clear();
8
			entityLoadContexts.clear();
9
		}
9
		}
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