if (orientation == PlotOrientation.HORIZONTAL) {
state.workingLine.setLine(transY0, transX0, transY1, transX1);
}
else if (orientation == PlotOrientation.VERTICAL) {
state.workingLine.setLine(transX0, transY0, transX1, transY1);
}
if (orientation == PlotOrientation.HORIZONTAL) {
state.workingLine.setLine(transY0, transX0, transY1, transX1);
}
else if (orientation == PlotOrientation.VERTICAL) {
state.workingLine.setLine(transX0, transY0, transX1, transY1);
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/experimental/org/jfree/experimental/chart/renderer/xy/XYSmoothLineAndShapeRenderer.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYLineAndShapeRenderer.java
|
Method name: void drawPrimaryLine(XYItemRendererState, Graphics2D, XYPlot, XYDataset, int, int, int, ValueAxis, ValueAxis, Rectangle2D)
|
|
Method name: void drawPrimaryLine(XYItemRendererState, Graphics2D, XYPlot, XYDataset, int, int, int, ValueAxis, ValueAxis, Rectangle2D)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | | 1 | if (orientation == PlotOrientation.HORIZONTAL) {
↵
|
2 | state.workingLine.setLine(transY0, transX0, transY1, transX1);↵ | | 2 | state.workingLine.setLine(transY0, transX0, transY1, transX1);
↵
|
3 | }↵ | | 3 | }
↵
|
4 | else if (orientation == PlotOrientation.VERTICAL) {↵ | | 4 | else if (orientation == PlotOrientation.VERTICAL) {
↵
|
5 | state.workingLine.setLine(transX0, transY0, transX1, transY1);↵ | | 5 | state.workingLine.setLine(transX0, transY0, transX1, transY1);
↵
|
6 | } | | 6 | }
|
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 13 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 6.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
43 | if (orientation == PlotOrientation.HORIZONTAL) | | 20 | if (orientation == PlotOrientation.HORIZONTAL) |
44 | state.workingLine.setLine(transY0, transX0, transY1, transX1); | | 21 | state.workingLine.setLine(transY0, transX0, transY1, transX1); |
45 | else if (orientation == PlotOrientation.VERTICAL) | | 22 | else if (orientation == PlotOrientation.VERTICAL) |
46 | state.workingLine.setLine(transX0, transY0, transX1, transY1); | | 23 | state.workingLine.setLine(transX0, transY0, transX1, transY1); |
Precondition Violations (0)
Row |
Violation |