File path: /jfreechart-1.0.10/src/org/jfree/data/category/DefaultIntervalCategoryDataset.java | File path: /jfreechart-1.0.10/src/org/jfree/data/category/DefaultIntervalCategoryDataset.java | |||
Method name: void DefaultIntervalCategoryDataset(Comparable[], Comparable[], Number[][], Number[][])
|
Method name: void DefaultIntervalCategoryDataset(Comparable[], Comparable[], Number[][], Number[][])
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (seriesKeys != null) {↵ | 1 | if (categoryKeys != null) {↵ | |
2 | if (seriesKeys.length != seriesCount) {↵ | 2 | if (categoryKeys.length != categoryCount) {↵ | |
3 | throw new IllegalArgumentException(↵ | 3 | throw new IllegalArgumentException(↵ | |
4 | "The number of series keys does not "↵ | 4 | "The number of category keys does not match "↵ | |
5 | + "match the number of series in the data.");↵ | 5 | + "the number of categories in the data.");↵ | |
6 | }↵ | 6 | }↵ | |
7 | this.seriesKeys = seriesKeys;↵ | 7 | this.categoryKeys = categoryKeys;↵ | |
8 | }↵ | 8 | }↵ | |
9 | else {↵ | 9 | else {↵ | |
10 | String prefix = resources.getString(↵ | 10 | String prefix = resources.getString(↵ | |
11 | "series.default-prefix") + " ";↵ | 11 | "categories.default-prefix") + " ";↵ | |
12 | this.seriesKeys = generateKeys(seriesCount, prefix);↵ | 12 | this.categoryKeys = generateKeys(categoryCount, prefix);↵ | |
13 | } | 13 |
| |
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 in the same method |
Number of node comparisons | 21 |
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) | 3.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11 | if (seriesKeys != null) |
| 21 | if (categoryKeys != null) | |||||||||||||||
12 | if (seriesKeys.length != seriesCount) |
| 22 | if (categoryKeys.length != categoryCount) | |||||||||||||||
13 | throw new IllegalArgumentException("The number of series keys does not " + "match the number of series in the data."); |
| 23 | throw new IllegalArgumentException("The number of category keys does not match " + "the number of categories in the data."); | |||||||||||||||
14 | this.seriesKeys = seriesKeys; |
| 24 | this.categoryKeys = categoryKeys; | |||||||||||||||
else | else | ||||||||||||||||||
15 | String prefix = resources.getString("series.default-prefix") + " "; |
| 25 | String prefix = resources.getString("categories.default-prefix") + " "; | |||||||||||||||
16 | this.seriesKeys = generateKeys(seriesCount, prefix); |
| 26 | this.categoryKeys = generateKeys(categoryCount, prefix); |
Row | Violation |
---|---|
1 | Expression this.seriesKeys is a field being modified, and thus it cannot be parameterized |
2 | Expression this.categoryKeys is a field being modified, and thus it cannot be parameterized |
3 | Expression this.seriesKeys is a field being modified, and thus it cannot be parameterized |
4 | Expression this.categoryKeys is a field being modified, and thus it cannot be parameterized |