File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java | |||
Method name: List datasetsMappedToDomainAxis(int)
|
Method name: List datasetsMappedToRangeAxis(int)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | List result = new ArrayList();↵ | 1 | List result = new ArrayList();↵ | |
2 | for (int datasetIndex = 0; datasetIndex < this.datasets.size();↵ | 2 | for (int ↵ | |
3 | datasetIndex++) {↵ | 3 | i = 0; i < this.datasets.size(); i++) {↵ | |
4 | Object dataset = this.datasets.get(datasetIndex);↵ | 4 | Object dataset = this.datasets.get(i);↵ | |
5 | if (dataset != null) {↵ | 5 | if (dataset != null) {↵ | |
6 | Integer m = (Integer) this.datasetToDomainAxisMap.get(↵ | 6 | Integer m = (Integer) this.datasetToRangeAxisMap.get(↵ | |
7 | datasetIndex);↵ | 7 | i);↵ | |
8 | if (m == null) { // a dataset with no mapping is assigned to↵ | 8 | if (m == null) { // a dataset with no mapping is assigned to↵ | |
9 | // axis 0↵ | 9 | // axis 0↵ | |
10 | if (axisIndex == 0) {↵ | 10 | if (index == 0) {↵ | |
11 | result.add(dataset);↵ | 11 | result.add(dataset);↵ | |
12 | }↵ | 12 | }↵ | |
13 | }↵ | 13 | }↵ | |
14 | else {↵ | 14 | else {↵ | |
15 | if (m.intValue() == axisIndex) {↵ | 15 | if (m.intValue() == index) {↵ | |
16 | result.add(dataset);↵ | 16 | result.add(dataset);↵ | |
17 | }↵ | 17 | }↵ | |
18 | }↵ | 18 | }↵ | |
19 | }↵ | 19 | }↵ | |
20 | }↵ | 20 | }↵ | |
21 | return result; | 21 |
| |
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.9 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 24 |
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) | 20.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | List result = new ArrayList(); | 1 | List result = new ArrayList(); | |||||||||||||||||
2 | for (int datasetIndex = 0; datasetIndex < this.datasets.size(); datasetIndex++) |
| 2 | for (int i = 0; i < this.datasets.size(); i++) | ||||||||||||||||
3 | Object dataset = this.datasets.get(datasetIndex); |
| 3 | Object dataset = this.datasets.get(i); | ||||||||||||||||
4 | if (dataset != null) | 4 | if (dataset != null) | |||||||||||||||||
5 | Integer m = (Integer)this.datasetToDomainAxisMap.get(datasetIndex); |
| 5 | Integer m = (Integer)this.datasetToRangeAxisMap.get(i); | ||||||||||||||||
6 | if (m == null) | 6 | if (m == null) | |||||||||||||||||
7 | if (axisIndex == 0) |
| 7 | if (index == 0) | ||||||||||||||||
8 | result.add(dataset); | 8 | result.add(dataset); | |||||||||||||||||
else | else | |||||||||||||||||||
9 | if (m.intValue() == axisIndex) |
| 9 | if (m.intValue() == index) | ||||||||||||||||
10 | result.add(dataset); | 10 | result.add(dataset); | |||||||||||||||||
11 | return result; | 11 | return result; |
Row | Violation |
---|