public class Parent { private Long id; private String name; private Collection children = new HashSet(); Parent() {} public Parent(String name) { this.name = name; } /** * @return Returns the children. */ public Collection getChildren() { return children; } /** * @param children The children to set. */ public void setChildren(Collection children) { this.children = children; } /** * @return Returns the id. */ public Long getId() { return id; } /** * @param id The id to set. */ public void setId(Long id) { this.id = id; } /** * @return Returns the name. */ public String getName() { return name; } /** * @param name The name to set. */ public void setName(String name) { this.name = name;
public class Group { private Long id; private List persons = new ArrayList(); private String name; public Group() { } public Group(String name) { this.name = name; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public List getPersons() { return persons; } public void setPersons(List persons) { this.persons = persons; } public String getName() { return name; } public void setName(String name) { this.name = name;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/compositeelement/Parent.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/sql/hand/Group.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class Parent {
1
public class Group {
2
	private Long id;
2
	private Long id;
3
	private String name;
3
	private 
4
	private Collection children = new HashSet();
5
	Parent() {}
4
List persons = new ArrayList();
5
	private String name;
6
	public Group() {
7
	}
6
	public Parent(String name) {
8
	public Group(String name) {
7
		this.name = name;
9
		this.name = name;
8
	}
10
	}
9
	/**
10
	 * @return Returns the children.
11
	 */
12
	public Collection getChildren() {
11
	public Long getId() {
13
		return children;
12
		return 
14
	}
15
	/**
16
	 * @param children The children to set.
17
	 */
18
	public void setChildren(Collection children
13
id;
14
	}
19
) {
15
	public void setId(Long id) {
20
		this.children = children;
16
		this.
21
	}
22
	/**
23
	 * @return Returns the id.
24
	 */
17
id = id;
18
	}
25
	public Long getId() {
19
	public List getPersons() {
26
		return id;
20
		return 
27
	}
28
	/**
29
	 * @param id The id to set.
30
	 */
31
	public void setId(Long id) {
32
		this.id = id;
33
	}
34
	/**
35
	 * @return Returns the name.
36
	 */
21
persons;
22
	}
23
	public void setPersons(List persons) {
24
		this.persons = persons;
25
	}
37
	public String getName() {
26
	public String getName() {
38
		return name;
27
		return name;
39
	}
28
	}
40
	/**
41
	 * @param name The name to set.
42
	 */
43
	public void setName(String name) {
29
	public void setName(String name) {
44
		this.name = name;
30
		this.name = name;
45
	
31
	
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