TimeTableXYDataset clone = (TimeTableXYDataset) super.clone(); clone.values = (DefaultKeyedValues2D) this.values.clone(); clone.workingCalendar = (Calendar) this.workingCalendar.clone(); 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/time/TimeTableXYDataset.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
TimeTableXYDataset clone = (TimeTableXYDataset) super.clone();
2
        clone.values = (DefaultKeyedValues2D) this.values.clone(
1
XYSeriesCollection clone = (XYSeriesCollection) super.clone();
3
);
2
        clone.data = (List) ObjectUtilities.deepClone(this.data);
4
        clone.workingCalendar = (Calendar) this.workingCalendar
3
        clone.intervalDelegate
5
.clone();
4
                = (IntervalXYDelegate) this.intervalDelegate.clone();
6
        return clone;
5
        return clone;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
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. {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
    TimeTableXYDataset clone = (TimeTableXYDataset)super.clone();
    1
    TimeTableXYDataset clone = (TimeTableXYDataset)super.clone();
    1
    XYSeriesCollection clone = (XYSeriesCollection)super.clone();
    Differences
    Expression1Expression2Difference
    org.jfree.data.time.TimeTableXYDatasetorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    org.jfree.data.time.TimeTableXYDatasetorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    org.jfree.data.time.TimeTableXYDatasetorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Super method call TimeTableXYDataset clone=(TimeTableXYDataset)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);
    Preondition Violations
    Unmatched statement clone.data=(List)ObjectUtilities.deepClone(this.data); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2
    clone.data = (List)ObjectUtilities.deepClone(this.data);
    2
    clone.values = (DefaultKeyedValues2D)this.values.clone();
    2
    clone.values = (DefaultKeyedValues2D)this.values.clone();
    3
    clone.intervalDelegate = (IntervalXYDelegate)this.intervalDelegate.clone();
    Differences
    Expression1Expression2Difference
    org.jfree.data.time.TimeTableXYDatasetorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    valuesintervalDelegateVARIABLE_NAME_MISMATCH
    org.jfree.data.DefaultKeyedValues2Dorg.jfree.data.xy.IntervalXYDelegateSUBCLASS_TYPE_MISMATCH
    org.jfree.data.DefaultKeyedValues2Dorg.jfree.data.xy.IntervalXYDelegateSUBCLASS_TYPE_MISMATCH
    valuesintervalDelegateVARIABLE_NAME_MISMATCH
    org.jfree.data.DefaultKeyedValues2Dorg.jfree.data.xy.IntervalXYDelegateSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression clone.values cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression clone.intervalDelegate cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression clone.values is a field being modified, and thus it cannot be parameterized
    Expression clone.intervalDelegate is a field being modified, and thus it cannot be parameterized
    3
    clone.intervalDelegate = (IntervalXYDelegate)this.intervalDelegate.clone();
    3
    clone.workingCalendar = (Calendar)this.workingCalendar.clone();
    3
    clone.workingCalendar = (Calendar)this.workingCalendar.clone();
    Preondition Violations
    Unmatched statement clone.workingCalendar=(Calendar)this.workingCalendar.clone(); 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.time.TimeTableXYDatasetorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    4
    return clone;
    Precondition Violations (8)
    Row Violation
    1Super method call TimeTableXYDataset clone=(TimeTableXYDataset)super.clone(); cannot be extracted from method
    2Super method call XYSeriesCollection clone=(XYSeriesCollection)super.clone(); cannot be extracted from method
    3Unmatched statement clone.data=(List)ObjectUtilities.deepClone(this.data); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Expression clone.values cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression clone.intervalDelegate cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression clone.values is a field being modified, and thus it cannot be parameterized
    7Expression clone.intervalDelegate is a field being modified, and thus it cannot be parameterized
    8Unmatched statement clone.workingCalendar=(Calendar)this.workingCalendar.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted