File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/type/ListType.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/type/SortedSetType.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 | return new PersistentListElementHolder( session, (Element) collection );↵ | 2 | return new PersistentElementHolder( session, (Element) collection );↵ | |
3 | }↵ | 3 | }↵ | |
4 | else {↵ | 4 | else {↵ | |
5 | return new PersistentList( session, (List) collection );↵ | 5 | return new PersistentSortedSet( session, (java.util.SortedSet) collection );↵ | |
6 | } | 6 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 9 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (session.getEntityMode() == EntityMode.DOM4J) | 1 | if (session.getEntityMode() == EntityMode.DOM4J) | |||||||||||||||||||
2 | return new PersistentListElementHolder(session, (Element)collection); |
| 2 | return new PersistentElementHolder(session, (Element)collection); | ||||||||||||||||||
else | else | |||||||||||||||||||||
3 | return new PersistentList(session, (List)collection); |
| 3 | return new PersistentSortedSet(session, (java.util.SortedSet)collection); |
Row | Violation |
---|---|
1 | Expression new PersistentListElementHolder(session,(Element)collection) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new PersistentElementHolder(session,(Element)collection) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression new PersistentList(session,(List)collection) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression new PersistentSortedSet(session,(java.util.SortedSet)collection) cannot be parameterized, because it has dependencies to/from statements that will be extracted |