public class MyChild { private Long id; private String name; private MyEntity inverseParent; public MyChild() { } public MyChild(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 MyEntity getInverseParent() { return inverseParent; } public void setInverseParent(MyEntity inverseParent) { this.inverseParent = inverseParent;
public class OneToOneProxy { private Long entityId; private String name; private EntityWithOneToOnes entity; public OneToOneProxy() {} public OneToOneProxy(String name) { this.name = name; } /** * @return Returns the id. */ public Long getEntityId() { return entityId; } /** * @param entityId The id to set. */ public void setEntityId(Long entityId) { this.entityId = entityId; } /** * @return Returns the name. */ public String getName() { return name; } /** * @param name The name to set. */ public void setName(String name) { this.name = name; } public EntityWithOneToOnes getEntity() { return entity; } public void setEntity(EntityWithOneToOnes entity) { this.entity = entity;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/generatedkeys/identity/MyChild.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/instrument/domain/OneToOneProxy.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class MyChild {
1
public class OneToOneProxy {
2
	private Long id;
2
	private Long entityId;
3
	private String name;
3
	private String name;
4
	private MyEntity inverseParent;
4
	private Entity
5
	public MyChild() {
6
	}
7
	public MyChild
5
WithOneToOnes entity;
6
	public OneToOneProxy() {}
8
(String name) {
7
	public OneToOneProxy(String name) {
9
		this.name = name;
8
		this.name = name;
10
	}
9
	}
11

10
	/**
11
	 * @return Returns the id.
12
	 */
12
	public Long getId() {
13
	public Long getEntityId() {
13
		return id;
14
		return entityId;
14
	}
15
	}
15

16
	/**
17
	 * @param entityId The id to set.
18
	 */
16
	public void setId(Long id) {
19
	public void setEntityId(Long entityId) {
17
		this.id = id;
20
		this.entityId = entityId;
18
	}
21
	}
19

22
	/**
23
	 * @return Returns the name.
24
	 */
20
	public String getName() {
25
	public String getName() {
21
		return name;
26
		return name;
22
	}
27
	}
23

28
	/**
29
	 * @param name The name to set.
30
	 */
24
	public void setName(String name) {
31
	public void setName(String name) {
25
		this.name = name;
32
		this.name = name;
26
	}
33
	}
27

28
	public MyEntity getInverseParent() {
34
	public EntityWithOneToOnes getEntity() {
29
		return inverseParent;
35
		return 
30
	}
31

36
entity;
37
	}
32
	public void setInverseParent(MyEntity inverseParent) {
38
	public void setEntity(EntityWithOneToOnes entity) {
33
		this.inverseParent = inverseParent;
39
		this.entity = entity;
34
	
40
	
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