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: int getDomainAxisIndex(ValueAxis)
|
Method name: int getRangeAxisIndex(ValueAxis)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | int result = this.domainAxes.indexOf(axis);↵ | 1 | int result = this.rangeAxes.indexOf(axis);↵ | |
2 | if (result < 0) {↵ | 2 | if (result < 0) {↵ | |
3 | // try the parent plot↵ | 3 | // try the parent plot↵ | |
4 | Plot parent = getParent();↵ | 4 | Plot parent = getParent();↵ | |
5 | if (parent instanceof XYPlot) {↵ | 5 | if (parent instanceof XYPlot) {↵ | |
6 | XYPlot p = (XYPlot) parent;↵ | 6 | XYPlot p = (XYPlot) parent;↵ | |
7 | result = p.getDomainAxisIndex(axis);↵ | 7 | result = p.getRangeAxisIndex(axis);↵ | |
8 | }↵ | 8 | }↵ | |
9 | }↵ | 9 | }↵ | |
10 | return result; | 10 |
| |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 17 |
Number of mapped statements | 7 |
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) | 18.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | int result = this.domainAxes.indexOf(axis); |
| 1 | int result = this.rangeAxes.indexOf(axis); | ||||||||||||
2 | if (result < 0) | 2 | if (result < 0) | |||||||||||||
3 | Plot parent = getParent(); | 3 | Plot parent = getParent(); | |||||||||||||
4 | if (parent instanceof XYPlot) | 4 | if (parent instanceof XYPlot) | |||||||||||||
5 | XYPlot p = (XYPlot)parent; | 5 | XYPlot p = (XYPlot)parent; | |||||||||||||
6 | result = p.getDomainAxisIndex(axis); |
| 6 | result = p.getRangeAxisIndex(axis); | ||||||||||||
7 | return result; | 7 | return result; |
Row | Violation |
---|---|
1 | Expression p.getDomainAxisIndex(axis) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression p.getRangeAxisIndex(axis) cannot be parameterized, because it has dependencies to/from statements that will be extracted |