File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/Dom4jInstantiator.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/action/BulkOperationCleanupAction.java | |||
Method name: void Dom4jInstantiator(PersistentClass)
|
Method name: void evictEntityRegions()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if ( mappingInfo.hasSubclasses() ) {↵ | 1 | if ( ↵ | |
2 | Iterator itr = mappingInfo.getSubclassClosureI↵ | 2 | affectedEntityNames != null ) {↵ | |
3 | terator();↵ | 3 | Iterator itr = affectedEntityNames.iterator();↵ | |
4 | while ( itr.hasNext() ) {↵ | 4 | while ( itr.hasNext() ) {↵ | |
5 | final PersistentClass subclassInfo = ( PersistentClass ) itr.next();↵ | 5 | final ↵ | |
6 | isInstanceNodeNames.add( subclassInfo.getNode↵ | 6 | String entityName = ( String ) itr.next();↵ | |
7 | Name() );↵ | 7 | session.getFactory().evictEntity( entityName );↵ | |
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.2 |
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) | 0.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
| 2 | Iterator itr = affectedEntityNames.iterator(); | |||||
4 | Iterator itr = mappingInfo.getSubclassClosureIterator(); | | |||||
5 | while (itr.hasNext()) | 3 | while (itr.hasNext()) | ||||
|
| 4 | final String entityName = (String)itr.next(); | ||||
| 5 | session.getFactory().evictEntity(entityName); | |||||
6 | final PersistentClass subclassInfo = (PersistentClass)itr.next(); |
| | ||||
7 | isInstanceNodeNames.add(subclassInfo.getNodeName()); | |
Row | Violation |
---|---|
1 | Unmatched statement final String entityName=(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 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 |