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 findDomainBounds(XYDataset, 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 the dataset implements DomainInfo, life is easier↵ | |||
6 | if (dataset instanceof DomainInfo) {↵ | 5 | if (dataset instanceof RangeInfo) {↵ | |
7 | DomainInfo info = (DomainInfo) dataset;↵ | 6 | RangeInfo info = (RangeInfo) dataset;↵ | |
8 | result = info.getDomainBounds(includeInterval);↵ | 7 | result = info.getRangeBounds(includeInterval);↵ | |
9 | }↵ | 8 | }↵ | |
10 | else {↵ | 9 | else {↵ | |
11 | result = iterateDomainBounds(dataset, includeInterval);↵ | 10 | result = iterateRangeBounds(dataset, includeInterval);↵ | |
12 | }↵ | 11 | }↵ | |
13 | 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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 26 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 791.1 |
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 DomainInfo) |
| 4 | if (dataset instanceof RangeInfo) | ||||||||||||||||
|
| 5 | RangeInfo info = (RangeInfo)dataset; | |||||||||||||||||
5 | DomainInfo info = (DomainInfo)dataset; |
| | |||||||||||||||||
6 | result = info.getDomainBounds(includeInterval); |
| 6 | result = info.getRangeBounds(includeInterval); | ||||||||||||||||
else | else | |||||||||||||||||||
7 | result = iterateDomainBounds(dataset, includeInterval); |
| 7 | result = iterateRangeBounds(dataset, includeInterval); | ||||||||||||||||
8 | return result; | 8 | return result; |
Row | Violation |
---|---|
1 | Expression dataset instanceof DomainInfo cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression dataset instanceof RangeInfo cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type org.jfree.data.DomainInfo does not match with type org.jfree.data.RangeInfo |
4 | Unmatched statement RangeInfo info=(RangeInfo)dataset; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement DomainInfo info=(DomainInfo)dataset; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Expression info.getDomainBounds(includeInterval) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression info.getRangeBounds(includeInterval) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type org.jfree.data.DomainInfo of variable info does not match with type org.jfree.data.RangeInfo of variable info |
9 | Expression iterateDomainBounds(dataset,includeInterval) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression iterateRangeBounds(dataset,includeInterval) cannot be parameterized, because it has dependencies to/from statements that will be extracted |