if (orientation == PlotOrientation.VERTICAL) { left.moveTo(transX1, transStack1); left.lineTo(transX1, transY1); left.lineTo(transXLeft, transStackLeft); } else { left.moveTo(transStack1, transX1); left.lineTo(transY1, transX1); left.lineTo(transStackLeft, transXLeft); }
if (orientation == PlotOrientation.VERTICAL) { left.moveTo(transX1, transStack1); left.lineTo(transX1, transY1); left.lineTo(transXLeft, transStackLeft); } else { left.moveTo(transStack1, transX1); left.lineTo(transY1, transX1); left.lineTo(transStackLeft, transXLeft); } left.closePath();
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StackedXYAreaRenderer2.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StackedXYAreaRenderer2.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: 7 Number of AST nodes: 8
1
if (orientation == PlotOrientation.VERTICAL) {
1
if (orientation == PlotOrientation.VERTICAL) {
2
                    left.moveTo(transX1, transStack1);
2
                    left.moveTo(transX1, transStack1);
3
                    left.lineTo(transX1, transY1);
3
                    left.lineTo(transX1, transY1);
4
                    left.lineTo(transXLeft, transStackLeft);
4
                    left.lineTo(transXLeft, transStackLeft);
5
            	}
5
            	}
6
            	else {
6
            	else {
7
                    left.moveTo(transStack1, transX1);
7
                    left.moveTo(transStack1, transX1);
8
                    left.lineTo(transY1, transX1);
8
                    left.lineTo(transY1, transX1);
9
                    left.lineTo(transStackLeft, transXLeft);
9
                    left.lineTo(transStackLeft, transXLeft);
10
            	}
10
            	}
11
                left.closePath();
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.2
Clones locationClones are in the same method
Number of node comparisons49
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)5.2
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    92
    if (orientation == PlotOrientation.VERTICAL)
    58
    if (orientation == PlotOrientation.VERTICAL)
    93
    left.moveTo(transX1, transStack1);
    59
    left.moveTo(transX1, transStack1);
    94
    left.lineTo(transX1, transY1);
    60
    left.lineTo(transX1, transY1);
    95
    left.lineTo(transXLeft, transStackLeft);
    61
    left.lineTo(transXLeft, transStackLeft);
    else
    else
    96
    left.moveTo(transStack1, transX1);
    62
    left.moveTo(transStack1, transX1);
    97
    left.lineTo(transY1, transX1);
    63
    left.lineTo(transY1, transX1);
    98
    left.lineTo(transStackLeft, transXLeft);
    64
    left.lineTo(transStackLeft, transXLeft);
                                              
    65
    left.closePath();
    Preondition Violations
    Unmatched statement left.closePath(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    65
    left.closePath();
    Precondition Violations (1)
    Row Violation
    1Unmatched statement left.closePath(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted