File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/action/BulkOperationCleanupAction.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/Dom4jInstantiator.java | |||
Method name: void evictCollectionRegions()
|
Method name: void Dom4jInstantiator(PersistentClass)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if ( affectedCollectionRoles != null ) {↵ | 1 | if ( ↵ | |
2 | Iterator itr = affectedCollectionRoles.i↵ | 2 | mappingInfo.hasSubclasses() ) {↵ | |
3 | terator();↵ | 3 | Iterator itr = mappingInfo.getSubclassClosureIterator();↵ | |
4 | while ( itr.hasNext() ) {↵ | 4 | while ( itr.hasNext() ) {↵ | |
5 | final String roleName = ( String ) itr.next();↵ | 5 | final ↵ | |
6 | session.getFactory().evictCollection( rol↵ | 6 | PersistentClass subclassInfo = ( PersistentClass ) itr.next();↵ | |
7 | eName );↵ | 7 | isInstanceNodeNames.add( subclassInfo.getNodeName() );↵ | |
8 | }↵ | 8 | }↵ | |
9 | } | 9 |
| |
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 11 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 17.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
2 | Iterator itr = affectedCollectionRoles.iterator(); | | |||||
| 4 | Iterator itr = mappingInfo.getSubclassClosureIterator(); | |||||
3 | while (itr.hasNext()) | 5 | while (itr.hasNext()) | ||||
4 | final String roleName = (String)itr.next(); |
| | ||||
5 | session.getFactory().evictCollection(roleName); |
| | ||||
|
| 6 | final PersistentClass subclassInfo = (PersistentClass)itr.next(); | ||||
| 7 | isInstanceNodeNames.add(subclassInfo.getNodeName()); |
Row | Violation |
---|---|
1 | Unmatched statement final String roleName=(String)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 session.getFactory().evictCollection(roleName); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
3 | Unmatched statement final PersistentClass subclassInfo=(PersistentClass)itr.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |