if (orientation == PlotOrientation.VERTICAL) {
left.moveTo(transX1, transY1);
left.lineTo(transX1, transStack1);
left.lineTo(transXLeft, transStackLeft);
left.lineTo(transXLeft, transYLeft);
}
else {
left.moveTo(transY1, transX1);
left.lineTo(transStack1, transX1);
left.lineTo(transStackLeft, transXLeft);
left.lineTo(transYLeft, transXLeft);
}
if (orientation == PlotOrientation.VERTICAL) {
left.moveTo(transX1, transY1);
left.lineTo(transX1, transStack1);
left.lineTo(transXLeft, transStackLeft);
left.lineTo(transXLeft, transYLeft);
}
else {
left.moveTo(transY1, transX1);
left.lineTo(transStack1, transX1);
left.lineTo(transStackLeft, transXLeft);
left.lineTo(transYLeft, transXLeft);
}
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: 9
|
|
Number of AST nodes: 9
|
|
1 | if (orientation == PlotOrientation.VERTICAL) {↵ | | 1 | if (orientation == PlotOrientation.VERTICAL) {↵
|
2 | left.moveTo(transX1, transY1);↵ | | 2 | left.moveTo(transX1, transY1);↵
|
3 | left.lineTo(transX1, transStack1);↵ | | 3 | left.lineTo(transX1, transStack1);↵
|
4 | left.lineTo(transXLeft, transStackLeft);↵ | | 4 | left.lineTo(transXLeft, transStackLeft);↵
|
5 | left.lineTo(transXLeft, transYLeft);↵ | | 5 | left.lineTo(transXLeft, transYLeft);↵
|
6 | }↵ | | 6 | }↵
|
7 | else {↵ | | 7 | else {↵
|
8 | left.moveTo(transY1, transX1);↵ | | 8 | left.moveTo(transY1, transX1);↵
|
9 | left.lineTo(transStack1, transX1);↵ | | 9 | left.lineTo(transStack1, transX1);↵
|
10 | left.lineTo(transStackLeft, transXLeft);↵ | | 10 | left.lineTo(transStackLeft, transXLeft);↵
|
11 | left.lineTo(transYLeft, transXLeft);↵ | | 11 | left.lineTo(transYLeft, transXLeft);↵
|
12 | } | | 12 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 81 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 38.1 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
48 | if (orientation == PlotOrientation.VERTICAL) | | 102 | if (orientation == PlotOrientation.VERTICAL) |
49 | left.moveTo(transX1, transY1); | | 103 | left.moveTo(transX1, transY1); |
50 | left.lineTo(transX1, transStack1); | | 104 | left.lineTo(transX1, transStack1); |
51 | left.lineTo(transXLeft, transStackLeft); | | 105 | left.lineTo(transXLeft, transStackLeft); |
52 | left.lineTo(transXLeft, transYLeft); | | 106 | left.lineTo(transXLeft, transYLeft); |
| | | | |
53 | left.moveTo(transY1, transX1); | | 107 | left.moveTo(transY1, transX1); |
54 | left.lineTo(transStack1, transX1); | | 108 | left.lineTo(transStack1, transX1); |
55 | left.lineTo(transStackLeft, transXLeft); | | 109 | left.lineTo(transStackLeft, transXLeft); |
56 | left.lineTo(transYLeft, transXLeft); | | 110 | left.lineTo(transYLeft, transXLeft); |
Precondition Violations (0)
Row |
Violation |