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(v, dataArea.getMinY(), v,
dataArea.getMaxY());
}
else if (orientation == PlotOrientation.VERTICAL) {
line = new Line2D.Double(dataArea.getMinX(), v,
dataArea.getMaxX(), v);
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java
|
Method name: void drawDomainMarker(Graphics2D, CategoryPlot, CategoryAxis, CategoryMarker, Rectangle2D)
|
|
Method name: void drawRangeMarker(Graphics2D, CategoryPlot, ValueAxis, Marker, Rectangle2D)
|
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(v, dataArea.getMinY(), v,↵
|
3 | dataArea.getMaxX(), v);↵ | | 3 | dataArea.getMaxY());↵
|
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(dataArea.getMinX(), v,↵
|
7 | dataArea.getMaxY());↵ | | 7 | dataArea.getMaxX(), v);↵
|
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 | 14 |
-
{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) | 1.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
13 | if (orientation == PlotOrientation.HORIZONTAL) | | 14 | if (orientation == PlotOrientation.VERTICAL) |
14 | line = new Line2D.Double(dataArea.getMinX(), v, dataArea.getMaxX(), v); | | 15 | line = new Line2D.Double(dataArea.getMinX(), v, dataArea.getMaxX(), v); |
15 | else if (orientation == PlotOrientation.VERTICAL) | | 12 | else if (orientation == PlotOrientation.HORIZONTAL) |
16 | line = new Line2D.Double(v, dataArea.getMinY(), v, dataArea.getMaxY()); | | 13 | line = new Line2D.Double(v, dataArea.getMinY(), v, dataArea.getMaxY()); |
Precondition Violations (0)
Row |
Violation |