public class InnerKey implements Serializable { private String akey; private String bkey; public String getAkey() { return akey; } public void setAkey(String akey) { this.akey = akey; } public String getBkey() { return bkey; } public void setBkey(String bkey) { this.bkey = bkey; } public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof InnerKey)) return false; final InnerKey cidSuperID = (InnerKey) o; if (akey != null ? !akey.equals(cidSuperID.akey) : cidSuperID.akey != null) return false; if (bkey != null ? !bkey.equals(cidSuperID.bkey) : cidSuperID.bkey != null) return false; return true; } public int hashCode() { int result; result = (akey != null ? akey.hashCode() : 0); result = 29 * result + (bkey != null ? bkey.hashCode() : 0); return result
public class OuterKey implements Serializable { private Middle master; private String detailId; public Middle getMaster() { return master; } public void setMaster(Middle master) { this.master = master; } public String getDetailId() { return detailId; } public void setDetailId(String detailId) { this.detailId = detailId; } public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof OuterKey)) return false; final OuterKey cidDetailID = (OuterKey) o; if (detailId != null ? !detailId.equals(cidDetailID.detailId) : cidDetailID.detailId != null) return false; if (master != null ? !master.equals(cidDetailID.master) : cidDetailID.master != null) return false; return true; } public int hashCode() { int result; result = (master != null ? master.hashCode() : 0); result = 29 * result + (detailId != null ? detailId.hashCode() : 0); return result
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/InnerKey.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/OuterKey.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class InnerKey implements Serializable {
1
public class OuterKey implements Serializable {
2
	private String akey;
2
	private Middle master;
3
	private String bkey;
3
	private String detailId;
4
	public String getAkey() {
4
	public Middle getMaster() {
5
		return akey;
5
		return master;
6
	}
6
	}
7
	public void setAkey(String akey) {
7
	public void setMaster(Middle master) {
8
		this.akey = akey;
8
		this.master = master;
9
	}
9
	}
10
	public String getBkey() {
10
	public String getDetailId() {
11
		return bkey;
11
		return detailId;
12
	}
12
	}
13
	public void setBkey(String bkey) {
13
	public void setDetailId(String detailId) {
14
		this.bkey = bkey;
14
		this.detailId = detailId;
15
	}
15
	}
16
	public boolean equals(Object o) {
16
	public boolean equals(Object o) {
17
		if (this == o) return true;
17
		if (this == o) return true;
18
		if (!(o instanceof InnerKey)) return false;
18
		if (!(o instanceof OuterKey)) return false;
19
		final InnerKey cidSuperID = (InnerKey) o;
19
		final OuterKey cidDetailID = (OuterKey) o;
20
		if (akey != null ? !akey.equals(cidSuperID.akey) : cidSuperID.akey != null) return false;
20
		if (detailId != null ? !detailId.equals(cidDetailID.detailId) : cidDetailID.detailId != null) return false;
21
		if (bkey != null ? !bkey.equals(cidSuperID.bkey) : cidSuperID.bkey != null) return false;
21
		if (master != null ? !master.equals(cidDetailID.master) : cidDetailID.master != null) return false;
22
		return true;
22
		return true;
23
	}
23
	}
24
	public int hashCode() {
24
	public int hashCode() {
25
		int result;
25
		int result;
26
		result = (akey != null ? akey.hashCode() : 0);
26
		result = (master != null ? master.hashCode() : 0);
27
		result = 29 * result + (bkey != null ? bkey.hashCode() : 0);
27
		result = 29 * result + (detailId != null ? detailId.hashCode() : 0);
28
		return result
28
		return result
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.0
Clones location
Number of node comparisons0