if (orientation == PlotOrientation.HORIZONTAL) { line = new Line2D.Double(y0, x0, y1, x1); } else if (orientation == PlotOrientation.VERTICAL) { line = new Line2D.Double(x0, y0, x1, y1); }
if (PlotOrientation.HORIZONTAL == l_orientation) { l_line = new Line2D.Double(l_y1, l_x1, l_y2, l_x2); } else if (PlotOrientation.VERTICAL == l_orientation) { l_line = new Line2D.Double(l_x1, l_y1, l_x2, l_y2); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StatisticalLineAndShapeRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYDifferenceRenderer.java
Method name: void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int) Method name: void drawItemPass1(Graphics2D, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (orientation == PlotOrientation.HORIZONTAL) {
1
if (PlotOrientation
2
        
2
.HORIZONTAL == l_orientation) {
3
                line = new Line2D.Double(y0, x0, y1, x1);
3
            l_line = new Line2D.Double(
4
                    }
5
            
4
l_y1, l_x1, l_y2, l_x2);
5
        }
6
        else if (orientation == PlotOrientation.VERTICAL) {
6
        else if (PlotOrientation.VERTICAL == l_orientation) {
7
                        line = new Line2D.Double(x0, y0, x1, y1);
7
            l_line = new Line2D.Double(
8
            
8
l_x1, l_y1, l_x2, l_y2);
9
        }
9
        }
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.5
Clones locationClones are in different classes having the same super class
Number of node comparisons13
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)10.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    42
    if (orientation == PlotOrientation.HORIZONTAL)
    42
    if (orientation == PlotOrientation.HORIZONTAL)
    48
    if (PlotOrientation.HORIZONTAL == l_orientation)
    Differences
    Expression1Expression2Difference
    orientationPlotOrientation.HORIZONTALTYPE_COMPATIBLE_REPLACEMENT
    PlotOrientation.HORIZONTALl_orientationTYPE_COMPATIBLE_REPLACEMENT
    48
    if (PlotOrientation.HORIZONTAL == l_orientation)
    43
    line = new Line2D.Double(y0, x0, y1, x1);
    43
    line = new Line2D.Double(y0, x0, y1, x1);
    49
    l_line = new Line2D.Double(l_y1, l_x1, l_y2, l_x2);
    Differences
    Expression1Expression2Difference
    linel_lineVARIABLE_NAME_MISMATCH
    y0l_y1VARIABLE_NAME_MISMATCH
    x0l_x1VARIABLE_NAME_MISMATCH
    y1l_y2VARIABLE_NAME_MISMATCH
    x1l_x2VARIABLE_NAME_MISMATCH
    49
    l_line = new Line2D.Double(l_y1, l_x1, l_y2, l_x2);
    44
    else if (orientation == PlotOrientation.VERTICAL)
    44
    else if (orientation == PlotOrientation.VERTICAL)
    50
    else if (PlotOrientation.VERTICAL == l_orientation)
    Differences
    Expression1Expression2Difference
    orientationPlotOrientation.VERTICALTYPE_COMPATIBLE_REPLACEMENT
    PlotOrientation.VERTICALl_orientationTYPE_COMPATIBLE_REPLACEMENT
    50
    else if (PlotOrientation.VERTICAL == l_orientation)
    45
    line = new Line2D.Double(x0, y0, x1, y1);
    45
    line = new Line2D.Double(x0, y0, x1, y1);
    51
    l_line = new Line2D.Double(l_x1, l_y1, l_x2, l_y2);
    Differences
    Expression1Expression2Difference
    linel_lineVARIABLE_NAME_MISMATCH
    x0l_x1VARIABLE_NAME_MISMATCH
    y0l_y1VARIABLE_NAME_MISMATCH
    x1l_x2VARIABLE_NAME_MISMATCH
    y1l_y2VARIABLE_NAME_MISMATCH
    51
    l_line = new Line2D.Double(l_x1, l_y1, l_x2, l_y2);
    Precondition Violations (0)
    Row Violation