LineAndShapeRenderer clone = (LineAndShapeRenderer) super.clone(); clone.seriesLinesVisible = (BooleanList) this.seriesLinesVisible.clone(); clone.seriesShapesVisible = (BooleanList) this.seriesShapesVisible.clone(); clone.seriesShapesFilled = (BooleanList) this.seriesShapesFilled.clone(); return clone;
DefaultKeyedValues clone = (DefaultKeyedValues) super.clone(); clone.keys = (ArrayList) this.keys.clone(); clone.values = (ArrayList) this.values.clone(); clone.indexMap = (HashMap) this.indexMap.clone(); return clone;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/LineAndShapeRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/data/DefaultKeyedValues.java
Method name: Object clone() Method name: Object clone()
Number of AST nodes: 5 Number of AST nodes: 5
1
LineAndShapeRenderer clone = (LineAndShapeRenderer) super.clone();
2
        clone.seriesLinesVisible
3
            = (BooleanList) this.seriesLinesVisible.clone();
4
        clone.seriesShapesVisible
5
            = (BooleanList) this.seriesShapesVisible.clone();
6
        clone.seriesShapesFilled
7
            = (BooleanList) this.seriesShapesFilled
1
DefaultKeyedValues clone = (DefaultKeyedValues) super.clone();
2
        clone.keys = (ArrayList) this.keys.clone();
3
        clone.values = (ArrayList) this.values.clone();
8
.clone();
4
        clone.indexMap = (HashMap) this.indexMap.clone();
9
        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
Number of node comparisons23
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    LineAndShapeRenderer clone = (LineAndShapeRenderer)super.clone();
    1
    LineAndShapeRenderer clone = (LineAndShapeRenderer)super.clone();
    1
    DefaultKeyedValues clone = (DefaultKeyedValues)super.clone();
    Differences
    Expression1Expression2Difference
    org.jfree.chart.renderer.category.LineAndShapeRendererorg.jfree.data.DefaultKeyedValuesSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.renderer.category.LineAndShapeRendererorg.jfree.data.DefaultKeyedValuesSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.renderer.category.LineAndShapeRendererorg.jfree.data.DefaultKeyedValuesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Super method call LineAndShapeRenderer clone=(LineAndShapeRenderer)super.clone(); cannot be extracted from method
    Super method call DefaultKeyedValues clone=(DefaultKeyedValues)super.clone(); cannot be extracted from method
    1
    DefaultKeyedValues clone = (DefaultKeyedValues)super.clone();
                                                                                          
    2
    clone.keys = (ArrayList)this.keys.clone();
    Preondition Violations
    Unmatched statement clone.keys=(ArrayList)this.keys.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2
    clone.keys = (ArrayList)this.keys.clone();
    2
    clone.seriesLinesVisible = (BooleanList)this.seriesLinesVisible.clone();
    2
    clone.seriesLinesVisible = (BooleanList)this.seriesLinesVisible.clone();
    Preondition Violations
    Unmatched statement clone.seriesLinesVisible=(BooleanList)this.seriesLinesVisible.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                                      
                                                                                                  
    3
    clone.values = (ArrayList)this.values.clone();
    Preondition Violations
    Unmatched statement clone.values=(ArrayList)this.values.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3
    clone.values = (ArrayList)this.values.clone();
    3
    clone.seriesShapesVisible = (BooleanList)this.seriesShapesVisible.clone();
    3
    clone.seriesShapesVisible = (BooleanList)this.seriesShapesVisible.clone();
    Preondition Violations
    Unmatched statement clone.seriesShapesVisible=(BooleanList)this.seriesShapesVisible.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                                          
                                                                                                      
    4
    clone.indexMap = (HashMap)this.indexMap.clone();
    Preondition Violations
    Unmatched statement clone.indexMap=(HashMap)this.indexMap.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4
    clone.indexMap = (HashMap)this.indexMap.clone();
    4
    clone.seriesShapesFilled = (BooleanList)this.seriesShapesFilled.clone();
    4
    clone.seriesShapesFilled = (BooleanList)this.seriesShapesFilled.clone();
    Preondition Violations
    Unmatched statement clone.seriesShapesFilled=(BooleanList)this.seriesShapesFilled.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                                      
    5
    return clone;
    5
    return clone;
    5
    return clone;
    Differences
    Expression1Expression2Difference
    org.jfree.chart.renderer.category.LineAndShapeRendererorg.jfree.data.DefaultKeyedValuesSUBCLASS_TYPE_MISMATCH
    5
    return clone;
    Precondition Violations (8)
    Row Violation
    1Super method call LineAndShapeRenderer clone=(LineAndShapeRenderer)super.clone(); cannot be extracted from method
    2Super method call DefaultKeyedValues clone=(DefaultKeyedValues)super.clone(); cannot be extracted from method
    3Unmatched statement clone.keys=(ArrayList)this.keys.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement clone.seriesLinesVisible=(BooleanList)this.seriesLinesVisible.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5Unmatched statement clone.values=(ArrayList)this.values.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Unmatched statement clone.seriesShapesVisible=(BooleanList)this.seriesShapesVisible.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    7Unmatched statement clone.indexMap=(HashMap)this.indexMap.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8Unmatched statement clone.seriesShapesFilled=(BooleanList)this.seriesShapesFilled.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted