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;
4
	private int id;
5
	public Person() {
6
	}
7
	public Person(Long pk, String name, int id) {
8
		this.pk = pk;
9
		this.name = name;
10
		this.id = id;
11
	}
12

2
ContractVariation implements Serializable {
3
	
4
	private int version;
5
	private Contract contract;
6
	private String text;
7
	public Contract getContract() {
8
		return contract;
9
	}
10
	public void setContract(Contract contract) {
11
		this.contract = contract;
12
	}
13
	public Long getPk() {
13
	public String getText() {
14
		return pk;
14
		return 
15
	}
16

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

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

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