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: void cleanup()
|
Method name: void cleanup()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | Iterator itr = collectionLoadContexts.values().iterator();↵ | 1 | Iterator itr = entityLoadContexts.values().iterator();↵ | |
2 | while ( itr.hasNext() ) {↵ | 2 | while ( itr.hasNext() ) {↵ | |
3 | CollectionLoadContext collectionLoadContext = ( CollectionLoadContext ) itr.next();↵ | 3 | EntityLoadContext entityLoadContext = ( EntityLoadContext ) itr.next();↵ | |
4 | log.warn( "fail-safe cleanup (collections) : " + collectionLoadContext );↵ | 4 | log.warn( "fail-safe cleanup (entities) : " + entityLoadContext );↵ | |
5 | collectionLoadContext.cleanup();↵ | 5 | entityLoadContext.cleanup();↵ | |
6 | }↵ | 6 | }↵ | |
7 | collectionLoadContexts.clear(); | 7 | entityLoadContexts.clear(); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 21 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 2.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | Iterator itr = collectionLoadContexts.values().iterator(); |
| 9 | Iterator itr = entityLoadContexts.values().iterator(); | |||||||||||||||||
3 | while (itr.hasNext()) | 10 | while (itr.hasNext()) | ||||||||||||||||||
4 | CollectionLoadContext collectionLoadContext = (CollectionLoadContext)itr.next(); |
| | ||||||||||||||||||
|
| 11 | EntityLoadContext entityLoadContext = (EntityLoadContext)itr.next(); | ||||||||||||||||||
5 | log.warn("fail-safe cleanup (collections) : " + collectionLoadContext); |
| 12 | log.warn("fail-safe cleanup (entities) : " + entityLoadContext); | |||||||||||||||||
6 | collectionLoadContext.cleanup(); |
| 13 | entityLoadContext.cleanup(); | |||||||||||||||||
7 | collectionLoadContexts.clear(); |
| 14 | entityLoadContexts.clear(); |
Row | Violation |
---|---|
1 | Unmatched statement CollectionLoadContext collectionLoadContext=(CollectionLoadContext)itr.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement EntityLoadContext entityLoadContext=(EntityLoadContext)itr.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type org.hibernate.engine.loading.CollectionLoadContext of variable collectionLoadContext does not match with type org.hibernate.engine.loading.EntityLoadContext of variable entityLoadContext |
4 | Type org.hibernate.engine.loading.CollectionLoadContext of variable collectionLoadContext does not match with type org.hibernate.engine.loading.EntityLoadContext of variable entityLoadContext |