if (orientation == PlotOrientation.HORIZONTAL) { line = new Line2D.Double(v, dataArea.getMinY(), v, dataArea.getMaxY()); } else if (orientation == PlotOrientation.VERTICAL) { line = new Line2D.Double(dataArea.getMinX(), v, dataArea.getMaxX(), v); }
if (orientation == PlotOrientation.HORIZONTAL) { line = new Line2D.Double(v, dataArea.getMinY(), v, dataArea.getMaxY()); } else if (orientation == PlotOrientation.VERTICAL) { line = new Line2D.Double(dataArea.getMinX(), v, dataArea.getMaxX(), v); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java
Method name: void drawRangeGridline(Graphics2D, CategoryPlot, ValueAxis, Rectangle2D, double) Method name: void drawRangeMarker(Graphics2D, XYPlot, ValueAxis, Marker, Rectangle2D)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (orientation == PlotOrientation.HORIZONTAL) {
1
if (orientation == PlotOrientation.HORIZONTAL) {
2
            line = new Line2D.Double(v, dataArea.getMinY(), v,
2
                line = new Line2D.Double(v, dataArea.getMinY(), v,
3
                    dataArea.getMaxY());
3
                        dataArea.getMaxY());
4
        }
4
            }
5
        else if (orientation == PlotOrientation.VERTICAL) {
5
            else if (orientation == PlotOrientation.VERTICAL) {
6
            line = new Line2D.Double(dataArea.getMinX(), v,
6
                line = new Line2D.Double(dataArea.getMinX(), v,
7
                    dataArea.getMaxX(), v);
7
                        dataArea.getMaxX(), v);
8
        }
8
            }
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.4
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)1.1
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    7
    if (orientation == PlotOrientation.HORIZONTAL)
    10
    if (orientation == PlotOrientation.HORIZONTAL)
    8
    line = new Line2D.Double(v, dataArea.getMinY(), v, dataArea.getMaxY());
    11
    line = new Line2D.Double(v, dataArea.getMinY(), v, dataArea.getMaxY());
    9
    else if (orientation == PlotOrientation.VERTICAL)
    12
    else if (orientation == PlotOrientation.VERTICAL)
    10
    line = new Line2D.Double(dataArea.getMinX(), v, dataArea.getMaxX(), v);
    13
    line = new Line2D.Double(dataArea.getMinX(), v, dataArea.getMaxX(), v);
    Precondition Violations (0)
    Row Violation