File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/tree/DotNode.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/Nullability.java | |||
Method name: void dereferenceCollection(CollectionType, boolean, boolean, String, AST)
|
Method name: String checkSubElementsNullability(Type, Object)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if ( !implicitJoin ) {↵ | |||
2 | EntityPersister entityPersister = elem.getEntityPersister↵ | 1 | while ( iter.hasNext() ) {↵ | |
3 | ();↵ | 2 | Object compValue = iter.next();↵ | |
4 | if ( entityPersister != null ) {↵ | 3 | if (compValue != null) {↵ | |
5 | getWalker().addQuerySpaces( entityPersister.getQuerySpaces() );↵ | 4 | return checkComponentNullability(compValue, componentType);↵ | |
6 | }↵ | 5 | }↵ | |
7 | } | 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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 10 | Object compValue = iter.next(); | |||||||||||||||
22 | EntityPersister entityPersister = elem.getEntityPersister(); | | ||||||||||||||||
23 | if (entityPersister != null) |
| 11 | if (compValue != null) | ||||||||||||||
|
| 12 | return checkComponentNullability(compValue, componentType); | |||||||||||||||
24 | getWalker().addQuerySpaces(entityPersister.getQuerySpaces()); | |
Row | Violation |
---|---|
1 | Unmatched statement Object compValue=iter.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Type org.hibernate.persister.entity.EntityPersister of variable entityPersister does not match with type java.lang.Object of variable compValue |
3 | Unmatched return checkComponentNullability(compValue,componentType); |