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