if (getItemShapeFilled(row, column)) { if (this.useFillPaint) { g2.setPaint(getItemFillPaint(row, column)); } else { g2.setPaint(getItemPaint(row, column)); } g2.fill(shape); }
if (this.useOutlinePaint) { g2.setPaint(getItemOutlinePaint(row, column)); } else { g2.setPaint(getItemPaint(row, column)); } g2.setStroke(getItemOutlineStroke(row, column)); g2.draw(shape);
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/chart/renderer/category/ScatterRenderer.java
Method name: void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int) Method name: void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (getItemShapeFilled(row, column)) {
2
                    if (this.useFillPaint) {
1
if (this.useOutlinePaint) {
3
                        g2.setPaint(getItemFillPaint(row, column));
2
                    g2.setPaint(getItemOutlinePaint(row, column));
4
                    }
3
                }
5
                    else {
4
                else {
6
                        g2.setPaint(getItemPaint(row, column));
5
                    g2.setPaint(getItemPaint(row, column));
7
                    }
6
                
8
    
7
}
9
                g2.fill(shape);
8
                g2.setStroke(getItemOutlineStroke(row, column));
10
                }
9
                g2.draw(shape);
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.3
Clones locationClones are in different classes having the same super class
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.6
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    41
    if (this.useFillPaint)
    41
    if (this.useFillPaint)
    28
    if (this.useOutlinePaint)
    Differences
    Expression1Expression2Difference
    useFillPaintuseOutlinePaintVARIABLE_NAME_MISMATCH
    28
    if (this.useOutlinePaint)
    42
    g2.setPaint(getItemFillPaint(row, column));
    42
    g2.setPaint(getItemFillPaint(row, column));
    29
    g2.setPaint(getItemOutlinePaint(row, column));
    Differences
    Expression1Expression2Difference
    getItemFillPaintgetItemOutlinePaintMETHOD_INVOCATION_NAME_MISMATCH
    29
    g2.setPaint(getItemOutlinePaint(row, column));
    else
    else
    43
    g2.setPaint(getItemPaint(row, column));
    30
    g2.setPaint(getItemPaint(row, column));
                                                                                                          
    31
    g2.setStroke(getItemOutlineStroke(row, column));
    44
    g2.fill(shape);
    44
    g2.fill(shape);
    32
    g2.draw(shape);
    Differences
    Expression1Expression2Difference
    filldrawMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression g2.fill(shape) is a void method call, and thus it cannot be parameterized
    Expression g2.draw(shape) is a void method call, and thus it cannot be parameterized
    32
    g2.draw(shape);
    Precondition Violations (2)
    Row Violation
    1Expression g2.fill(shape) is a void method call, and thus it cannot be parameterized
    2Expression g2.draw(shape) is a void method call, and thus it cannot be parameterized