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 chartChanged(ChartChangeEvent)
|
Method name: void chartChanged(ChartChangeEvent)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | this.refreshBuffer = true; ↵ | 1 | this.refreshBuffer = true;↵ | |
2 | Plot plot = this.chart.getPlot(); ↵ | 2 | Plot plot = this.chart.getPlot();↵ | |
3 | if (plot instanceof Zoomable) { ↵ | 3 | if (plot instanceof Zoomable) {↵ | |
4 | Zoomable z = (Zoomable) plot; ↵ | 4 | Zoomable z = (Zoomable) plot;↵ | |
5 | this.orientation = z.getOrientation(); ↵ | 5 | this.orientation = z.getOrientation();↵ | |
6 | } ↵ | 6 | }↵ | |
7 | repaint(); | 7 | this.canvas.redraw(); | |
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 14 |
Number of mapped statements | 6 |
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) | 3.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | this.refreshBuffer = true; | 1 | this.refreshBuffer = true; | ||||||||||||||||||
2 | Plot plot = this.chart.getPlot(); | 2 | Plot plot = this.chart.getPlot(); | ||||||||||||||||||
3 | if (plot instanceof Zoomable) | 3 | if (plot instanceof Zoomable) | ||||||||||||||||||
4 | Zoomable z = (Zoomable)plot; | 4 | Zoomable z = (Zoomable)plot; | ||||||||||||||||||
5 | this.orientation = z.getOrientation(); | 5 | this.orientation = z.getOrientation(); | ||||||||||||||||||
6 | repaint(); |
| 6 | this.canvas.redraw(); |
Row | Violation |
---|---|
1 | Expression repaint() is a void method call, and thus it cannot be parameterized |
2 | Expression this.canvas.redraw() is a void method call, and thus it cannot be parameterized |
3 | Expression repaint() is a void method call, and thus it cannot be parameterized |
4 | Expression this.canvas.redraw() is a void method call, and thus it cannot be parameterized |
5 | 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 |