File path: /jfreechart-1.0.10/src/org/jfree/chart/ChartPanel.java | File path: /jfreechart-1.0.10/swt/org/jfree/experimental/chart/swt/ChartComposite.java | |||
Method name: void setChart(JFreeChart)
|
Method name: void setChart(JFreeChart)
|
|||
Number of AST nodes: 13 | Number of AST nodes: 13 | |||
1 | if (chart != null) { ↵ | 1 | if (chart != null) {↵ | |
2 | this.chart.addChangeListener(this); ↵ | 2 | this.chart.addChangeListener(this);↵ | |
3 | this.chart.addProgressListener(this); ↵ | 3 | this.chart.addProgressListener(this);↵ | |
4 | Plot plot = chart.getPlot(); ↵ | 4 | Plot plot = chart.getPlot();↵ | |
5 | this.domainZoomable = false; ↵ | 5 | this.domainZoomable = false;↵ | |
6 | this.rangeZoomable = false; ↵ | 6 | this.rangeZoomable = false;↵ | |
7 | if (plot instanceof Zoomable) { ↵ | 7 | if (plot instanceof Zoomable) {↵ | |
8 | Zoomable z = (Zoomable) plot; ↵ | 8 | Zoomable z = (Zoomable) plot;↵ | |
9 | this.domainZoomable = z.isDomainZoomable(); ↵ | 9 | this.domainZoomable = z.isDomainZoomable();↵ | |
10 | this.rangeZoomable = z.isRangeZoomable(); ↵ | 10 | this.rangeZoomable = z.isRangeZoomable();↵ | |
11 | this.orientation = z.getOrientation(); ↵ | 11 | this.orientation = z.getOrientation();↵ | |
12 | } ↵ | 12 | }↵ | |
13 | } ↵ | 13 | }↵ | |
14 | else { ↵ | 14 | else {↵ | |
15 | this.domainZoomable = false; ↵ | 15 | this.domainZoomable = false;↵ | |
16 | this.rangeZoomable = false; ↵ | 16 | this.rangeZoomable = false;↵ | |
17 | } | 17 |
| |
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) | 0.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 89 |
Number of mapped statements | 13 |
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) | 53.1 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
5 | if (chart != null) | 5 | if (chart != null) | |
6 | this.chart.addChangeListener(this); | 6 | this.chart.addChangeListener(this); | |
7 | this.chart.addProgressListener(this); | 7 | this.chart.addProgressListener(this); | |
8 | Plot plot = chart.getPlot(); | 8 | Plot plot = chart.getPlot(); | |
9 | this.domainZoomable = false; | 9 | this.domainZoomable = false; | |
10 | this.rangeZoomable = false; | 10 | this.rangeZoomable = false; | |
11 | if (plot instanceof Zoomable) | 11 | if (plot instanceof Zoomable) | |
12 | Zoomable z = (Zoomable)plot; | 12 | Zoomable z = (Zoomable)plot; | |
13 | this.domainZoomable = z.isDomainZoomable(); | 13 | this.domainZoomable = z.isDomainZoomable(); | |
14 | this.rangeZoomable = z.isRangeZoomable(); | 14 | this.rangeZoomable = z.isRangeZoomable(); | |
15 | this.orientation = z.getOrientation(); | 15 | this.orientation = z.getOrientation(); | |
else | else | |||
16 | this.domainZoomable = false; | 16 | this.domainZoomable = false; | |
17 | this.rangeZoomable = false; | 17 | this.rangeZoomable = false; |
Row | Violation |
---|---|
1 | The refactoring of the clones is infeasible, because classes org.jfree.chart.ChartPanel and org.jfree.experimental.chart.swt.ChartComposite do not have a common superclass |