File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java | |||
Method name: ValueAxis getDomainAxisForDataset(int)
|
Method name: ValueAxis getRangeAxisForDataset(int)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (index < 0 || index >= getDatasetCount()) {↵ | 1 | if (index < 0 || index >= getDatasetCount()) {↵ | |
2 | throw new IllegalArgumentException("Index " + index↵ | 2 | throw new IllegalArgumentException("Index " + index↵ | |
3 | + " out of bounds.");↵ | 3 | + " out of bounds.");↵ | |
4 | }↵ | 4 | }↵ | |
5 | ValueAxis valueAxis = null;↵ | 5 | ValueAxis valueAxis = null;↵ | |
6 | Integer axisIndex↵ | 6 | Integer axisIndex↵ | |
7 | = (Integer) this.datasetToDomainAxisMap.get(↵ | 7 | = (Integer) this.datasetToRangeAxisMap.get(↵ | |
8 | new Integer(index));↵ | 8 | new Integer(index));↵ | |
9 | if (axisIndex != null) {↵ | 9 | if (axisIndex != null) {↵ | |
10 | valueAxis = getDomainAxis(axisIndex.intValue());↵ | 10 | valueAxis = getRangeAxis(axisIndex.intValue());↵ | |
11 | }↵ | 11 | }↵ | |
12 | else {↵ | 12 | else {↵ | |
13 | valueAxis = getDomainAxis(0);↵ | 13 | valueAxis = getRangeAxis(0);↵ | |
14 | }↵ | 14 | }↵ | |
15 | return valueAxis; | 15 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 20 |
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) | 4.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (index < 0 || index >= getDatasetCount()) | 1 | if (index < 0 || index >= getDatasetCount()) | |||||||||||||
2 | throw new IllegalArgumentException("Index " + index + " out of bounds."); | 2 | throw new IllegalArgumentException("Index " + index + " out of bounds."); | |||||||||||||
3 | ValueAxis valueAxis = null; | 3 | ValueAxis valueAxis = null; | |||||||||||||
4 | Integer axisIndex = (Integer)this.datasetToDomainAxisMap.get(new Integer(index)); |
| 4 | Integer axisIndex = (Integer)this.datasetToRangeAxisMap.get(new Integer(index)); | ||||||||||||
5 | if (axisIndex != null) | 5 | if (axisIndex != null) | |||||||||||||
6 | valueAxis = getDomainAxis(axisIndex.intValue()); |
| 6 | valueAxis = getRangeAxis(axisIndex.intValue()); | ||||||||||||
else | else | |||||||||||||||
7 | valueAxis = getDomainAxis(0); |
| 7 | valueAxis = getRangeAxis(0); | ||||||||||||
8 | return valueAxis; | 8 | return valueAxis; |
Row | Violation |
---|---|
1 | Expression getDomainAxis(axisIndex.intValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression getRangeAxis(axisIndex.intValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |