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: 11 | Number of AST nodes: 11 | |||
1 | EntityCollection entities ↵ | |||
2 | = info.getOwner().getEntityCollection();↵ | |||
3 | if (entities != null) {↵ | 1 | if (entities != null) {↵ | |
4 | String tip = null;↵ | 2 | String tip = null;↵ | |
5 | PieToolTipGenerator tipster = getToolTipGenerator();↵ | 3 | PieToolTipGenerator toolTipGenerator ↵ | |
6 | if (tipster != null) {↵ | 4 | ↵ | |
7 | // @mgs: using the method's return value was missing ↵ | |||
5 | = getToolTipGenerator();↵ | |||
6 | if (toolTipGenerator != null) {↵ | |||
8 | tip = tipster.generateToolTip(dataset, currentK↵ | 7 | tip = toolTipGenerator.generateToolTip(dataset, ↵ | |
9 | ey);↵ | 8 | key);↵ | |
10 | }↵ | 9 | ↵ | |
10 | }↵ | |||
11 | String url = null;↵ | 11 | String url = null;↵ | |
12 | if (getURLGenerator()↵ | 12 | PieURLGenerator urlGenerator = getURLGenerator();↵ | |
13 | != null) {↵ | 13 | if (urlGenerator != null) {↵ | |
14 | url = getURLGenerator().generateURL(dataset, currentKey,↵ | 14 | url = urlGenerator.generateURL(dataset, key, ↵ | |
15 | getPieIndex());↵ | 15 | getPieIndex());↵ | |
16 | }↵ | 16 | }↵ | |
17 | PieSectionEntity entity = new PieSectionEntity(↵ | 17 | PieSectionEntity entity = new PieSectionEntity(path, ↵ | |
18 | upperArc, dataset, getPieIndex(), sectionIndex, ↵ | 18 | dataset, getPieIndex(), section, key, tip, ↵ | |
19 | currentKey, tip, url);↵ | 19 | 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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 56 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 3.5 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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()); | |||||||||||||
|
| 66 | PieSectionEntity entity = new PieSectionEntity(path, dataset, getPieIndex(), section, key, tip, url); | ||||||||||||||
206 | PieSectionEntity entity = new PieSectionEntity(upperArc, dataset, getPieIndex(), sectionIndex, currentKey, 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 | Unmatched statement PieSectionEntity entity=new PieSectionEntity(path,dataset,getPieIndex(),section,key,tip,url); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement PieSectionEntity entity=new PieSectionEntity(upperArc,dataset,getPieIndex(),sectionIndex,currentKey,tip,url); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Clone fragment #1 returns variables tip, url , while Clone fragment #2 returns variables tip, url |