File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot3D.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/RingPlot.java | |||
Method name: void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo)
|
Method name: void drawItem(Graphics2D, int, Rectangle2D, PiePlotState, int)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 13 | |||
1 | if (info != null) {↵ | 1 | if (state.getInfo() != null) {↵ | |
2 | EntityCollection entities ↵ | 2 | EntityCollection entities ↵ | |
3 | = info.getOwner().getEntityCollection();↵ | 3 | = state.getEntityCollection();↵ | |
4 | if (entities != null) {↵ | 4 | if (entities != null) {↵ | |
5 | String tip = null;↵ | 5 | String tip = null;↵ | |
6 | PieToolTipGenerator tipster = getToolTipGenerator();↵ | 6 | PieToolTipGenerator toolTipGenerator↵ | |
7 | ↵ | |||
7 | if (tipster != null) {↵ | 8 | ↵ | |
8 | // @mgs: using the method's return value was missing ↵ | 9 | = getToolTipGenerator();↵ | |
10 | if (toolTipGenerator != null) {↵ | |||
9 | tip = tipster.generateToolTip(dataset, currentK↵ | 11 | tip = toolTipGenerator.generateToolTip(dataset, ↵ | |
10 | ey);↵ | 12 | key);↵ | |
11 | }↵ | 13 | ↵ | |
14 | }↵ | |||
12 | String url = null;↵ | 15 | String url = null;↵ | |
13 | if (getURLGenerator()↵ | 16 | PieURLGenerator urlGenerator = getURLGenerator();↵ | |
14 | != null) {↵ | 17 | if (urlGenerator != null) {↵ | |
15 | url = getURLGenerator().generateURL(dataset, currentKey,↵ | 18 | url = urlGenerator.generateURL(dataset, key, ↵ | |
16 | getPieIndex());↵ | 19 | getPieIndex());↵ | |
17 | }↵ | 20 | ↵ | |
21 | }↵ | |||
18 | PieSectionEntity entity = new PieSectionEntity(↵ | 22 | PieSectionEntity entity = new PieSectionEntity(path, ↵ | |
19 | upperArc, dataset, getPieIndex(), sectionIndex, ↵ | 23 | dataset, getPieIndex(), section, key, tip, ↵ | |
20 | currentKey, tip, url);↵ | 24 | url);↵ | |
21 | entities.add(entity);↵ | 25 | entities.add(entity);↵ | |
22 | }↵ | 26 | ↵ | |
27 | }↵ | |||
23 | } | 28 | } | |
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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 60 |
Number of mapped statements | 11 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 165.4 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
196 | if (info != null) |
| 55 | if (state.getInfo() != null) | |||||||||||||||||||
|
| 56 | EntityCollection entities = state.getEntityCollection(); | ||||||||||||||||||||
197 | EntityCollection entities = info.getOwner().getEntityCollection(); |
| | ||||||||||||||||||||
198 | if (entities != null) | 57 | if (entities != null) | ||||||||||||||||||||
199 | String tip = null; | 58 | String tip = null; | ||||||||||||||||||||
200 | PieToolTipGenerator tipster = getToolTipGenerator(); |
| 59 | PieToolTipGenerator toolTipGenerator = getToolTipGenerator(); | |||||||||||||||||||
201 | if (tipster != null) |
| 60 | if (toolTipGenerator != null) | |||||||||||||||||||
202 | tip = tipster.generateToolTip(dataset, currentKey); |
| 61 | tip = toolTipGenerator.generateToolTip(dataset, key); | |||||||||||||||||||
203 | String url = null; | 62 | String url = null; | ||||||||||||||||||||
| 63 | PieURLGenerator urlGenerator = getURLGenerator(); | |||||||||||||||||||||
204 | if (getURLGenerator() != null) |
| 64 | if (urlGenerator != null) | |||||||||||||||||||
205 | url = getURLGenerator().generateURL(dataset, currentKey, getPieIndex()); |
| 65 | url = urlGenerator.generateURL(dataset, key, getPieIndex()); | |||||||||||||||||||
206 | PieSectionEntity entity = new PieSectionEntity(upperArc, dataset, getPieIndex(), sectionIndex, currentKey, tip, url); |
| 66 | PieSectionEntity entity = new PieSectionEntity(path, dataset, getPieIndex(), section, key, tip, url); | |||||||||||||||||||
207 | entities.add(entity); | 67 | entities.add(entity); |
Row | Violation |
---|---|
1 | Unmatched statement EntityCollection entities=state.getEntityCollection(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement EntityCollection entities=info.getOwner().getEntityCollection(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Expression urlGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression urlGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |