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: 12 | Number of AST nodes: 12 | |||
1 | if (state.getInfo() != null) {↵ | 1 | if (state.getInfo() != null) {↵ | |
2 | EntityCollection entities = state.getEntityCollection();↵ | 2 | EntityCollection entities = state.getEntityCollection();↵ | |
3 | if (entities != null && shape != null && !nullPoint) {↵ | 3 | if (entities != null && hotspot != null) {↵ | |
4 | String tip = null;↵ | 4 | String tip = null;↵ | |
5 | XYToolTipGenerator generator↵ | 5 | XYToolTipGenerator generator↵ | |
6 | = getToolTipGenerator(↵ | 6 | = getToolTipGenerator(↵ | |
7 | series, item);↵ | 7 | series, item↵ | |
8 | ↵ | 8 | );↵ | |
9 | if (generator != null) {↵ | 9 | if (generator != null) {↵ | |
10 | tip = generator.generateToolTip(dataset, series, item);↵ | 10 | tip = generator.generateToolTip(dataset, series, item);↵ | |
11 | }↵ | 11 | ↵ | |
12 | ↵ | 12 | }↵ | |
13 | String url = null;↵ | 13 | String url = null;↵ | |
14 | if (getURLGenerator() != null) {↵ | 14 | if (getURLGenerator() != null) {↵ | |
15 | url = getURLGenerator().generateURL(dataset, series,↵ | 15 | url = getURLGenerator().generateURL(dataset, series,↵ | |
16 | item);↵ | 16 | item);↵ | |
17 | }↵ | 17 | ↵ | |
18 | ↵ | 18 | }↵ | |
19 | XYItemEntity entity = new XYItemEntity(shape, dataset,↵ | 19 | XYItemEntity entity = new XYItemEntity(hotspot, dataset, ↵ | |
20 | series, item, tip, url);↵ | 20 | series, item, tip, url);↵ | |
21 | entities.add(entity);↵ | 21 | entities.add(entity);↵ | |
22 | }↵ | 22 | ↵ | |
23 | ↵ | 23 | }↵ | |
24 | } | 24 |
| |
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 | 50 |
Number of mapped statements | 12 |
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) | 181.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
85 | if (state.getInfo() != null) | 57 | if (state.getInfo() != null) | ||||||||||||||||||||||
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 |