File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java | |||
Method name: void close()
|
Method name: void close()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | while ( iter.hasNext() ) {↵ | 1 | while ( iter.hasNext() ) {↵ | |
2 | CollectionPersister p = (CollectionPersister) iter.next();↵ | 2 | EntityPersister p = (EntityPersister) iter.next();↵ | |
3 | if ( p.hasCache() ) {↵ | 3 | if ( p.hasCache() ) {↵ | |
4 | p.getCacheAccessStrategy().getRegion().destroy();↵ | 4 | p.getCacheAccessStrategy().getRegion().destroy();↵ | |
5 | }↵ | 5 | }↵ | |
6 | } | 6 |
| |
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 | 8 |
Number of mapped statements | 3 |
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) | 49.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | while (iter.hasNext()) | 7 | while (iter.hasNext()) | ||||||||||||||||||||
|
| 8 | EntityPersister p = (EntityPersister)iter.next(); | ||||||||||||||||||||
13 | CollectionPersister p = (CollectionPersister)iter.next(); |
| | ||||||||||||||||||||
14 | if (p.hasCache()) |
| 9 | if (p.hasCache()) | |||||||||||||||||||
15 | p.getCacheAccessStrategy().getRegion().destroy(); |
| 10 | p.getCacheAccessStrategy().getRegion().destroy(); |
Row | Violation |
---|---|
1 | Unmatched statement EntityPersister p=(EntityPersister)iter.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement CollectionPersister p=(CollectionPersister)iter.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.persister.collection.CollectionPersister of variable p does not match with type org.hibernate.persister.entity.EntityPersister of variable p |
4 | Type org.hibernate.cache.CollectionRegion of variable p.getCacheAccessStrategy().getRegion() does not match with type org.hibernate.cache.EntityRegion of variable p.getCacheAccessStrategy().getRegion() |
5 | Type org.hibernate.cache.access.CollectionRegionAccessStrategy of variable p.getCacheAccessStrategy() does not match with type org.hibernate.cache.access.EntityRegionAccessStrategy of variable p.getCacheAccessStrategy() |
6 | Type org.hibernate.persister.collection.CollectionPersister of variable p does not match with type org.hibernate.persister.entity.EntityPersister of variable p |