Property prop = new Property();
prop.setValue( id );
bindProperty( idNode, prop, mappings, inheritedMetas );
entity.setIdentifierProperty( prop );
if ( propertyName != null ) {
Property prop = new Property();
prop.setValue( id );
bindProperty( idNode, prop, mappings, inheritedMetas );
entity.setIdentifierProperty( prop );
}
Clone fragments detected by clone detection tool
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 bindCompositeId(Element, RootClass, Mappings, java.util.Map)
|
|
Method name: void bindSimpleId(Element, RootClass, Mappings, java.util.Map)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 5
|
|
| | | 1 | if ( propertyName != null ) {↵
|
1 | Property prop = new Property();↵ | | 2 | Property prop = new Property();↵
|
2 | prop.setValue( id );↵ | | 3 | prop.setValue( id );↵
|
3 | bindProperty( idNode, prop, mappings, inheritedMetas );↵ | | 4 | bindProperty( idNode, prop, mappings, inheritedMetas );↵
|
4 | entity.setIdentifierProperty( prop ); | | 5 | entity.setIdentifierProperty( prop );↵
|
| | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
9 | Property prop = new Property(); | | 12 | Property prop = new Property(); |
10 | prop.setValue(id); | | 13 | prop.setValue(id); |
11 | bindProperty(idNode, prop, mappings, inheritedMetas); | | 14 | bindProperty(idNode, prop, mappings, inheritedMetas); |
12 | entity.setIdentifierProperty(prop); | | 15 | entity.setIdentifierProperty(prop); |
Precondition Violations (0)
Row |
Violation |