if (other instanceof Id) {
Id that = (Id) other;
return that.customerId.equals(this.customerId) &&
that.orderNumber == this.orderNumber;
}
else {
return false;
}
if (other instanceof Id) {
Id that = (Id) other;
return purchaseSequence.equals(this.purchaseSequence) &&
that.purchaseNumber == this.purchaseNumber;
}
else {
return false;
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/cid/Order.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/cid/PurchaseRecord.java
|
Method name: boolean equals(Object)
|
|
Method name: boolean equals(Object)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (other instanceof Id) {↵ | | 1 | if (other instanceof Id) {↵
|
2 | Id that = (Id) other;↵ | | 2 | Id that = (Id) other;↵
|
3 | return that.customerId.equals(this.customerId) &&↵ | | 3 | return purchaseSequence.equals(this.purchaseSequence) &&↵
|
4 | that.orderNumber == this.orderNumber;↵ | | 4 | that.purchaseNumber == this.purchaseNumber;↵
|
5 | }↵ | | 5 | }↵
|
6 | else {↵ | | 6 | else {↵
|
7 | return false;↵ | | 7 | return false;↵
|
8 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
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 |
Number of node comparisons | 1 |