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 bindComponent(Element, Component, String, String, String, boolean, boolean, Mappings, java.util.Map, boolean)
|
Method name: void bindComponent(Element, Component, String, String, String, boolean, boolean, Mappings, java.util.Map, boolean)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | value = new ManyToOne( component.getTable() );↵ | 1 | value = new SimpleValue( component.getTable() );↵ | |
2 | String relativePath;↵ | 2 | String relativePath;↵ | |
3 | if (isEmbedded) {↵ | 3 | if (isEmbedded) {↵ | |
4 | relativePath = propertyName;↵ | 4 | relativePath = propertyName;↵ | |
5 | }↵ | 5 | }↵ | |
6 | else {↵ | 6 | else {↵ | |
7 | relativePath = subpath.substring( component.getOwner().getEntityName().length() + 1 );↵ | 7 | relativePath = subpath.substring( component.getOwner().getEntityName().length() + 1 );↵ | |
8 | }↵ | 8 | }↵ | |
9 | bindManyToOne( subnode, (ManyToOne) value, relativePath, isNullable, mappings ); | 9 | bindSimpleValue( subnode, (SimpleValue) value, isNullable, relativePath, mappings ); | |
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 20 |
Number of mapped statements | 5 |
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) | 5.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38 | value = new ManyToOne(component.getTable()); |
| 55 | value = new SimpleValue(component.getTable()); | ||||||||||
39 | String relativePath; | 56 | String relativePath; | |||||||||||
40 | if (isEmbedded) | 57 | if (isEmbedded) | |||||||||||
41 | relativePath = propertyName; | 58 | relativePath = propertyName; | |||||||||||
else | else | |||||||||||||
42 | relativePath = subpath.substring(component.getOwner().getEntityName().length() + 1); | 59 | relativePath = subpath.substring(component.getOwner().getEntityName().length() + 1); | |||||||||||
43 | bindManyToOne(subnode, (ManyToOne)value, relativePath, isNullable, mappings); |
| | |||||||||||
|
| 60 | bindSimpleValue(subnode, (SimpleValue)value, isNullable, relativePath, mappings); |
Row | Violation |
---|---|
1 | Unmatched statement bindManyToOne(subnode,(ManyToOne)value,relativePath,isNullable,mappings); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement bindSimpleValue(subnode,(SimpleValue)value,isNullable,relativePath,mappings); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Clone fragment #1 returns variables value, relativePath , while Clone fragment #2 returns variables value, relativePath |