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) transY1); } else if (plot.getOrientation() == PlotOrientation.HORIZONTAL) { areaState.area.addPoint((int) transY1, (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) transY1);
4
                }
4
        
5
    
5
}
6
            else if (orientation == PlotOrientation.HORIZONTAL) {
6
        else if (plot.getOrientation() == PlotOrientation.HORIZONTAL) {
7
                    areaState.getSeriesArea().addPoint((int) transY2,
7
            areaState.area.addPoint((int) transY
8
                            (int) transX1);
8
1, (int) transX1);
9
                }
9
        }
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.6
Clones locationClones are in different classes having the same super class
Number of node comparisons13
  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 fragment0
    Time elapsed for statement mapping (ms)63.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    22
    if (orientation == PlotOrientation.VERTICAL)
    22
    if (orientation == PlotOrientation.VERTICAL)
    45
    if (plot.getOrientation() == PlotOrientation.VERTICAL)
    Differences
    Expression1Expression2Difference
    orientationplot.getOrientation()TYPE_COMPATIBLE_REPLACEMENT
    45
    if (plot.getOrientation() == PlotOrientation.VERTICAL)
    23
    areaState.getSeriesArea().addPoint((int)transX1, (int)transY2);
    23
    areaState.getSeriesArea().addPoint((int)transX1, (int)transY2);
    46
    areaState.area.addPoint((int)transX1, (int)transY1);
    Differences
    Expression1Expression2Difference
    transY2transY1VARIABLE_NAME_MISMATCH
    areaState.getSeriesArea()areaState.areaTYPE_COMPATIBLE_REPLACEMENT
    46
    areaState.area.addPoint((int)transX1, (int)transY1);
    24
    else if (orientation == PlotOrientation.HORIZONTAL)
    24
    else if (orientation == PlotOrientation.HORIZONTAL)
    47
    else if (plot.getOrientation() == PlotOrientation.HORIZONTAL)
    Differences
    Expression1Expression2Difference
    orientationplot.getOrientation()TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression plot.getOrientation() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    47
    else if (plot.getOrientation() == PlotOrientation.HORIZONTAL)
    25
    areaState.getSeriesArea().addPoint((int)transY2, (int)transX1);
    25
    areaState.getSeriesArea().addPoint((int)transY2, (int)transX1);
    48
    areaState.area.addPoint((int)transY1, (int)transX1);
    Differences
    Expression1Expression2Difference
    transY2transY1VARIABLE_NAME_MISMATCH
    areaState.getSeriesArea()areaState.areaTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression areaState.area cannot be parameterized, because it has dependencies to/from statements that will be extracted
    48
    areaState.area.addPoint((int)transY1, (int)transX1);
    Precondition Violations (2)
    Row Violation
    1Expression plot.getOrientation() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression areaState.area cannot be parameterized, because it has dependencies to/from statements that will be extracted