public class Part { private Long id; private Item item; private String name; private String stockNumber; private BigDecimal unitPrice; public Part() { } public Part(Item item, String name, String stockNumber, BigDecimal unitPrice) { this.item = item; this.name = name; this.stockNumber = stockNumber; this.unitPrice = unitPrice; this.item.getParts().add( this ); } public Long getId() { return id; } private void setId(Long id) { this.id = id; } public Item getItem() { return item; } private void setItem(Item item) { this.item = item; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getStockNumber() { return stockNumber; } public void setStockNumber(String stockNumber) { this.stockNumber = stockNumber; } public BigDecimal getUnitPrice() { return unitPrice; } public void setUnitPrice(BigDecimal unitPrice) { this.unitPrice = unitPrice
public class Address { private Long id; private String streetAddress; private String city; private String country; private Person resident; public Address() { } public Address(String streetAddress, String city, String country, Person resident) { this.streetAddress = streetAddress; this.city = city; this.country = country; this.resident = resident; resident.setAddress( this ); } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getStreetAddress() { return streetAddress; } public void setStreetAddress(String streetAddress) { this.streetAddress = streetAddress; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } public Person getResident() { return resident; } public void setResident(Person resident) { this.resident = resident
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/jpa/Part.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/ops/Address.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class Part {
1
public class Address {
2
	private Long id;
2
	private Long id;
3
	private Item item;
3
	private String streetAddress;
4
	private String name;
4
	private String city;
5
	private String stockNumber;
5
	private String country;
6
	private BigDecimal unitPrice;
6
	private Person resident;
7
	public Part() {
7
	public Address() {
8
	}
8
	}
9
	public Part(Item item, String name, String stockNumber, BigDecimal unitPrice) {
9
	public Address(String streetAddress, String city, String 
10
		this.item = item;
11
		this.name = name;
12
		this.stockNumber = stockNumber;
13
		this.unitPrice = unitPrice;
14
		this.item.getParts().add
10
country, Person resident) {
11
		this.streetAddress = streetAddress;
12
		this.city = city;
13
		this.country = country;
14
		this.resident = resident;
15
( this );
15
		resident.setAddress( this );
16
	}
16
	}
17
	public Long getId() {
17
	public Long getId() {
18
		return id;
18
		return id;
19
	}
19
	}
20
	private void setId(Long id) {
20
	public void setId(Long id) {
21
		this.id = id;
21
		this.id = id;
22
	}
22
	}
23
	public Item getItem() {
23
	public String getStreetAddress() {
24
		return item;
24
		return streetAddress;
25
	}
25
	}
26
	private void setItem(Item item) {
26
	public void set
27
		this.item = item
27
StreetAddress(String streetAddress) {
28
;
28
		this.streetAddress = streetAddress;
29
	}
29
	}
30
	public String getName() {
30
	public String getCity() {
31
		return name;
31
		return city;
32
	}
32
	}
33
	public void setName(String name) {
33
	public void setCity(String city) {
34
		this.name = name;
34
		this.city = city;
35
	}
35
	}
36
	public String getStockNumber() {
36
	public String getCountry() {
37
		return stockNumber;
37
		return country;
38
	}
38
	}
39
	public void setStockNumber(String stockNumber) {
39
	public void setCountry(String country) {
40
		this.stockNumber = stockNumber;
40
		this.
41
	}
42
	public BigDecimal getUnitPrice
41
country = country;
42
	}
43
() {
43
	public Person getResident() {
44
		return unitPrice;
44
		return resident;
45
	}
45
	}
46
	public void setUnitPrice(BigDecimal unitPrice) {
46
	public void set
47
		this.unitPrice = unitPrice
47
Resident(Person resident) {
48
		this.resident = resident
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