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/tuple/DynamicMapInstantiator.java | |||
Method name: void Dom4jInstantiator(PersistentClass)
|
Method name: void DynamicMapInstantiator(PersistentClass)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if ( mappingInfo.hasSubclasses() ) {↵ | 1 | if ( mappingInfo.hasSubclasses() ) {↵ | |
2 | Iterator itr = mappingInfo.getSubclassClosureIterator();↵ | 2 | Iterator itr = mappingInfo.getSubclassClosureIterator();↵ | |
3 | while ( itr.hasNext() ) {↵ | 3 | while ( itr.hasNext() ) {↵ | |
4 | final PersistentClass subclassInfo = ( PersistentClass ) itr.next();↵ | 4 | final PersistentClass subclassInfo = ( PersistentClass ) itr.next();↵ | |
5 | isInstanceNodeNames.add( subclassInfo.getNodeName() );↵ | 5 | isInstanceEntityNames.add( subclassInfo.getEntityName() );↵ | |
6 | }↵ | 6 | }↵ | |
7 | } | 7 |
| |
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 | 13 |
Number of mapped statements | 4 |
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) | 0.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
3 | if (mappingInfo.hasSubclasses()) | 3 | if (mappingInfo.hasSubclasses()) | ||||
4 | Iterator itr = mappingInfo.getSubclassClosureIterator(); | 4 | Iterator itr = mappingInfo.getSubclassClosureIterator(); | ||||
5 | while (itr.hasNext()) | 5 | while (itr.hasNext()) | ||||
6 | final PersistentClass subclassInfo = (PersistentClass)itr.next(); | 6 | final PersistentClass subclassInfo = (PersistentClass)itr.next(); | ||||
|
| 7 | isInstanceEntityNames.add(subclassInfo.getEntityName()); | ||||
7 | isInstanceNodeNames.add(subclassInfo.getNodeName()); |
| |
Row | Violation |
---|---|
1 | Unmatched statement isInstanceEntityNames.add(subclassInfo.getEntityName()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement isInstanceNodeNames.add(subclassInfo.getNodeName()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |