File path: /jfreechart-1.0.10/src/org/jfree/data/general/DatasetUtilities.java | File path: /jfreechart-1.0.10/src/org/jfree/data/general/DatasetUtilities.java | |||
Method name: Range findRangeBounds(CategoryDataset, boolean)
|
Method name: Range findRangeBounds(XYDataset, boolean)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (dataset == null) {↵ | 1 | if (dataset == null) {↵ | |
2 | throw new IllegalArgumentException("Null 'dataset' argument.");↵ | 2 | throw new IllegalArgumentException("Null 'dataset' argument.");↵ | |
3 | }↵ | 3 | }↵ | |
4 | Range result = null;↵ | 4 | Range result = null;↵ | |
5 | if (dataset instanceof RangeInfo) {↵ | 5 | if (dataset instanceof RangeInfo) {↵ | |
6 | RangeInfo info = (RangeInfo) dataset;↵ | 6 | RangeInfo info = (RangeInfo) dataset;↵ | |
7 | result = info.getRangeBounds(includeInterval);↵ | 7 | result = info.getRangeBounds(includeInterval);↵ | |
8 | }↵ | 8 | }↵ | |
9 | else {↵ | 9 | else {↵ | |
10 | result = iterateRangeBounds(dataset, includeInterval);↵ | 10 | result = iterateRangeBounds(dataset, includeInterval);↵ | |
11 | }↵ | 11 | }↵ | |
12 | return result; | 12 |
| |
See real code fragment | See real code fragment |
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 declared in the same class |
Number of node comparisons | 26 |
Number of mapped statements | 8 |
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) | 2.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (dataset == null) |
| 1 | if (dataset == null) | |||||||||||
2 | throw new IllegalArgumentException("Null 'dataset' argument."); | 2 | throw new IllegalArgumentException("Null 'dataset' argument."); | ||||||||||||
3 | Range result = null; | 3 | Range result = null; | ||||||||||||
4 | if (dataset instanceof RangeInfo) |
| 4 | if (dataset instanceof RangeInfo) | |||||||||||
5 | RangeInfo info = (RangeInfo)dataset; |
| 5 | RangeInfo info = (RangeInfo)dataset; | |||||||||||
6 | result = info.getRangeBounds(includeInterval); | 6 | result = info.getRangeBounds(includeInterval); | ||||||||||||
else | else | ||||||||||||||
7 | result = iterateRangeBounds(dataset, includeInterval); |
| 7 | result = iterateRangeBounds(dataset, includeInterval); | |||||||||||
8 | return result; | 8 | return result; |
Row | Violation |
---|---|
1 | Expression dataset cannot be unified with expression dataset , because common superclass type org.jfree.data.general.Dataset cannot be passed as an argument to public static org.jfree.data.Range iterateRangeBounds(org.jfree.data.category.CategoryDataset, boolean) |