File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java | |||
Method name: AxisLocation getDomainAxisLocation(int)
|
Method name: AxisLocation getRangeAxisLocation(int)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | AxisLocation result = null;↵ | 1 | AxisLocation result = null;↵ | |
2 | if (index < this.domainAxisLocations.size()) {↵ | 2 | if (index < this.rangeAxisLocations.size()) {↵ | |
3 | result = (AxisLocation) this.domainAxisLocations.get(index);↵ | 3 | result = (AxisLocation) this.rangeAxisLocations.get(index);↵ | |
4 | }↵ | 4 | }↵ | |
5 | if (result == null) {↵ | 5 | if (result == null) {↵ | |
6 | result = AxisLocation.getOpposite(getDomainAxisLocation(0));↵ | 6 | result = AxisLocation.getOpposite(getRangeAxisLocation(0));↵ | |
7 | }↵ | 7 | }↵ | |
8 | return result; | 8 |
| |
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 | 14 |
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) | 2.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | AxisLocation result = null; | 1 | AxisLocation result = null; | |||||||||||||
2 | if (index < this.domainAxisLocations.size()) |
| 2 | if (index < this.rangeAxisLocations.size()) | ||||||||||||
3 | result = (AxisLocation)this.domainAxisLocations.get(index); |
| 3 | result = (AxisLocation)this.rangeAxisLocations.get(index); | ||||||||||||
4 | if (result == null) | 4 | if (result == null) | |||||||||||||
5 | result = AxisLocation.getOpposite(getDomainAxisLocation(0)); |
| 5 | result = AxisLocation.getOpposite(getRangeAxisLocation(0)); | ||||||||||||
6 | return result; | 6 | return result; |
Row | Violation |
---|---|
1 | Expression getDomainAxisLocation(0) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
2 | Expression getRangeAxisLocation(0) is a method call throwing exception(s) that should be caught by a try block that will be extracted |