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 getDomainAxis(int)
|
Method name: ValueAxis getRangeAxis(int)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | ValueAxis result = null;↵ | 1 | ValueAxis result = null;↵ | |
2 | if (index < this.domainAxes.size()) {↵ | 2 | if (index < this.rangeAxes.size()) {↵ | |
3 | result = (ValueAxis) this.domainAxes.get(index);↵ | 3 | result = (ValueAxis) this.rangeAxes.get(index);↵ | |
4 | }↵ | 4 | }↵ | |
5 | if (result == null) {↵ | 5 | if (result == null) {↵ | |
6 | Plot parent = getParent();↵ | 6 | Plot parent = getParent();↵ | |
7 | if (parent instanceof XYPlot) {↵ | 7 | if (parent instanceof XYPlot) {↵ | |
8 | XYPlot xy = (XYPlot) parent;↵ | 8 | XYPlot xy = (XYPlot) parent;↵ | |
9 | result = xy.getDomainAxis(index);↵ | 9 | result = xy.getRangeAxis(index);↵ | |
10 | }↵ | 10 | }↵ | |
11 | }↵ | 11 | }↵ | |
12 | return result; | 12 |
| |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 21 |
Number of mapped statements | 9 |
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) | 19.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | ValueAxis result = null; | 1 | ValueAxis result = null; | |||||||||||||
2 | if (index < this.domainAxes.size()) |
| 2 | if (index < this.rangeAxes.size()) | ||||||||||||
3 | result = (ValueAxis)this.domainAxes.get(index); |
| 3 | result = (ValueAxis)this.rangeAxes.get(index); | ||||||||||||
4 | if (result == null) | 4 | if (result == null) | |||||||||||||
5 | Plot parent = getParent(); | 5 | Plot parent = getParent(); | |||||||||||||
6 | if (parent instanceof XYPlot) | 6 | if (parent instanceof XYPlot) | |||||||||||||
7 | XYPlot xy = (XYPlot)parent; | 7 | XYPlot xy = (XYPlot)parent; | |||||||||||||
8 | result = xy.getDomainAxis(index); |
| 8 | result = xy.getRangeAxis(index); | ||||||||||||
9 | return result; | 9 | return result; |
Row | Violation |
---|---|
1 | Expression xy.getDomainAxis(index) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression xy.getRangeAxis(index) cannot be parameterized, because it has dependencies to/from statements that will be extracted |