File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/MultiplePiePlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/MultiplePiePlot.java | |||
Method name: void prefetchSectionPaints()
|
Method name: void prefetchSectionPaints()
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | for (int c = 0; c < this.dataset.getColumnCount(); c++) {↵ | 1 | for (int r = 0; r < this.dataset.getRowCount(); r++) {↵ | |
2 | Comparable key = this.dataset.getColumnKey(c);↵ | 2 | Comparable key = this.dataset.getRowKey(r);↵ | |
3 | Paint p = piePlot.getSectionPaint(key);↵ | 3 | Paint p = piePlot.getSectionPaint(key);↵ | |
4 | if (p == null) {↵ | 4 | if (p == null) {↵ | |
5 | p = (Paint) this.sectionPaints.get(key);↵ | 5 | p = (Paint) this.sectionPaints.get(key);↵ | |
6 | if (p == null) {↵ | 6 | if (p == null) {↵ | |
7 | p = getDrawingSupplier().getNextPaint();↵ | 7 | p = getDrawingSupplier().getNextPaint();↵ | |
8 | }↵ | 8 | }↵ | |
9 | }↵ | 9 | }↵ | |
10 | this.sectionPaints.put(key, p);↵ | 10 | this.sectionPaints.put(key, p);↵ | |
11 | } | 11 |
| |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 24 |
Number of mapped statements | 8 |
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) | 2.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | for (int c = 0; c < this.dataset.getColumnCount(); c++) |
| 11 | for (int r = 0; r < this.dataset.getRowCount(); r++) | |||||||||||||||||||
4 | Comparable key = this.dataset.getColumnKey(c); |
| 12 | Comparable key = this.dataset.getRowKey(r); | |||||||||||||||||||
5 | Paint p = piePlot.getSectionPaint(key); | 13 | Paint p = piePlot.getSectionPaint(key); | ||||||||||||||||||||
6 | if (p == null) | 14 | if (p == null) | ||||||||||||||||||||
7 | p = (Paint)this.sectionPaints.get(key); | 15 | p = (Paint)this.sectionPaints.get(key); | ||||||||||||||||||||
8 | if (p == null) | 16 | if (p == null) | ||||||||||||||||||||
9 | p = getDrawingSupplier().getNextPaint(); | 17 | p = getDrawingSupplier().getNextPaint(); | ||||||||||||||||||||
10 | this.sectionPaints.put(key, p); | 18 | this.sectionPaints.put(key, p); |
Row | Violation |
---|---|
1 | Expression this.dataset.getColumnKey(c) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression this.dataset.getRowKey(r) cannot be parameterized, because it has dependencies to/from statements that will be extracted |