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 lookupSectionOutlinePaint(Comparable, boolean)
|
Method name: Stroke lookupSectionOutlineStroke(Comparable, boolean)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (autoPopulate) {↵ | 1 | if (autoPopulate) {↵ | |
2 | DrawingSupplier ds = getDrawingSupplier();↵ | 2 | DrawingSupplier ds = getDrawingSupplier();↵ | |
3 | if (ds != null) {↵ | 3 | if (ds != null) {↵ | |
4 | result = ds.getNextOutlinePaint();↵ | 4 | result = ds.getNextOutlineStroke();↵ | |
5 | this.sectionOutlinePaintMap.put(key, result);↵ | 5 | this.sectionOutlineStrokeMap.put(key, result);↵ | |
6 | }↵ | 6 | }↵ | |
7 | else {↵ | 7 | else {↵ | |
8 | result = this.baseSectionOutlinePaint;↵ | 8 | result = this.baseSectionOutlineStroke;↵ | |
9 | }↵ | 9 | }↵ | |
10 | }↵ | 10 | }↵ | |
11 | else {↵ | 11 | else {↵ | |
12 | result = this.baseSectionOutlinePaint;↵ | 12 | result = this.baseSectionOutlineStroke;↵ | |
13 | } | 13 |
| |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 25 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 18.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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.getNextOutlineStroke(); | |||||||||||||||||||
10 | result = ds.getNextOutlinePaint(); |
| | |||||||||||||||||||
11 | this.sectionOutlinePaintMap.put(key, result); |
| 11 | this.sectionOutlineStrokeMap.put(key, result); | ||||||||||||||||||
else | | |||||||||||||||||||||
|
| 12 | result = this.baseSectionOutlineStroke; | |||||||||||||||||||
12 | result = this.baseSectionOutlinePaint; |
| | |||||||||||||||||||
else | | |||||||||||||||||||||
|
| 13 | result = this.baseSectionOutlineStroke; | |||||||||||||||||||
13 | result = this.baseSectionOutlinePaint; |
| |
Row | Violation |
---|---|
1 | Unmatched statement result=ds.getNextOutlineStroke(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement result=ds.getNextOutlinePaint(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type java.awt.Paint of variable result does not match with type java.awt.Stroke of variable result |
4 | Type org.jfree.chart.PaintMap of variable this.sectionOutlinePaintMap does not match with type org.jfree.chart.StrokeMap of variable this.sectionOutlineStrokeMap |
5 | Unmatched statement result=this.baseSectionOutlinePaint; cannot be moved, because it updates a variable modified in other unmapped statements |
6 | Unmatched statement result=this.baseSectionOutlinePaint; cannot be moved, because it updates a variable modified in other unmapped statements |
7 | Unmatched statement result=this.baseSectionOutlineStroke; cannot be moved, because it updates a variable modified in other unmapped statements |
8 | Unmatched statement result=this.baseSectionOutlineStroke; cannot be moved, because it updates a variable modified in other unmapped statements |