1633-1-2

TaskSeriesCollection clone = (TaskSeriesCollection) super.clone(); clone.data = (List) ObjectUtilities.deepClone(this.data); clone.keys = new java.util.ArrayList(this.keys); return clone;
XYSeriesCollection clone = (XYSeriesCollection) super.clone(); clone.data = (List) ObjectUtilities.deepClone(this.data); clone.intervalDelegate = (IntervalXYDelegate) this.intervalDelegate.clone(); return clone;

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/gantt/TaskSeriesCollection.java |  | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/XYSeriesCollection.java
Method name: `Object clone()` |  | Method name: `Object clone()`
Number of AST nodes: 4 |  | Number of AST nodes: 4

1

    TaskSeriesCollection clone = (TaskSeriesCollection) super.clone();↵

1

    XYSeriesCollection clone = (XYSeriesCollection) super.clone();↵

2

        	clone.data = (List) ObjectUtilities.deepClone(this.data);↵

2

            clone.data = (List) ObjectUtilities.deepClone(this.data);↵

3

        	clone.keys = new java.util.ArrayList(this.keys↵

3

            clone.intervalDelegate↵

4

    );↵

4

                    = (IntervalXYDelegate) this.intervalDelegate.clone();↵

5

        	return clone;

5

            return clone;

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 0
Number of non-refactorable cases | 1
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 12

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 3
   Number of unmapped statements in the first code fragment | 1
   Number of unmapped statements in the second code fragment | 1
   Time elapsed for statement mapping (ms) | 0.0
   Clone type | Type 2

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   1

       TaskSeriesCollection clone = (TaskSeriesCollection)super.clone();

   1 | TaskSeriesCollection clone = (TaskSeriesCollection)super.clone();
   1 | XYSeriesCollection clone = (XYSeriesCollection)super.clone();

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.data.gantt.TaskSeriesCollection | org.jfree.data.xy.XYSeriesCollection | SUBCLASS_TYPE_MISMATCH
   org.jfree.data.gantt.TaskSeriesCollection | org.jfree.data.xy.XYSeriesCollection | SUBCLASS_TYPE_MISMATCH
   org.jfree.data.gantt.TaskSeriesCollection | org.jfree.data.xy.XYSeriesCollection | SUBCLASS_TYPE_MISMATCH

   1

       XYSeriesCollection clone = (XYSeriesCollection)super.clone();

   2

       clone.data = (List)ObjectUtilities.deepClone(this.data);

   2 | clone.data = (List)ObjectUtilities.deepClone(this.data);
   2 | clone.data = (List)ObjectUtilities.deepClone(this.data);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.data.gantt.TaskSeriesCollection | org.jfree.data.xy.XYSeriesCollection | SUBCLASS_TYPE_MISMATCH

   2

       clone.data = (List)ObjectUtilities.deepClone(this.data);

   3

       clone.intervalDelegate = (IntervalXYDelegate)this.intervalDelegate.clone();

   3

       clone.keys = new java.util.ArrayList(this.keys);

   4

       return clone;

   4 | return clone;
   4 | return clone;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.data.gantt.TaskSeriesCollection | org.jfree.data.xy.XYSeriesCollection | SUBCLASS_TYPE_MISMATCH

   4

       return clone;

   Precondition Violations (1)
   Row | Violation
   --- | ---
   1 | Clone fragment #1 returns variable clone with type org.jfree.data.gantt.TaskSeriesCollection , while Clone fragment #2 returns variable clone with type org.jfree.data.xy.XYSeriesCollection