if (orientation == PlotOrientation.HORIZONTAL) {
line = new Line2D.Double(dataArea.getMinX(), v,
dataArea.getMaxX(), v);
}
else if (orientation == PlotOrientation.VERTICAL) {
line = new Line2D.Double(v, dataArea.getMinY(), v,
dataArea.getMaxY());
}
if (orientation == PlotOrientation.HORIZONTAL) {
line = new Line2D.Double(dataArea.getMinX(), v, dataArea.getMaxX(),
v);
}
else if (orientation == PlotOrientation.VERTICAL) {
line = new Line2D.Double(v, dataArea.getMinY(), v,
dataArea.getMaxY());
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java
|
Method name: void drawDomainGridLine(Graphics2D, XYPlot, ValueAxis, Rectangle2D, double)
|
|
Method name: void drawDomainLine(Graphics2D, XYPlot, ValueAxis, Rectangle2D, double, Paint, Stroke)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | | 1 | if (orientation == PlotOrientation.HORIZONTAL) {↵
|
2 | line = new Line2D.Double(dataArea.getMinX(), v,↵ | | 2 | line = new Line2D.Double(dataArea.getMinX(), v, dataArea.getMaxX(),↵
|
3 | dataArea.getMaxX(), v);↵ | | 3 | v);↵
|
4 | }↵ | | 4 | }↵
|
5 | else if (orientation == PlotOrientation.VERTICAL) {↵ | | 5 | else if (orientation == PlotOrientation.VERTICAL) {↵
|
6 | line = new Line2D.Double(v, dataArea.getMinY(), v,↵ | | 6 | line = new Line2D.Double(v, dataArea.getMinY(), v,↵
|
7 | dataArea.getMaxY());↵ | | 7 | dataArea.getMaxY());↵
|
8 | } | | 8 | }
|
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 declared in the same 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) | 3.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
7 | if (orientation == PlotOrientation.HORIZONTAL) | | 7 | if (orientation == PlotOrientation.HORIZONTAL) |
8 | line = new Line2D.Double(dataArea.getMinX(), v, dataArea.getMaxX(), v); | | 8 | line = new Line2D.Double(dataArea.getMinX(), v, dataArea.getMaxX(), v); |
9 | else if (orientation == PlotOrientation.VERTICAL) | | 9 | else if (orientation == PlotOrientation.VERTICAL) |
10 | line = new Line2D.Double(v, dataArea.getMinY(), v, dataArea.getMaxY()); | | 10 | line = new Line2D.Double(v, dataArea.getMinY(), v, dataArea.getMaxY()); |
Precondition Violations (0)
Row |
Violation |