public class Comment { private String text; private Item item; private Calendar timestamp; private Long id; public Item getItem() { return item; } public void setItem(Item item) { this.item = item; } public Calendar getTimestamp() { return timestamp; } public void setTimestamp(Calendar timestamp) { this.timestamp = timestamp; } Comment() {} public Comment(Item item, String comment) { this.text = comment; this.item = item; item.getComments().add(this); this.timestamp = Calendar.getInstance(); } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getText() { return text; } public void setText(String text) { this.text = text;
public class Employment implements Serializable { private String personName; private String organizationName; private Date startDate; private Date endDate; Employment() {} public Employment(Employee e, String org) { this.personName = e.getPersonName(); this.organizationName = org; startDate = new Date(); e.getEmployments().add(this); } public String getOrganizationName() { return organizationName; } public void setOrganizationName(String organizationName) { this.organizationName = organizationName; } public String getPersonName() { return personName; } public void setPersonName(String personName) { this.personName = personName; } public Date getEndDate() { return endDate; } public void setEndDate(Date endDate) { this.endDate = endDate; } public Date getStartDate() { return startDate; } public void setStartDate(Date startDate) { this.startDate = startDate;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/joinfetch/Comment.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/lazyonetoone/Employment.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class Comment {
1
public class 
2
	
2
Employment implements Serializable {
3
	private String text;
3
	private String personName;
4
	private Item item;
4
	private 
5
	private Calendar timestamp;
6
	private Long id;
7
	public Item getItem() {
8
		return item;
9
	}
10
	public void setItem(Item item) {
11
		this.item = item;
12
	}
13
	public Calendar getTimest
5
String organizationName;
6
	private Date startDate;
7
	private Date endDate;
8
	Employment() {}
9
	public Employment(Employee e, String org) {
10
		this.personName = e.getPersonName();
11
		this.organizationName = org;
12
		startDate = new Date();
13
		e.getEmployments().add(this);
14
	}
14
amp() {
15
	public String getOrganizationName() {
15
		return timestamp;
16
		return organizationName;
16
	}
17
	}
17
	public void setTimestamp(Calendar timestamp) {
18
	public void set
18
		this.timestamp = timestamp;
19
	}
20
	
21
	Comment() {}
22
	public Comment(Item item, String comment) {
23
		this.text = comment;
24
		this.item = item;
25
		item.getComments().add(this);
19
OrganizationName(String organizationName) {
20
		this.organizationName = organizationName;
21
	}
22
	public String getPersonName() {
23
		return personName;
24
	}
25
	public void setPersonName(String personName) {
26
		this.timestamp = Calendar.getInstance();
26
		this.personName = personName;
27
	}
27
	}
28
	public Long getId() {
28
	public Date getEndDate() {
29
		return id;
29
		return endDate;
30
	}
30
	}
31
	public void setId(Long id) {
31
	public void setEndDate(Date endDate) {
32
		this.id = id;
32
		this.
33
	}
34
	public String getText
33
endDate = endDate;
34
	}
35
() {
35
	public Date getStartDate() {
36
		return text;
36
		return startDate;
37
	}
37
	}
38
	public void setText(String text) {
38
	public void set
39
		this.text = text
39
StartDate(Date startDate) {
40
;
40
		this.startDate = startDate;
41
	
41
	
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