File path: /jfreechart-1.0.10/src/org/jfree/chart/JFreeChart.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/WaferMapPlot.java | |||
Method name: void setTitle(TextTitle)
|
Method name: void setRenderer(WaferMapRenderer)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (this.title != null) {↵ | 1 | if (this.renderer != null) {↵ | |
2 | this.title.removeChangeListener(this);↵ | 2 | this.renderer.removeChangeListener(this);↵ | |
3 | }↵ | 3 | }↵ | |
4 | this.title = title;↵ | 4 | this.renderer = renderer;↵ | |
5 | if (title != null) {↵ | 5 | if (renderer != null) {↵ | |
6 | title.addChangeListener(this);↵ | 6 | renderer.setPlot(this);↵ | |
7 | }↵ | 7 | }↵ | |
8 | fireChartChanged(); | 8 | fireChangeEvent(); | |
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.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 14 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 17.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (this.title != null) |
| 1 | if (this.renderer != null) | ||||||||||||||
2 | this.title.removeChangeListener(this); |
| 2 | this.renderer.removeChangeListener(this); | ||||||||||||||
|
| 3 | this.renderer = renderer; | |||||||||||||||
3 | this.title = title; |
| | |||||||||||||||
4 | if (title != null) |
| 4 | if (renderer != null) | ||||||||||||||
|
| 5 | renderer.setPlot(this); | |||||||||||||||
5 | title.addChangeListener(this); |
| | |||||||||||||||
6 | fireChartChanged(); |
| 6 | fireChangeEvent(); |
Row | Violation |
---|---|
1 | Type org.jfree.chart.title.TextTitle of variable this.title does not match with type org.jfree.chart.renderer.WaferMapRenderer of variable this.renderer |
2 | Type org.jfree.chart.title.TextTitle of variable this.title does not match with type org.jfree.chart.renderer.WaferMapRenderer of variable this.renderer |
3 | Unmatched statement this.renderer=renderer; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement this.title=title; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Type org.jfree.chart.title.TextTitle of variable title does not match with type org.jfree.chart.renderer.WaferMapRenderer of variable renderer |
6 | Unmatched statement renderer.setPlot(this); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | Unmatched statement title.addChangeListener(this); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
8 | Expression fireChartChanged() is a void method call, and thus it cannot be parameterized |
9 | Expression fireChangeEvent() is a void method call, and thus it cannot be parameterized |
10 | The refactoring of the clones is infeasible, because classes org.jfree.chart.JFreeChart and org.jfree.chart.plot.WaferMapPlot do not have a common superclass |