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 Customer { private Long id; private String name; private Collection orders = new ArrayList(); public Customer() { } public Customer(String name) { this.name = name; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Collection getOrders() { return orders; } public void setOrders(Collection orders) { this.orders = orders
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/keymanytoone/bidir/embedded/Customer.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class Parent {
1
public class Customer {
2
	private Long id;
2
	private Long id;
3
	private String name;
3
	private String name;
4
	private Collection children = new HashSet();
4
	private Collection 
5
	Parent() {}
5
orders = new ArrayList();
6
	public Customer() {
7
	}
8

6
	public Parent(String name) {
9
	public Customer(String name) {
7
		this.name = name;
10
		this.name = name;
8
	}
11
	}
9
	/**
10
	 * @return Returns the children.
11
	 */
12

12
	public Collection getChildren() {
13
	public Long getId() {
13
		return children;
14
		return 
14
	}
15
	/**
16
	 * @param children The children to set.
17
	 */
18
	public void setChildren(Collection children
15
id;
16
	}
19
) {
17
	public void setId(Long id) {
20
		this.children = children;
18
		this.
21
	}
22
	/**
23
	 * @return Returns the id.
24
	 */
19
id = id;
20
	}
21

25
	public Long getId() {
22
	public String getName() {
26
		return id;
23
		return 
27
	}
28
	/**
29
	 * @param id The id to set.
30
	 */
24
name;
25
	}
26

31
	public void setId(Long id) {
27
	public void setName(String name) {
32
		this.id = id;
28
		this.
33
	}
34
	/**
35
	 * @return Returns the name.
36
	 */
37
	public String getName
29
name = name;
30
	}
38
() {
31
	public Collection getOrders() {
39
		return name;
32
		return 
40
	}
41
	/**
42
	 * @param name The name to set.
43
	 */
44
	public void setName(String name
33
orders;
34
	}
45
) {
35
	public void setOrders(Collection orders) {
46
		this.name = name
36
		this.orders = orders
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