if (component!=null) {
processValues(
componentType.getPropertyValues(component, session),
componentType.getSubtypes()
);
}
return null;
if (value!=null) {
getSession().getPersistenceContext().reassociateIfUninitializedProxy(value);
// if it is an initialized proxy, let cascade
// handle it later on
}
return null;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/event/def/AbstractVisitor.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/event/def/ProxyVisitor.java
|
Method name: Object processComponent(Object, AbstractComponentType)
|
|
Method name: Object processEntity(Object, EntityType)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (component!=null) {↵ | | 1 | if (value!=null) {↵
|
2 | processValues(↵ | | 2 | ↵
|
3 | componentType.getPropertyValues(component, session),↵ | | |
|
4 | componentType.getSubtypes()↵ | | |
|
5 | );↵ | | 3 | getSession().getPersistenceContext().reassociateIfUninitializedProxy(value);↵
|
| | | 4 | // if it is an initialized proxy, let cascade↵
|
| | | 5 | // handle it later on↵
|
6 | }↵ | | 6 | }↵
|
|
7 | return null; | | 7 | return null;
|
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
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) | 0.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (component != null) | | 1 | if (value != null) |
| | | 2 | getSession().getPersistenceContext().reassociateIfUninitializedProxy(value); |
2 | processValues(componentType.getPropertyValues(component, session), componentType.getSubtypes()); | | | |
3 | return null; | | 3 | return null; |
Precondition Violations (0)
Row |
Violation |