if (Double.isNaN(y) && dataset.getY(series, item) == null) {
result[4] = getNullYString();
}
else {
if (ydf != null) {
result[4] = ydf.format(new Date((long) y));
}
else {
result[4] = ynf.format(y);
}
}
if (Double.isNaN(ye)
&& intervalDataset.getEndY(series, item) == null) {
result[6] = getNullYString();
}
else {
if (ydf != null) {
result[6] = ydf.format(new Date((long) ye));
}
else {
result[6] = ynf.format(ye);
}
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/IntervalXYItemLabelGenerator.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/IntervalXYItemLabelGenerator.java
|
Method name: Object[] createItemArray(XYDataset, int, int)
|
|
Method name: Object[] createItemArray(XYDataset, int, int)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (Double.isNaN(y) && d↵ | | 1 | if (Double.isNaN(ye)↵
|
2 | ataset.getY(series, item) == null) {↵ | | 2 | && intervalDataset.getEndY(series, item) == null) {↵
|
3 | result[4] = getNullYString();↵ | | 3 | result[6] = getNullYString();↵
|
4 | }↵ | | 4 | }↵
|
5 | else {↵ | | 5 | else {↵
|
6 | if (ydf != null) {↵ | | 6 | if (ydf != null) {↵
|
7 | result[4] = ydf.format(new Date((long) y));↵ | | 7 | result[6] = ydf.format(new Date((long) ye));↵
|
8 | }↵ | | 8 | }↵
|
9 | else {↵ | | 9 | else {↵
|
10 | result[4] = ynf.format(y);↵ | | 10 | result[6] = ynf.format(ye);↵
|
11 | }↵ | | 11 | }↵
|
12 | } | | 12 | }
|
See real code fragment |
|
See real code fragment |
Summary
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 | 10 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 1.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
30 | if (ydf != null) | | 40 | if (ydf != null) |
31 | result[4] = ydf.format(new Date((long)y)); | | 41 | result[6] = ydf.format(new Date((long)ye)); |
| | | | |
32 | result[4] = ynf.format(y); | | 42 | result[6] = ynf.format(ye); |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables result |