if (other instanceof Id) { Id that = (Id) other; return that.customerId.equals(this.customerId) && that.orderNumber == this.orderNumber; } else { return false; }
if (other instanceof Person) { Person that = (Person) other; return that.isDeleted() == deleted && that.getUserId().equals(userId); } 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/cuk/Person.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 Person) {
2
				Id that = (Id) other;
2
			Person that = (Person) other;
3
				return that.customerId.equals(this.customerId) &&
3
			return that.
4
					that.orderNumber == this.orderNumber;
4
isDeleted() == deleted && that.getUserId().equals(userId);
5
			}
5
		}
6
			else {
6
		else {
7
				return false;
7
			return false;
8
			}
8
		}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons1