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: 9 | Number of AST nodes: 9 | |||
1 | Axis domainAxis = null; ↵ | 1 | Axis domainAxis = null;↵ | |
2 | if (plot instanceof CategoryPlot) { ↵ | 2 | if (plot instanceof CategoryPlot) {↵ | |
3 | CategoryPlot p = (CategoryPlot) plot; ↵ | 3 | CategoryPlot p = (CategoryPlot) plot;↵ | |
4 | domainAxis = p.getDomainAxis(); ↵ | 4 | domainAxis = p.getDomainAxis();↵ | |
5 | } ↵ | 5 | }↵ | |
6 | else if (plot instanceof XYPlot) { ↵ | 6 | else if (plot instanceof XYPlot) {↵ | |
7 | XYPlot p = (XYPlot) plot; ↵ | 7 | XYPlot p = (XYPlot) plot;↵ | |
8 | domainAxis = p.getDomainAxis(); ↵ | 8 | domainAxis = p.getDomainAxis();↵ | |
9 | } ↵ | 9 | }↵ | |
10 | if (domainAxis != null) { ↵ | 10 | if (domainAxis != null)↵ | |
11 | this.domainAxisPropertyPanel.setAxisProperties(domainAxis);↵ | 11 |
| |
12 | } | |||
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.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 38 |
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) | 4.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | Axis domainAxis = null; | 5 | Axis domainAxis = null; | ||||||||||||
7 | if (plot instanceof CategoryPlot) | 6 | if (plot instanceof CategoryPlot) | ||||||||||||
8 | CategoryPlot p = (CategoryPlot)plot; | 7 | CategoryPlot p = (CategoryPlot)plot; | ||||||||||||
9 | domainAxis = p.getDomainAxis(); | 8 | domainAxis = p.getDomainAxis(); | ||||||||||||
10 | else if (plot instanceof XYPlot) | 9 | else if (plot instanceof XYPlot) | ||||||||||||
11 | XYPlot p = (XYPlot)plot; | 10 | XYPlot p = (XYPlot)plot; | ||||||||||||
12 | domainAxis = p.getDomainAxis(); | 11 | domainAxis = p.getDomainAxis(); | ||||||||||||
13 | if (domainAxis != null) | 12 | if (domainAxis != null) | ||||||||||||
14 | this.domainAxisPropertyPanel.setAxisProperties(domainAxis); |
| 13 | this.domainAxisPropertyPanel.setAxisProperties(domainAxis); |
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.domainAxisPropertyPanel |
2 | 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 |