File path: /jfreechart-1.0.10/src/org/jfree/chart/editor/DefaultPlotEditor.java | File path: /jfreechart-1.0.10/swt/org/jfree/experimental/chart/swt/editor/SWTPlotEditor.java | |||
Method name: void updatePlotProperties(Plot)
|
Method name: void updatePlotProperties(Plot)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | if (this.domainAxisPropertyPanel != null) { ↵ | 1 | if (this.rangeAxisPropertyPanel != null) {↵ | |
2 | Axis domainAxis = null; ↵ | 2 | Axis rangeAxis = null;↵ | |
3 | if (plot instanceof CategoryPlot) { ↵ | 3 | if (plot instanceof CategoryPlot) {↵ | |
4 | CategoryPlot p = (CategoryPlot) plot; ↵ | 4 | CategoryPlot p = (CategoryPlot) plot;↵ | |
5 | domainAxis = p.getDomainAxis(); ↵ | 5 | rangeAxis = p.getRangeAxis();↵ | |
6 | } ↵ | 6 | }↵ | |
7 | else if (plot instanceof XYPlot) { ↵ | 7 | else if (plot instanceof XYPlot) {↵ | |
8 | XYPlot p = (XYPlot) plot; ↵ | 8 | XYPlot p = (XYPlot) plot;↵ | |
9 | domainAxis = p.getDomainAxis(); ↵ | 9 | rangeAxis = p.getRangeAxis();↵ | |
10 | } ↵ | 10 | }↵ | |
11 | if (domainAxis != null) { ↵ | 11 | if (rangeAxis != null)↵ | |
12 | this.domainAxisPropertyPanel.setAxisProperties(domainAxis);↵ | 12 | this.rangeAxisPropertyPanel.setAxisProperties(↵ | |
13 | } ↵ | 13 | rangeAxis);↵ | |
14 | } | 14 |
| |
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) | 1.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 40 |
Number of mapped statements | 10 |
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) | 103.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | if (this.domainAxisPropertyPanel != null) |
| 14 | if (this.rangeAxisPropertyPanel != null) | |||||||||||||||||
6 | Axis domainAxis = null; |
| 15 | Axis rangeAxis = null; | |||||||||||||||||
7 | if (plot instanceof CategoryPlot) | 16 | if (plot instanceof CategoryPlot) | ||||||||||||||||||
8 | CategoryPlot p = (CategoryPlot)plot; | 17 | CategoryPlot p = (CategoryPlot)plot; | ||||||||||||||||||
9 | domainAxis = p.getDomainAxis(); |
| 18 | rangeAxis = p.getRangeAxis(); | |||||||||||||||||
10 | else if (plot instanceof XYPlot) | 19 | else if (plot instanceof XYPlot) | ||||||||||||||||||
11 | XYPlot p = (XYPlot)plot; | 20 | XYPlot p = (XYPlot)plot; | ||||||||||||||||||
12 | domainAxis = p.getDomainAxis(); |
| 21 | rangeAxis = p.getRangeAxis(); | |||||||||||||||||
13 | if (domainAxis != null) |
| 22 | if (rangeAxis != null) | |||||||||||||||||
14 | this.domainAxisPropertyPanel.setAxisProperties(domainAxis); |
| 23 | this.rangeAxisPropertyPanel.setAxisProperties(rangeAxis); |
Row | Violation |
---|---|
1 | Type org.jfree.chart.editor.DefaultAxisEditor of variable this.domainAxisPropertyPanel does not match with type org.jfree.experimental.chart.swt.editor.SWTAxisEditor of variable this.rangeAxisPropertyPanel |
2 | Expression p.getDomainAxis() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression p.getRangeAxis() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression p.getDomainAxis() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression p.getRangeAxis() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type org.jfree.chart.editor.DefaultAxisEditor of variable this.domainAxisPropertyPanel does not match with type org.jfree.experimental.chart.swt.editor.SWTAxisEditor of variable this.rangeAxisPropertyPanel |
7 | The refactoring of the clones is infeasible, because classes org.jfree.chart.editor.DefaultPlotEditor and org.jfree.experimental.chart.swt.editor.SWTPlotEditor do not have a common superclass |