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: 12 | |||
1 | if (info != null) {↵ | |||
2 | EntityCollection entities ↵ | |||
3 | = info.getOwner().getEntityCollection();↵ | 1 | EntityCollection entities = state.getEntityCollection();↵ | |
4 | if (entities != null) {↵ | 2 | if (entities != null) {↵ | |
5 | String tip = null;↵ | 3 | String tip = null;↵ | |
6 | PieToolTipGenerator tipster = getToolTipGenerator();↵ | 4 | PieToolTipGenerator toolTipGenerator↵ | |
5 | ↵ | |||
7 | if (tipster != null) {↵ | 6 | ↵ | |
8 | // @mgs: using the method's return value was missing ↵ | |||
7 | = getToolTipGenerator();↵ | |||
8 | if (toolTipGenerator != null) {↵ | |||
9 | tip = tipster.generateToolTip(dataset, currentK↵ | 9 | tip = toolTipGenerator.generateToolTip(dataset, ↵ | |
10 | ey);↵ | 10 | key);↵ | |
11 | }↵ | 11 | ↵ | |
12 | }↵ | |||
12 | String url = null;↵ | 13 | String url = null;↵ | |
13 | if (getURLGenerator()↵ | 14 | PieURLGenerator urlGenerator = getURLGenerator();↵ | |
14 | != null) {↵ | 15 | if (urlGenerator != null) {↵ | |
15 | url = getURLGenerator().generateURL(dataset, currentKey,↵ | 16 | url = urlGenerator.generateURL(dataset, key, ↵ | |
16 | getPieIndex());↵ | 17 | getPieIndex());↵ | |
17 | }↵ | 18 | ↵ | |
19 | }↵ | |||
18 | PieSectionEntity entity = new PieSectionEntity(↵ | 20 | PieSectionEntity entity = new PieSectionEntity(path, ↵ | |
19 | upperArc, dataset, getPieIndex(), sectionIndex, ↵ | 21 | dataset, getPieIndex(), section, key, tip, ↵ | |
20 | currentKey, tip, url);↵ | 22 | url);↵ | |
21 | entities.add(entity);↵ | 23 | entities.add(entity);↵ | |
22 | }↵ | 24 | ↵ | |
23 | } | 25 |
| |
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 | 57 |
Number of mapped statements | 10 |
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) | 57.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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=info.getOwner().getEntityCollection(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression urlGenerator cannot be parameterized, 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 |