if ( this == o ) {
return true;
}
if ( o == null || getClass() != o.getClass() ) {
return false;
}
final DelayedPostInsertIdentifier that = ( DelayedPostInsertIdentifier ) o;
return sequence == that.sequence;
if ( this == o ) {
return true;
}
if ( o == null || getClass() != o.getClass() ) {
return false;
}
Id id = ( Id ) o;
return number == id.number && customer.equals( id.customer );
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/action/DelayedPostInsertIdentifier.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/keymanytoone/bidir/component/Order.java
|
Method name: boolean equals(Object)
|
|
Method name: boolean equals(Object)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if ( this == o ) {↵ | | 1 | if ( this == o ) {↵
|
2 | return true;↵ | | 2 | return true;↵
|
3 | }↵ | | 3 | }↵
|
4 | if ( o == null || getClass() != o.getClass() ) {↵ | | 4 | if ( o == null || getClass() != o.getClass() ) {↵
|
5 | return false;↵ | | 5 | return false;↵
|
6 | }↵ | | 6 | ↵
|
7 | final DelayedPostInsertIdentifier that = ( DelayedPostInsertIdentifier↵ | | 7 | }↵
|
|
8 | ) o;↵ | | 8 | Id id = ( Id ) o;↵
|
9 | return sequence == that.sequence; | | 9 | return number == id.number && customer.equals( id.customer );
|
See real code fragment |
|
See real code fragment |
Summary
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.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 17 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (this == o) | | 1 | if (this == o) |
2 | | | 2 | |
3 | if (o == null || getClass() != o.getClass()) | | 3 | if (o == null || getClass() != o.getClass()) |
4 | | | 4 | |
| | | 5 | Id id = (Id)o; |
5 | final DelayedPostInsertIdentifier that = (DelayedPostInsertIdentifier)o; | | | |
| | | 6 | return number == id.number && customer.equals(id.customer); |
6 | return sequence == that.sequence; | | | |
Precondition Violations (3)
Row |
Violation |
1 | Type java.lang.Class<> of variable getClass() does not match with type java.lang.Class<> of variable getClass() |
2 | Unmatched return number == id.number && customer.equals(id.customer); |
3 | Unmatched return sequence == that.sequence; |