if (orientation == PlotOrientation.VERTICAL) {
// clip top and bottom bounds to data area
low = Math.max(low, dataArea.getMinY());
high = Math.min(high, dataArea.getMaxY());
rect = new Rectangle2D.Double(dataArea.getMinX(),
low, dataArea.getWidth(),
high - low);
}
if (orientation == PlotOrientation.VERTICAL) {
// clip top and bottom bounds to data area
low = Math.max(low, dataArea.getMinY());
high = Math.min(high, dataArea.getMaxY());
rect = new Rectangle2D.Double(dataArea.getMinX(),
low, dataArea.getWidth(),
high - low);
}
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/xy/AbstractXYItemRenderer.java
|
Method name: void drawRangeMarker(Graphics2D, CategoryPlot, ValueAxis, Marker, Rectangle2D)
|
|
Method name: void drawRangeMarker(Graphics2D, XYPlot, ValueAxis, Marker, Rectangle2D)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (orientation == PlotOrientation.VERTICAL) {↵ | | 1 | if (orientation == PlotOrientation.VERTICAL) {↵
|
2 | // clip top and bottom bounds to data area↵ | | 2 | // clip top and bottom bounds to data area↵
|
3 | low = Math.max(low, dataArea.getMinY());↵ | | 3 | low = Math.max(low, dataArea.getMinY());↵
|
4 | high = Math.min(high, dataArea.getMaxY());↵ | | 4 | high = Math.min(high, dataArea.getMaxY());↵
|
5 | rect = new Rectangle2D.Double(dataArea.getMinX(),↵ | | 5 | rect = new Rectangle2D.Double(dataArea.getMinX(),↵
|
6 | low, dataArea.getWidth(),↵ | | 6 | low, dataArea.getWidth(),↵
|
7 | high - low);↵ | | 7 | high - low);↵
|
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 17 |
-
{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) | 9.7 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
47 | else if (orientation == PlotOrientation.VERTICAL) | | 45 | else if (orientation == PlotOrientation.VERTICAL) |
48 | low = Math.max(low, dataArea.getMinY()); | | 46 | low = Math.max(low, dataArea.getMinY()); |
49 | high = Math.min(high, dataArea.getMaxY()); | | 47 | high = Math.min(high, dataArea.getMaxY()); |
50 | rect = new Rectangle2D.Double(dataArea.getMinX(), low, dataArea.getWidth(), high - low); | | 48 | rect = new Rectangle2D.Double(dataArea.getMinX(), low, dataArea.getWidth(), high - low); |
Precondition Violations (0)
Row |
Violation |