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;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 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
    Expression1Expression2Difference
    org.jfree.data.gantt.TaskSeriesCollectionorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    org.jfree.data.gantt.TaskSeriesCollectionorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    org.jfree.data.gantt.TaskSeriesCollectionorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Super method call TaskSeriesCollection clone=(TaskSeriesCollection)super.clone(); cannot be extracted from method
    Super method call XYSeriesCollection clone=(XYSeriesCollection)super.clone(); cannot be extracted from method
    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
    Expression1Expression2Difference
    org.jfree.data.gantt.TaskSeriesCollectionorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression clone.data cannot be unified with expression clone.data , because common superclass org.jfree.data.general.AbstractSeriesDataset does not declare member(s) private List#RAW data
    2
    clone.data = (List)ObjectUtilities.deepClone(this.data);
                                                                                                                                                            
    3
    clone.intervalDelegate = (IntervalXYDelegate)this.intervalDelegate.clone();
    Preondition Violations
    Unmatched statement clone.intervalDelegate=(IntervalXYDelegate)this.intervalDelegate.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3
    clone.intervalDelegate = (IntervalXYDelegate)this.intervalDelegate.clone();
    3
    clone.keys = new java.util.ArrayList(this.keys);
    3
    clone.keys = new java.util.ArrayList(this.keys);
    Preondition Violations
    Unmatched statement clone.keys=new java.util.ArrayList(this.keys); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                      
    4
    return clone;
    4
    return clone;
    4
    return clone;
    Differences
    Expression1Expression2Difference
    org.jfree.data.gantt.TaskSeriesCollectionorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    4
    return clone;
    Precondition Violations (5)
    Row Violation
    1Super method call TaskSeriesCollection clone=(TaskSeriesCollection)super.clone(); cannot be extracted from method
    2Super method call XYSeriesCollection clone=(XYSeriesCollection)super.clone(); cannot be extracted from method
    3Expression clone.data cannot be unified with expression clone.data , because common superclass org.jfree.data.general.AbstractSeriesDataset does not declare member(s) private List#RAW data
    4Unmatched statement clone.intervalDelegate=(IntervalXYDelegate)this.intervalDelegate.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5Unmatched statement clone.keys=new java.util.ArrayList(this.keys); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted