if ( tuplizerImplClassName == null ) {
dom4jTuplizer = entityTuplizerFactory.constructDefaultTuplizer( EntityMode.DOM4J, em, mappedEntity );
}
else {
dom4jTuplizer = entityTuplizerFactory.constructTuplizer( tuplizerImplClassName, em, mappedEntity );
}
if ( tuplizerImplClassName == null ) {
pojoTuplizer = entityTuplizerFactory.constructDefaultTuplizer( EntityMode.POJO, em, mappedEntity );
}
else {
pojoTuplizer = entityTuplizerFactory.constructTuplizer( tuplizerImplClassName, em, mappedEntity );
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/entity/EntityEntityModeToTuplizerMapping.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/entity/EntityEntityModeToTuplizerMapping.java
|
Method name: void EntityEntityModeToTuplizerMapping(PersistentClass, EntityMetamodel)
|
|
Method name: void EntityEntityModeToTuplizerMapping(PersistentClass, EntityMetamodel)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if ( tuplizerImplClassName == null ) {↵ | | 1 | if ( tuplizerImplClassName == null ) {↵
|
2 | dom4jTuplizer = entityTuplizerFactory.constructDefaultTuplizer( EntityMode.DOM4J, em, mappedEntity );↵ | | 2 | pojoTuplizer = entityTuplizerFactory.constructDefaultTuplizer( EntityMode.POJO, em, mappedEntity );↵
|
3 | }↵ | | 3 | }↵
|
4 | else {↵ | | 4 | else {↵
|
5 | dom4jTuplizer = entityTuplizerFactory.constructTuplizer( tuplizerImplClassName, em, mappedEntity );↵ | | 5 | pojoTuplizer = entityTuplizerFactory.constructTuplizer( tuplizerImplClassName, em, mappedEntity );↵
|
6 | } | | 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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
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) | 0.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
20 | if (tuplizerImplClassName == null) | | 13 | if (tuplizerImplClassName == null) |
21 | dom4jTuplizer = entityTuplizerFactory.constructDefaultTuplizer(EntityMode.DOM4J, em, mappedEntity); | | 14 | pojoTuplizer = entityTuplizerFactory.constructDefaultTuplizer(EntityMode.POJO, em, mappedEntity); |
| | | | |
22 | dom4jTuplizer = entityTuplizerFactory.constructTuplizer(tuplizerImplClassName, em, mappedEntity); | | 15 | pojoTuplizer = entityTuplizerFactory.constructTuplizer(tuplizerImplClassName, em, mappedEntity); |
Precondition Violations (0)
Row |
Violation |