File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/usercollection/basic/MyListType.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/usercollection/parameterized/DefaultableListType.java | |||
Method name: PersistentCollection wrap(SessionImplementor, Object)
|
Method name: PersistentCollection wrap(SessionImplementor, Object)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if ( session.getEntityMode()==EntityMode.DOM4J ) {↵ | 1 | if ( session.getEntityMode() == EntityMode.DOM4J ) { ↵ | |
2 | throw new IllegalStateException("dom4j not supported");↵ | 2 | throw new IllegalStateException( "dom4j not supported" ); ↵ | |
3 | }↵ | 3 | } ↵ | |
4 | else {↵ | 4 | else { ↵ | |
5 | return new PersistentMyList( session, (IMyList) collection );↵ | 5 | return new PersistentDefaultableList( session, ( List ) collection ); ↵ | |
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 different classes |
Number of node comparisons | 9 |
Number of mapped statements | 2 |
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.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
1 | if (session.getEntityMode() == EntityMode.DOM4J) | 1 | if (session.getEntityMode() == EntityMode.DOM4J) | |||||
2 | throw new IllegalStateException("dom4j not supported"); | 2 | throw new IllegalStateException("dom4j not supported"); | |||||
else | | |||||||
|
| 3 | return new PersistentDefaultableList(session, (List)collection); | |||||
3 | return new PersistentMyList(session, (IMyList)collection); |
| |
Row | Violation |
---|---|
1 | Unmatched statement return new PersistentDefaultableList(session,(List)collection); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched return new PersistentDefaultableList(session,(List)collection); |
3 | Unmatched statement return new PersistentMyList(session,(IMyList)collection); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched return new PersistentMyList(session,(IMyList)collection); |