File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StandardXYItemRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYLineAndShapeRenderer.java | |||
Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
|
Method name: void drawPrimaryLineAsPath(XYItemRendererState, Graphics2D, XYPlot, XYDataset, int, int, int, ValueAxis, ValueAxis, Rectangle2D)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 12 | |||
1 | if (itemVisible && !Double.isNaN(transX1)↵ | 1 | if (!Double.isNaN(transX1)↵ | |
2 | && !Double.isNaN(transY1)) {↵ | 2 | && !Double.isNaN(transY1)) {↵ | |
3 | float x = (float) transX1;↵ | 3 | float x = (float) transX1;↵ | |
4 | float y = (float) transY1;↵ | 4 | float y = (float) transY1;↵ | |
5 | ↵ | 5 | PlotOrientation orientation = plot.getOrientation();↵ | |
6 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | 6 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | |
7 | x = (float) transY1;↵ | 7 | x = (float) transY1;↵ | |
8 | y = (float) transX1;↵ | 8 | y = (float) transX1;↵ | |
9 | }↵ | 9 | }↵ | |
10 | if (s.isLastPointGood()) {↵ | 10 | if (s.isLastPointGood()) {↵ | |
11 | // TODO: check threshold↵ | |||
12 | s.seriesPath.lineTo(x, y);↵ | 11 | s.seriesPath.lineTo(x, y);↵ | |
13 | }↵ | 12 | ↵ | |
14 | ↵ | 13 | }↵ | |
15 | else {↵ | 14 | else {↵ | |
16 | s.seriesPath.moveTo(x, y);↵ | 15 | s.seriesPath.moveTo(x, y);↵ | |
17 | }↵ | 16 | ↵ | |
18 | ↵ | 17 | }↵ | |
19 | s.setLastPointGood(true);↵ | 18 | s.setLastPointGood(true);↵ | |
20 | }↵ | 19 | ↵ | |
21 | ↵ | 20 | }↵ | |
22 | else {↵ | 21 | else {↵ | |
23 | s.setLastPointGood(false);↵ | 22 | s.setLastPointGood(false);↵ | |
24 | } | 23 |
| |
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) | 1.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 50 |
Number of mapped statements | 11 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 12.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
26 | if (itemVisible && !Double.isNaN(transX1) && !Double.isNaN(transY1)) |
| 8 | if (!Double.isNaN(transX1) && !Double.isNaN(transY1)) | ||||||||||||||||
27 | float x = (float)transX1; | 9 | float x = (float)transX1; | |||||||||||||||||
28 | float y = (float)transY1; | 10 | float y = (float)transY1; | |||||||||||||||||
| 11 | PlotOrientation orientation = plot.getOrientation(); | ||||||||||||||||||
29 | if (orientation == PlotOrientation.HORIZONTAL) | 12 | if (orientation == PlotOrientation.HORIZONTAL) | |||||||||||||||||
30 | x = (float)transY1; | 13 | x = (float)transY1; | |||||||||||||||||
31 | y = (float)transX1; | 14 | y = (float)transX1; | |||||||||||||||||
32 | if (s.isLastPointGood()) |
| 15 | if (s.isLastPointGood()) | ||||||||||||||||
33 | s.seriesPath.lineTo(x, y); |
| 16 | s.seriesPath.lineTo(x, y); | ||||||||||||||||
else | else | |||||||||||||||||||
34 | s.seriesPath.moveTo(x, y); |
| 17 | s.seriesPath.moveTo(x, y); | ||||||||||||||||
35 | s.setLastPointGood(true); |
| 18 | s.setLastPointGood(true); | ||||||||||||||||
else | else | |||||||||||||||||||
36 | s.setLastPointGood(false); |
| 19 | s.setLastPointGood(false); |
Row | Violation |
---|---|
1 | Expression s cannot be unified with expression s , because common superclass org.jfree.chart.renderer.xy.XYItemRendererState does not declare member(s) public boolean isLastPointGood() |
2 | Expression s.seriesPath cannot be unified with expression s.seriesPath , because common superclass org.jfree.chart.renderer.xy.XYItemRendererState does not declare member(s) public java.awt.geom.GeneralPath seriesPath |
3 | Expression s.seriesPath cannot be unified with expression s.seriesPath , because common superclass org.jfree.chart.renderer.xy.XYItemRendererState does not declare member(s) public java.awt.geom.GeneralPath seriesPath |
4 | Expression s cannot be unified with expression s , because common superclass org.jfree.chart.renderer.xy.XYItemRendererState does not declare member(s) public void setLastPointGood(boolean) |
5 | Expression s cannot be unified with expression s , because common superclass org.jfree.chart.renderer.xy.XYItemRendererState does not declare member(s) public void setLastPointGood(boolean) |