if (other instanceof Id) {
Id that = (Id) other;
return that.customerId.equals(this.customerId) &&
that.productId.equals(this.productId) &&
that.orderNumber == this.orderNumber;
}
else {
return false;
}
if (other instanceof Id) {
Id that = (Id) other;
return that.customerId.equals(this.customerId) &&
that.orderNumber == this.orderNumber;
}
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/LineItem.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/cid/Order.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 that.customerId.equals(this.customerId) &&↵
|
4 | that.productId.equals(this.productId) &&↵ | | 4 | ↵
|
5 | that.orderNumber == this.orderNumber;↵ | | 5 | that.orderNumber == this.orderNumber;↵
|
6 | }↵ | | 6 | }↵
|
7 | else {↵ | | 7 | else {↵
|
8 | return false;↵ | | 8 | return false;↵
|
9 | } | | 9 | }
|
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 |