public class PurchaseDetail { private PurchaseRecord purchaseRecord; private String productId; private int quantity; public PurchaseDetail(PurchaseRecord record, String productId, int quantity) { this.productId = productId; this.quantity = quantity; this.purchaseRecord = record; } public PurchaseDetail() {} /** * @return the purchaseRecord */ public PurchaseRecord getPurchaseRecord() { return purchaseRecord; } /** * @param purchaseRecord the purchaseRecord to set */ public void setPurchaseRecord(PurchaseRecord purchaseRecord) { this.purchaseRecord = purchaseRecord; } /** * @return the quantity */ public int getQuantity() { return quantity; } /** * @param quantity the quantity to set */ public void setQuantity(int quantity) { this.quantity = quantity; } /** * @return the productId */ public String getProductId() { return productId; } /** * @param productId the productId to set */ public void setProductId(String productId) { this.productId = productId
public class Person { private Long pk; private String name; private int id; public Person() { } public Person(Long pk, String name, int id) { this.pk = pk; this.name = name; this.id = id; } public Long getPk() { return pk; } public void setPk(Long pk) { this.pk = pk; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getId() { return id; } public void setId(int id) { this.id = id
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/cid/PurchaseDetail.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/idprops/Person.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class PurchaseDetail {
1
public class P
2
	
3
	private PurchaseRecord purchaseRecord;
4
	
2
erson {
3
	private Long pk;
5
	private String productId;
4
	private String name;
6
	private int quantity;
5
	private int 
7
	
8
	public PurchaseDetail(PurchaseRecord record, String productId, int quantity
6
id;
7
	public Person() {
8
	}
9
) {
9
	public Person(Long pk, String name, int id) {
10
		this.productId = productId;
10
		this.p
11
		this.quantity = quantity;
12
		this.purchaseRecord = recor
11
k = pk;
12
		this.name = name;
13
d;
13
		this.id = id;
14
	}
14
	}
15
	public PurchaseDetail() {}
16
	
17
	
18
	/**
19
	 * @return the purchaseRecord
20
	 */
21
	public PurchaseRecord getPurchaseRecord
22
() {
15
	public Long getPk() {
23
		return purchaseRecord;
16
		return p
24
	}
25
	/**
26
	 * @param purchaseRecord the purchaseRecord to set
27
	 */
28
	public void setPurchaseRecord(PurchaseRecord purchaseRecord
17
k;
18
	}
29
) {
19
	public void setPk(Long pk) {
30
		this.purchaseRecord = purchaseRecord;
20
		this.p
31
	}
32
	/**
33
	 * @return the quantity
34
	 */
21
k = pk;
22
	}
23

35
	public int getQuantity() {
24
	public String getName() {
36
		return quantity;
25
		return 
37
	}
38
	/**
39
	 * @param quantity the quantity to set
40
	 */
26
name;
27
	}
28

41
	public void setQuantity(int quantity) {
29
	public void setName(String name) {
42
		this.quantity = quantity;
30
		this.
43
	}
44
	/**
45
	 * @return the productId
46
	 */
31
name = name;
32
	}
33

47
	public String getProductId() {
34
	public int getId() {
48
		return productId;
35
		return id;
49
	}
36
	}
50
	/**
51
	 * @param productId the productId to set
52
	 */
37

53
	public void setProductId(String productId) {
38
	public void setId(int id) {
54
		this.productId = productId
39
		this.id = id
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