Integer m = (Integer) this.datasetToDomainAxisMap.get(
datasetIndex);
if (m == null) { // a dataset with no mapping is assigned to
// axis 0
if (axisIndex == 0) {
result.add(dataset);
}
}
else {
if (m.intValue() == axisIndex) {
result.add(dataset);
}
}
Integer m = (Integer) this.datasetToRangeAxisMap.get(i);
if (m == null) { // a dataset with no mapping is assigned to
// axis 0
if (index == 0) {
result.add(dataset);
}
}
else {
if (m.intValue() == index) {
result.add(dataset);
}
}
Clone fragments detected by clone detection tool
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: 6
|
|
Number of AST nodes: 6
|
|
1 | Integer m = (Integer) this.datasetToDomainAxisMap.get(↵ | | 1 | Integer m = (Integer) this.datasetToRangeAxisMap.get(↵
|
2 | datasetIndex);↵ | | 2 | i);↵
|
3 | if (m == null) { // a dataset with no mapping is assigned to↵ | | 3 | if (m == null) { // a dataset with no mapping is assigned to↵
|
4 | // axis 0↵ | | 4 | // axis 0↵
|
5 | if (axisIndex == 0) {↵ | | 5 | if (index == 0) {↵
|
6 | result.add(dataset);↵ | | 6 | result.add(dataset);↵
|
7 | }↵ | | 7 | }↵
|
8 | }↵ | | 8 | }↵
|
9 | else {↵ | | 9 | else {↵
|
10 | if (m.intValue() == axisIndex) {↵ | | 10 | if (m.intValue() == index) {↵
|
11 | result.add(dataset);↵ | | 11 | result.add(dataset);↵
|
12 | }↵ | | 12 | }↵
|
13 | } | | 13 | }
|
See real code fragment |
|
See real code fragment |
Summary
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 | 17 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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) | 21.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
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 | | | 7 | |
8 | | | 8 | |
| | | | |
9 | if (m.intValue() == axisIndex) | | 9 | if (m.intValue() == index) |
10 | | | 10 | |
Precondition Violations (0)
Row |
Violation |