File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/AbstractRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/AbstractRenderer.java | |||
Method name: Paint lookupSeriesPaint(int)
|
Method name: Paint lookupSeriesOutlinePaint(int)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | if (this.paint != null) {↵ | 1 | if (this.outlinePaint != null) {↵ | |
2 | return this.paint;↵ | 2 | return this.outlinePaint;↵ | |
3 | }↵ | 3 | }↵ | |
4 | // otherwise look up the paint list↵ | 4 | // otherwise look up the paint table↵ | |
5 | Paint seriesPaint = getSeriesPaint(series);↵ | 5 | Paint seriesOutlinePaint = getSeriesOutlinePaint(series);↵ | |
6 | if (seriesPaint == null && this.autoPopulateSeriesPaint) {↵ | 6 | if (seriesOutlinePaint == null && this.autoPopulateSeriesOutlinePaint) {↵ | |
7 | DrawingSupplier supplier = getDrawingSupplier();↵ | 7 | DrawingSupplier supplier = getDrawingSupplier();↵ | |
8 | if (supplier != null) {↵ | 8 | if (supplier != null) {↵ | |
9 | seriesPaint = supplier.getNextPaint();↵ | 9 | seriesOutlinePaint = supplier.getNextOutlinePaint();↵ | |
10 | setSeriesPaint(series, seriesPaint, false);↵ | 10 | setSeriesOutlinePaint(series, seriesOutlinePaint, false);↵ | |
11 | }↵ | 11 | }↵ | |
12 | }↵ | 12 | }↵ | |
13 | if (seriesPaint == null) {↵ | 13 | if (seriesOutlinePaint == null) {↵ | |
14 | seriesPaint = this.basePaint;↵ | 14 | seriesOutlinePaint = this.baseOutlinePaint;↵ | |
15 | }↵ | 15 | }↵ | |
16 | return seriesPaint; | 16 | return seriesOutlinePaint; | |
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.7 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 27 |
Number of mapped statements | 11 |
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) | 14.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (this.paint != null) |
| 1 | if (this.outlinePaint != null) | |||||||||||||||||
2 | return this.paint; |
| 2 | return this.outlinePaint; | |||||||||||||||||
3 | Paint seriesPaint = getSeriesPaint(series); |
| 3 | Paint seriesOutlinePaint = getSeriesOutlinePaint(series); | |||||||||||||||||
4 | if (seriesPaint == null && this.autoPopulateSeriesPaint) |
| 4 | if (seriesOutlinePaint == null && this.autoPopulateSeriesOutlinePaint) | |||||||||||||||||
5 | DrawingSupplier supplier = getDrawingSupplier(); | 5 | DrawingSupplier supplier = getDrawingSupplier(); | ||||||||||||||||||
6 | if (supplier != null) | 6 | if (supplier != null) | ||||||||||||||||||
7 | seriesPaint = supplier.getNextPaint(); |
| 7 | seriesOutlinePaint = supplier.getNextOutlinePaint(); | |||||||||||||||||
8 | setSeriesPaint(series, seriesPaint, false); |
| 8 | setSeriesOutlinePaint(series, seriesOutlinePaint, false); | |||||||||||||||||
9 | if (seriesPaint == null) |
| 9 | if (seriesOutlinePaint == null) | |||||||||||||||||
10 | seriesPaint = this.basePaint; |
| 10 | seriesOutlinePaint = this.baseOutlinePaint; | |||||||||||||||||
11 | return seriesPaint; |
| 11 | return seriesOutlinePaint; |
Row | Violation |
---|---|
1 | Expression supplier.getNextPaint() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression supplier.getNextOutlinePaint() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression setSeriesPaint(series,seriesPaint,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression setSeriesOutlinePaint(series,seriesOutlinePaint,false) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression setSeriesPaint(series,seriesPaint,false) is a void method call, and thus it cannot be parameterized |
6 | Expression setSeriesOutlinePaint(series,seriesOutlinePaint,false) is a void method call, and thus it cannot be parameterized |