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: 9 | Number of AST nodes: 9 | |||
1 | for (int datasetIndex = 0; datasetIndex < this.datasets.size();↵ | 1 | for (int ↵ | |
2 | datasetIndex++) {↵ | 2 | 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(↵ | 5 | Integer m = (Integer) this.datasetToRangeAxisMap.get(↵ | |
6 | datasetIndex);↵ | 6 | i);↵ | |
7 | if (m == null) { // a dataset with no mapping is assigned to↵ | 7 | if (m == null) { // a dataset with no mapping is assigned to↵ | |
8 | // axis 0↵ | 8 | // axis 0↵ | |
9 | if (axisIndex == 0) {↵ | 9 | if (index == 0) {↵ | |
10 | result.add(dataset);↵ | 10 | result.add(dataset);↵ | |
11 | }↵ | 11 | }↵ | |
12 | }↵ | 12 | }↵ | |
13 | else {↵ | 13 | else {↵ | |
14 | if (m.intValue() == axisIndex) {↵ | 14 | if (m.intValue() == index) {↵ | |
15 | result.add(dataset);↵ | 15 | result.add(dataset);↵ | |
16 | }↵ | 16 | }↵ | |
17 | }↵ | 17 | }↵ | |
18 | }↵ | 18 | }↵ | |
19 | } | 19 |
| |
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 | 22 |
Number of mapped statements | 9 |
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) | 19.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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); |
Row | Violation |
---|