if (orientation == PlotOrientation.VERTICAL) { areaState.getSeriesArea().addPoint((int) transX1, (int) transY2); } else if (orientation == PlotOrientation.HORIZONTAL) { areaState.getSeriesArea().addPoint((int) transY2, (int) transX1); }
if (plot.getOrientation() == PlotOrientation.VERTICAL) { areaState.area.addPoint((int) transX1, (int) zero); } else if (plot.getOrientation() == PlotOrientation.HORIZONTAL) { areaState.area.addPoint((int) zero, (int) transX1); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StackedXYAreaRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYAreaRenderer.java
Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int) Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (orientation == PlotOrientation.VERTICAL) {
1
if (plot.getOrientation() == PlotOrientation.VERTICAL) {
2
                    areaState.getSeriesArea().addPoint((int) transX1,
2
                areaState.area.addPoint((int) transX1,
3
                            (int) transY2);
3
 (int) zero);
4
                }
4
            }
5
                else if (orientation == PlotOrientation.HORIZONTAL) {
5
            else if (plot.getOrientation() == PlotOrientation.HORIZONTAL) {
6
                    areaState.getSeriesArea().addPoint((int) transY2,
6
                areaState.area.addPoint((int) 
7
                            (int) transX1);
7
zero, (int) transX1);
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.6
Clones locationClones are in different classes having the same super class
Number of node comparisons14
  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)46.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    22
    if (orientation == PlotOrientation.VERTICAL)
    22
    if (orientation == PlotOrientation.VERTICAL)
    41
    if (plot.getOrientation() == PlotOrientation.VERTICAL)
    Differences
    Expression1Expression2Difference
    orientationplot.getOrientation()TYPE_COMPATIBLE_REPLACEMENT
    41
    if (plot.getOrientation() == PlotOrientation.VERTICAL)
    23
    areaState.getSeriesArea().addPoint((int)transX1, (int)transY2);
    23
    areaState.getSeriesArea().addPoint((int)transX1, (int)transY2);
    42
    areaState.area.addPoint((int)transX1, (int)zero);
    Differences
    Expression1Expression2Difference
    transY2zeroVARIABLE_NAME_MISMATCH
    areaState.getSeriesArea()areaState.areaTYPE_COMPATIBLE_REPLACEMENT
    42
    areaState.area.addPoint((int)transX1, (int)zero);
    24
    else if (orientation == PlotOrientation.HORIZONTAL)
    24
    else if (orientation == PlotOrientation.HORIZONTAL)
    43
    else if (plot.getOrientation() == PlotOrientation.HORIZONTAL)
    Differences
    Expression1Expression2Difference
    orientationplot.getOrientation()TYPE_COMPATIBLE_REPLACEMENT
    43
    else if (plot.getOrientation() == PlotOrientation.HORIZONTAL)
    25
    areaState.getSeriesArea().addPoint((int)transY2, (int)transX1);
    25
    areaState.getSeriesArea().addPoint((int)transY2, (int)transX1);
    44
    areaState.area.addPoint((int)zero, (int)transX1);
    Differences
    Expression1Expression2Difference
    transY2zeroVARIABLE_NAME_MISMATCH
    areaState.getSeriesArea()areaState.areaTYPE_COMPATIBLE_REPLACEMENT
    44
    areaState.area.addPoint((int)zero, (int)transX1);
    Precondition Violations (0)
    Row Violation