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 fillDomainGridBand(Graphics2D, XYPlot, ValueAxis, Rectangle2D, double, double)
|
Method name: void fillRangeGridBand(Graphics2D, XYPlot, ValueAxis, Rectangle2D, double, double)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (plot.getOrientation() == PlotOrientation.VERTICAL) {↵ | 1 | if (plot.getOrientation() == PlotOrientation.VERTICAL) {↵ | |
2 | band = new Rectangle2D.Double(Math.min(x1, x2), dataArea.getMinY(),↵ | 2 | band = new Rectangle2D.Double(dataArea.getMinX(), Math.min(y1, y2),↵ | |
3 | Math.abs(x2 - x1), dataArea.getWidth());↵ | 3 | dataArea.getWidth(), Math.abs(y2 - y1));↵ | |
4 | }↵ | 4 | }↵ | |
5 | else {↵ | 5 | else {↵ | |
6 | band = new Rectangle2D.Double(dataArea.getMinX(), Math.min(x1, x2),↵ | 6 | band = new Rectangle2D.Double(Math.min(y1, y2), dataArea.getMinY(),↵ | |
7 | dataArea.getWidth(), Math.abs(x2 - x1));↵ | 7 | Math.abs(y2 - y1), dataArea.getHeight());↵ | |
8 | } | 8 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
4 | if (plot.getOrientation() == PlotOrientation.VERTICAL) | 4 | if (plot.getOrientation() == PlotOrientation.VERTICAL) | ||||
|
| 5 | band = new Rectangle2D.Double(dataArea.getMinX(), Math.min(y1, y2), dataArea.getWidth(), Math.abs(y2 - y1)); | ||||
5 | band = new Rectangle2D.Double(Math.min(x1, x2), dataArea.getMinY(), Math.abs(x2 - x1), dataArea.getWidth()); |
| | ||||
else | | ||||||
|
| 6 | band = new Rectangle2D.Double(Math.min(y1, y2), dataArea.getMinY(), Math.abs(y2 - y1), dataArea.getHeight()); | ||||
6 | band = new Rectangle2D.Double(dataArea.getMinX(), Math.min(x1, x2), dataArea.getWidth(), Math.abs(x2 - x1)); |
| |
Row | Violation |
---|---|
1 | Unmatched statement band=new Rectangle2D.Double(Math.min(x1,x2),dataArea.getMinY(),Math.abs(x2 - x1),dataArea.getWidth()); cannot be moved, because it updates a variable modified in other unmapped statements |
2 | Unmatched statement band=new Rectangle2D.Double(dataArea.getMinX(),Math.min(x1,x2),dataArea.getWidth(),Math.abs(x2 - x1)); cannot be moved, because it updates a variable modified in other unmapped statements |
3 | Unmatched statement band=new Rectangle2D.Double(dataArea.getMinX(),Math.min(y1,y2),dataArea.getWidth(),Math.abs(y2 - y1)); cannot be moved, because it updates a variable modified in other unmapped statements |
4 | Unmatched statement band=new Rectangle2D.Double(Math.min(y1,y2),dataArea.getMinY(),Math.abs(y2 - y1),dataArea.getHeight()); cannot be moved, because it updates a variable modified in other unmapped statements |