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