SeriesDataset child = getDatasetInfo(i).data;
if (child instanceof CombinationDataset) {
SeriesDataset childParent
= ((CombinationDataset) child).getParent();
if (parent == null) {
parent = childParent;
}
else if (parent != childParent) {
return null;
}
}
else {
return null;
}
SeriesDataset child = getDatasetInfo(i).data;
if (child instanceof CombinationDataset) {
int[] childMap = ((CombinationDataset) child).getMap();
if (childMap == null) {
return null;
}
map = joinMap(map, childMap);
}
else {
return null;
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/general/CombinedDataset.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/data/general/CombinedDataset.java
|
Method name: SeriesDataset getParent()
|
|
Method name: int[] getMap()
|
Number of AST nodes: 8
|
|
Number of AST nodes: 7
|
|
1 | SeriesDataset child = getDatasetInfo(i).data;↵ | | 1 | SeriesDataset child = getDatasetInfo(i).data;↵
|
2 | if (child instanceof CombinationDataset) {↵ | | 2 | if (child instanceof CombinationDataset) {↵
|
3 | SeriesDataset childParent ↵ | | 3 | ↵
|
4 | = ((CombinationDataset) child).getParent();↵ | | 4 | int[] childMap = ((CombinationDataset) child).getMap();↵
|
5 | if (parent == null) {↵ | | 5 | if (childMap == null) {↵
|
6 | parent = childParent;↵ | | 6 | return null;↵
|
7 | }↵ | | 7 | }↵
|
8 | else if (parent != childParent) {↵ | | 8 | ↵
|
9 | return null;↵ | | |
|
10 | }↵ | | 9 | map = joinMap(map, childMap);↵
|
11 | }↵ | | 10 | }↵
|
12 | else {↵ | | 11 | else {↵
|
13 | return null;↵ | | 12 | return null;↵
|
14 | } | | 13 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 2 |