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 ContractVariation implements Serializable { private int version; private Contract contract; private String text; public Contract getContract() { return contract; } public void setContract(Contract contract) { this.contract = contract; } public String getText() { return text; } public void setText(String text) { this.text = text; } public int getVersion() { return version; } public void setVersion(int version) { this.version = version; } public ContractVariation() { super(); } public ContractVariation(int version, Contract contract) { this.contract = contract; this.version = version; contract.getVariations().add(this);
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/immutable/ContractVariation.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class PurchaseDetail {
1
public class 
2
	
3
	private PurchaseRecord purchaseRecord;
4
	
5
	private String productId
2
ContractVariation implements Serializable {
3
	
4
	private int version;
6
;
5
	private Contract contract;
7
	private int quantity;
6
	private String text;
8
	
9
	public PurchaseDetail(PurchaseRecord record, String productId, int quantity) {
7
	public 
10
		this.productId = productId;
11
		this.quantity = quantity;
12
		this.purchaseRecord = record
8
Contract getContract() {
9
		return contract;
10
	}
11
	public void setContract(Contract contract) {
13
;
12
		this.contract = contract;
14
	}
13
	}
15
	public PurchaseDetail() {}
14
	public String getText() {
16
	
15
	
17
	
18
	/**
19
	 * @return the purchaseRecord
20
	 */
21
	public PurchaseRecord getPurchaseRecord() {
22
		return purchaseRecord;
23
	}
24
	/**
25
	 * @param purchaseRecord the purchaseRecord to set
26
	 */
27
	public void setPurchaseRecord(PurchaseRecord purchaseRecord) {
28
		this.purchaseRecord = purchaseRecord;
29
	}
30
	/**
31
	 * @return the quantity
32
	 */
33
	public int getQuantity() {
34
		return quantity;
35
	}
36
	/**
37
	 * @param quantity the quantity to set
38
	 */
39
	public void setQuantity(int quantity) {
40
		this.quantity = quantity;
41
	}
42
	/**
43
	 * @return the productId
44
	 */
45
	public String getProductId() {
46
		return productId;
47
	}
48
	/**
49
	 * @param productId the productId to set
50
	 */
51
	public void setProductId(String productId) {
52
		this.productId = productId
16
	return text;
17
	}
18
	public void setText(String text) {
19
		this.text = text;
20
	}
21
	public int getVersion() {
22
		return version;
23
	}
24
	public void setVersion(int version) {
25
		this.version = version;
26
	}
27
	public ContractVariation() {
28
		super();
29
	}
30
	public ContractVariation(int version, Contract contract) {
31
		this.contract = contract;
32
		this.version = version;
53
;
33
		contract.getVariations().add(this);
54
	
34
	
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