File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StackedXYAreaRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYAreaRenderer2.java | |||
Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
|
Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | EntityCollection entities = state.getEntityCollection();↵ | 1 | EntityCollection entities = state.getEntityCollection();↵ | |
2 | if (entities != null && shape != null && !nullPoint) {↵ | 2 | if (entities != null && hotspot != null) {↵ | |
3 | String tip = null;↵ | 3 | String tip = null;↵ | |
4 | XYToolTipGenerator generator↵ | 4 | XYToolTipGenerator generator↵ | |
5 | = getToolTipGenerator(↵ | 5 | = getToolTipGenerator(↵ | |
6 | series, item);↵ | 6 | series, item↵ | |
7 | ↵ | 7 | );↵ | |
8 | if (generator != null) {↵ | 8 | if (generator != null) {↵ | |
9 | tip = generator.generateToolTip(dataset, series, item);↵ | 9 | tip = generator.generateToolTip(dataset, series, item);↵ | |
10 | }↵ | 10 | ↵ | |
11 | ↵ | 11 | }↵ | |
12 | String url = null;↵ | 12 | String url = null;↵ | |
13 | if (getURLGenerator() != null) {↵ | 13 | if (getURLGenerator() != null) {↵ | |
14 | url = getURLGenerator().generateURL(dataset, series,↵ | 14 | url = getURLGenerator().generateURL(dataset, series,↵ | |
15 | item);↵ | 15 | item);↵ | |
16 | }↵ | 16 | ↵ | |
17 | ↵ | 17 | }↵ | |
18 | XYItemEntity entity = new XYItemEntity(shape, dataset,↵ | 18 | XYItemEntity entity = new XYItemEntity(hotspot, dataset, ↵ | |
19 | series, item, tip, url);↵ | 19 | series, item, tip, url);↵ | |
20 | entities.add(entity);↵ | 20 | entities.add(entity);↵ | |
21 | } | 21 |
| |
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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 48 |
Number of mapped statements | 11 |
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) | 49.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
86 | EntityCollection entities = state.getEntityCollection(); | 58 | EntityCollection entities = state.getEntityCollection(); | ||||||||||||||||||||||
87 | if (entities != null && shape != null && !nullPoint) |
| 59 | if (entities != null && hotspot != null) | |||||||||||||||||||||
88 | String tip = null; | 60 | String tip = null; | ||||||||||||||||||||||
89 | XYToolTipGenerator generator = getToolTipGenerator(series, item); | 61 | XYToolTipGenerator generator = getToolTipGenerator(series, item); | ||||||||||||||||||||||
90 | if (generator != null) | 62 | if (generator != null) | ||||||||||||||||||||||
91 | tip = generator.generateToolTip(dataset, series, item); | 63 | tip = generator.generateToolTip(dataset, series, item); | ||||||||||||||||||||||
92 | String url = null; | 64 | String url = null; | ||||||||||||||||||||||
93 | if (getURLGenerator() != null) | 65 | if (getURLGenerator() != null) | ||||||||||||||||||||||
94 | url = getURLGenerator().generateURL(dataset, series, item); | 66 | url = getURLGenerator().generateURL(dataset, series, item); | ||||||||||||||||||||||
95 | XYItemEntity entity = new XYItemEntity(shape, dataset, series, item, tip, url); |
| 67 | XYItemEntity entity = new XYItemEntity(hotspot, dataset, series, item, tip, url); | |||||||||||||||||||||
96 | entities.add(entity); | 68 | entities.add(entity); |
Row | Violation |
---|---|
1 | Expression entities != null && shape != null cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression entities != null cannot be parameterized, because it has dependencies to/from statements that will be extracted |