File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot.java | |||
Method name: Paint lookupSectionPaint(Comparable, boolean)
|
Method name: Paint lookupSectionOutlinePaint(Comparable, boolean)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | Paint result = getSectionPaint();↵ | 1 | Paint result = getSectionOutlinePaint();↵ | |
2 | if (result != null) {↵ | 2 | if (result != null) {↵ | |
3 | return result;↵ | 3 | return result;↵ | |
4 | }↵ | 4 | }↵ | |
5 | ↵ | 5 | ↵ | |
6 | // if not, check if there is a paint defined for the specified key↵ | 6 | // if not, check if there is a paint defined for the specified key↵ | |
7 | result = this.sectionPaintMap.getPaint(key);↵ | 7 | result = this.sectionOutlinePaintMap.getPaint(key);↵ | |
8 | if (result != null) {↵ | 8 | if (result != null) {↵ | |
9 | return result;↵ | 9 | return result;↵ | |
10 | }↵ | 10 | }↵ | |
11 | ↵ | 11 | ↵ | |
12 | // nothing defined - do we autoPopulate?↵ | 12 | // nothing defined - do we autoPopulate?↵ | |
13 | if (autoPopulate) {↵ | 13 | if (autoPopulate) {↵ | |
14 | DrawingSupplier ds = getDrawingSupplier();↵ | 14 | DrawingSupplier ds = getDrawingSupplier();↵ | |
15 | if (ds != null) {↵ | 15 | if (ds != null) {↵ | |
16 | result = ds.getNextPaint();↵ | 16 | result = ds.getNextOutlinePaint();↵ | |
17 | this.sectionPaintMap.put(key, result);↵ | 17 | this.sectionOutlinePaintMap.put(key, result);↵ | |
18 | }↵ | 18 | }↵ | |
19 | else {↵ | 19 | else {↵ | |
20 | result = this.baseSectionPaint;↵ | 20 | result = this.baseSectionOutlinePaint;↵ | |
21 | }↵ | 21 | }↵ | |
22 | }↵ | 22 | }↵ | |
23 | else {↵ | 23 | else {↵ | |
24 | result = this.baseSectionPaint;↵ | 24 | result = this.baseSectionOutlinePaint;↵ | |
25 | }↵ | 25 | }↵ | |
26 | return result; | 26 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 47 |
Number of mapped statements | 14 |
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) | 22.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Paint result = getSectionPaint(); |
| 1 | Paint result = getSectionOutlinePaint(); | ||||||||||||
2 | if (result != null) | 2 | if (result != null) | |||||||||||||
3 | return result; | 3 | return result; | |||||||||||||
4 | result = this.sectionPaintMap.getPaint(key); |
| 4 | result = this.sectionOutlinePaintMap.getPaint(key); | ||||||||||||
5 | if (result != null) | 5 | if (result != null) | |||||||||||||
6 | return result; | 6 | return result; | |||||||||||||
7 | if (autoPopulate) | 7 | if (autoPopulate) | |||||||||||||
8 | DrawingSupplier ds = getDrawingSupplier(); | 8 | DrawingSupplier ds = getDrawingSupplier(); | |||||||||||||
9 | if (ds != null) | 9 | if (ds != null) | |||||||||||||
10 | result = ds.getNextPaint(); |
| 10 | result = ds.getNextOutlinePaint(); | ||||||||||||
11 | this.sectionPaintMap.put(key, result); |
| 11 | this.sectionOutlinePaintMap.put(key, result); | ||||||||||||
else | else | |||||||||||||||
12 | result = this.baseSectionPaint; |
| 12 | result = this.baseSectionOutlinePaint; | ||||||||||||
else | else | |||||||||||||||
13 | result = this.baseSectionPaint; |
| 13 | result = this.baseSectionOutlinePaint; | ||||||||||||
14 | return result; | 14 | return result; |
Row | Violation |
---|---|
1 | Expression ds.getNextPaint() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ds.getNextOutlinePaint() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression this.sectionPaintMap cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression this.sectionOutlinePaintMap cannot be parameterized, because it has dependencies to/from statements that will be extracted |