File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/HbmBinder.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/HbmBinder.java | |||
Method name: void createClassProperties(Element, PersistentClass, Mappings, java.util.Map, UniqueKey, boolean, boolean, boolean)
|
Method name: void bindCompositeId(Element, RootClass, Mappings, java.util.Map)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | Join join = new Join();↵ | |||
2 | join.setPersistentClass( persistentClass↵ | 1 | Property prop = new Property();↵ | |
3 | );↵ | 2 | prop.setValue( id );↵ | |
4 | bindJoin( subnode, join, mappings, inheritedMetas );↵ | 3 | bindProperty( idNode, prop, mappings, inheritedMetas );↵ | |
5 | persistentClass.addJoin( join ); | 4 | entity.setIdentifierProperty( prop ); | |
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
Number of mapped statements | 2 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 9 | Property prop = new Property(); | ||||||||||||||||||||||||
| 10 | prop.setValue(id); | ||||||||||||||||||||||||
31 | Join join = new Join(); |
| | |||||||||||||||||||||||
32 | join.setPersistentClass(persistentClass); |
| 11 | bindProperty(idNode, prop, mappings, inheritedMetas); | ||||||||||||||||||||||
33 | bindJoin(subnode, join, mappings, inheritedMetas); |
| 12 | entity.setIdentifierProperty(prop); | ||||||||||||||||||||||
34 | persistentClass.addJoin(join); |
| |
Row | Violation |
---|---|
1 | Unmatched statement Join join=new Join(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression join.setPersistentClass(persistentClass) is a void method call, and thus it cannot be parameterized |
3 | Expression bindProperty(idNode,prop,mappings,inheritedMetas) is a void method call, and thus it cannot be parameterized |
4 | Expression join.setPersistentClass(persistentClass) is a void method call, and thus it cannot be parameterized |
5 | Expression bindProperty(idNode,prop,mappings,inheritedMetas) is a void method call, and thus it cannot be parameterized |
6 | Expression bindJoin(subnode,join,mappings,inheritedMetas) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression bindJoin(subnode,join,mappings,inheritedMetas) is a void method call, and thus it cannot be parameterized |
8 | Expression entity.setIdentifierProperty(prop) is a void method call, and thus it cannot be parameterized |
9 | Expression bindJoin(subnode,join,mappings,inheritedMetas) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression bindJoin(subnode,join,mappings,inheritedMetas) is a void method call, and thus it cannot be parameterized |
11 | Expression entity.setIdentifierProperty(prop) is a void method call, and thus it cannot be parameterized |
12 | Unmatched statement persistentClass.addJoin(join); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |