public class Employee { private String personName; private Person person; private Collection employments = new ArrayList(); Employee() {} public Employee(Person p) { this.person = p; this.personName = p.getName(); p.setEmployee(this); } public Person getPerson() { return person; } public void setPerson(Person person) { this.person = person; } public String getPersonName() { return personName; } public void setPersonName(String personName) { this.personName = personName; } public Collection getEmployments() { return employments; } public void setEmployments(Collection employments) { this.employments = employments
public class Person { private String name; private Date dob; private String currentAddress; Person() {} public Person(String name, Date dob, String address) { this.name = name; this.dob = dob; this.currentAddress = address; } public Date getDob() { return dob; } public void setDob(Date dob) { this.dob = dob; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCurrentAddress() { return currentAddress; } public void setCurrentAddress(String currentAddress) { this.currentAddress = currentAddress
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/lazyonetoone/Employee.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/timestamp/Person.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class Employee {
1
public class Person {
2
	private String personName;
2
	private String name;
3
	private Person person;
3
	private 
4
	private Collection employments = new ArrayList(); 
5
	Employee() {}
6
	public Employee(Person p) {
7
		this.person = p;
8
		this.personName = p.getName();
9
		p.setEmployee(this);
10
	}
11
	public Person getPerson
4
Date dob;
5
	private String currentAddress;
6
	Person() {}
7
	public Person(String name, Date dob, String address) {
8
		this.name = name;
9
		this.dob = dob;
10
		this.currentAddress = address;
11
	}
12
() {
12
	public Date getDob() {
13
		return person;
13
		return dob;
14
	}
14
	}
15
	public void setPerson(Person person) {
15
	public void set
16
		this.person = person
16
Dob(Date dob) {
17
;
17
		this.dob = dob;
18
	}
18
	}
19
	public String getPersonName() {
19
	public String getName() {
20
		return personName;
20
		return name;
21
	}
21
	}
22
	public void setPersonName(String personName) {
22
	public void setName(String name) {
23
		this.personName = personName;
23
		this.
24
	}
25
	public Collection getEmployment
24
name = name;
25
	}
26
s() {
26
	public String getCurrentAddress() {
27
		return employments;
27
		return currentAddress;
28
	}
28
	}
29
	public void setEmployments(Collection employments) {
29
	public void set
30
		this.employments = employment
30
CurrentAddress(String currentAddress) {
31
s
31
		this.currentAddress = currentAddress
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