WrapVisitor visitor = new WrapVisitor( source );
// substitutes into values by side-effect
visitor.processEntityPropertyValues( values, types );
return visitor.isSubstitutionRequired();
WrapVisitor visitor = new WrapVisitor(session);
// substitutes into values by side-effect
visitor.processEntityPropertyValues(values, types);
return visitor.isSubstitutionRequired();
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/event/def/AbstractSaveEventListener.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/event/def/DefaultFlushEntityEventListener.java
|
Method name: boolean visitCollectionsBeforeSave(Object, Serializable, Object[], Type[], EventSource)
|
|
Method name: boolean wrapCollections(EventSource, EntityPersister, Type[], Object[])
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | WrapVisitor visitor = new WrapVisitor( source );↵ | | 1 | WrapVisitor visitor = new WrapVisitor(session);↵
|
2 | // substitutes into values by side-effect↵ | | 2 | // substitutes into values by side-effect↵
|
3 | visitor.processEntityPropertyValues( values, types );↵ | | 3 | visitor.processEntityPropertyValues(values, types);↵
|
4 | return visitor.isSubstitutionRequired(); | | 4 | return visitor.isSubstitutionRequired();
|
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 in different classes |
Number of node comparisons | 5 |
-
{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.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | WrapVisitor visitor = new WrapVisitor(source); | | 2 | WrapVisitor visitor = new WrapVisitor(session); |
2 | visitor.processEntityPropertyValues(values, types); | | 3 | visitor.processEntityPropertyValues(values, types); |
3 | return visitor.isSubstitutionRequired(); | | 4 | return visitor.isSubstitutionRequired(); |
Precondition Violations (0)
Row |
Violation |