public class A { // Constants ----------------------------------------------------------------------------------- // Static -------------------------------------------------------------------------------------- // Attributes ---------------------------------------------------------------------------------- private long id; private String data; // A 1 - * H private Set hs; // A 1 - 1 G private G g; // Constructors -------------------------------------------------------------------------------- public A() { hs = new HashSet(); } public A(String data) { this(); this.data = data; } // Public -------------------------------------------------------------------------------------- public long getId() { return id; } public void setId(long id) { this.id = id; } public void setData(String data) { this.data = data; } public String getData() { return data; } public void setHs(Set hs) { this.hs = hs; } public Set getHs() { return hs; } public void setG(G g) { this.g = g; } public G getG() { return g; } public void addH(H h) { hs.add(h); h.setA(this); } public String toString() { return "A[" + id + ", " + data + "]"
public class DataPoint implements Serializable { private long id; private BigDecimal x; private BigDecimal y; private String description; public DataPoint() { } public DataPoint(BigDecimal x, BigDecimal y, String description) { this.x = x; this.y = y; this.description = description; } /** * @return Returns the description. */ public String getDescription() { return description; } /** * @param description The description to set. */ public void setDescription(String description) { this.description = description; } /** * @return Returns the id. */ public long getId() { return id; } /** * @param id The id to set. */ public void setId(long id) { this.id = id; } /** * @return Returns the x. */ public BigDecimal getX() { return x; } /** * @param x The x to set. */ public void setX(BigDecimal x) { this.x = x; } /** * @return Returns the y. */ public BigDecimal getY() { return y; } /** * @param y The y to set. */ public void setY(BigDecimal y) { this.y = y; } void exception() throws Exception { throw new Exception("foo")
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/cascade/A.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/proxy/DataPoint.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class A
1
public class 
2
{
3
    // Constants -----------------------------------------------------------------------------------
4
    // Static --------------------------------------------------------------------------------------
5
    // Attributes ----------------------------------------------------------------------------------
6
    
2
DataPoint implements Serializable {
7
private long id;
3
	private long id;
8
    private String data;
9
    // A 1 - * H
10
    private Set hs;
11
    // A 1 - 1 G
12
    private G g;
13
    // Constructors --------------------------------------------------------------------------------
14
    public A()
15
    {
16
        hs = new HashSet();
17
    }
18
    public A(String data)
19
    {
20
        this();
21
        this.data = data;
22
    }
23
    // Public --------------------------------------------------------------------------------------
24
    
4
	private BigDecimal x;
5
	private BigDecimal y;
6
	private String description;
7
	public DataPoint() {
8
	}
9
	public DataPoint(BigDecimal x, BigDecimal y, String description) {
10
		this.x = x;
11
		this.y = y;
12
		this.description = description;
13
	}
14
	/**
15
	 * @return Returns the description.
16
	 */
25
public long getId()
17
	public String get
26
    {
27
        return id;
28
    }
29
    public void setId(long id)
30
    {
31
        this.id = id;
32
    }
33
    
18
Description() {
19
		return description;
20
	}
21
	/**
22
	 * @param description The description to set.
23
	 */
34
public void setData(String data)
24
	public void setD
35
    {
36
        this.data = data;
37
    }
38
    
25
escription(String description) {
26
		this.description = description;
27
	}
28
	/**
29
	 * @return Returns the id.
30
	 */
39
public String getData()
31
	public long get
40
    {
41
        return data;
42
    }
43
    public void setHs(Set hs)
44
    {
45
        
32
Id() {
33
		return id;
34
	}
35
	/**
36
	 * @param id The id to set.
37
	 */
38
	public void setId(long id) {
46
this.hs = hs;
39
		this.id = 
47
    }
48
    public Set getHs()
49
    {
50
        return hs;
51
    }
52
    public void setG(G g)
53
    {
54
        
40
id;
41
	}
42
	/**
43
	 * @return Returns the x.
44
	 */
45
	public BigDecimal getX() {
46
		return x;
47
	}
48
	/**
49
	 * @param x The x to set.
50
	 */
51
	public void setX(BigDecimal x) {
55
this.g = g;
52
		this.x = 
56
    }
57
    public G
53
x;
54
	}
55
	/**
56
	 * @return Returns the y.
57
	 */
58
 getG()
58
	public BigDecimal getY()
59
    {
60
        return g;
61
    }
62
    public void addH(H h)
63
    {
64
        hs.add(h);
65
        h.setA(this);
66
    }
67
    public String toString()
68
    {
69
        return "A[" + id + ", " + data + "]"
59
 {
60
		return y;
61
	}
62
	/**
63
	 * @param y The y to set.
64
	 */
65
	public void setY(BigDecimal y) {
66
		this.y = y;
67
	}
68
	
69
	void exception() throws Exception {
70
		throw new Exception("foo")
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