public class Person { private Long pk; private String name; private int id; public Person() { } public Person(Long pk, String name, int id) { this.pk = pk; this.name = name; this.id = id; } public Long getPk() { return pk; } public void setPk(Long pk) { this.pk = pk; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getId() { return id; } public void setId(int id) { this.id = id
public class ContractVariation implements Serializable { private int version; private Contract contract; private String text; public Contract getContract() { return contract; } public void setContract(Contract contract) { this.contract = contract; } public String getText() { return text; } public void setText(String text) { this.text = text; } public int getVersion() { return version; } public void setVersion(int version) { this.version = version; } public ContractVariation() { super(); } public ContractVariation(int version, Contract contract) { this.contract = contract; this.version = version; contract.getVariations().add(this)
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/idprops/Person.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/immutable/ContractVariation.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class Person {
1
public class 
2
	private Long pk;
3
	private String name;
2
ContractVariation implements Serializable {
3
	
4
	private int version;
5
	private Contract contract;
4
	private int id;
6
	private 
5
	public Person() {
6
	}
7
	public Person(Long pk, String name, int id
7
String text;
8
	public Contract getContract() {
9
		return contract;
10
	}
8
) {
11
	public void setContract(Contract contract) {
9
		this.pk = pk;
12
		this.
10
		this.name = name;
11
		this.id = id;
12
	}
13

13
contract = contract;
14
	}
14
	public Long getPk() {
15
	public String getText() {
15
		return pk;
16
		return 
16
	}
17

17
text;
18
	}
18
	public void setPk(Long pk) {
19
	public void setText(String text) {
19
		this.pk = pk;
20
		this.
20
	}
21

21
text = text;
22
	}
22
	public String getName() {
23
	public int getVersion() {
23
		return name;
24
		return 
24
	}
25

25
version;
26
	}
26
	public void setName(String name) {
27
	public void setVersion(int version) {
27
		this.name = name;
28
		this.
28
	}
29
	public int getId
29
version = version;
30
	}
30
() {
31
	public ContractVariation() {
31
		return id;
32
		
32
	}
33
	public void setId(int id
33
super();
34
	}
34
) {
35
	public ContractVariation(int version, Contract contract) {
35
		this.id = id
36
		this.contract = contract;
37
		this.version = version;
38
		contract.getVariations().add(this)
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