File path: /jfreechart-1.0.10/src/org/jfree/chart/JFreeChart.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/JFreeChart.java | |||
Method name: void setBackgroundPaint(Paint)
|
Method name: void setBackgroundImage(Image)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (this.backgroundPaint != null) {↵ | 1 | if (this.backgroundImage != null) {↵ | |
2 | if (!this.backgroundPaint.equals(paint)) {↵ | 2 | if (!this.backgroundImage.equals(image)) {↵ | |
3 | this.backgroundPaint = paint;↵ | 3 | this.backgroundImage = image;↵ | |
4 | fireChartChanged();↵ | 4 | fireChartChanged();↵ | |
5 | }↵ | 5 | }↵ | |
6 | }↵ | 6 | }↵ | |
7 | else {↵ | 7 | else {↵ | |
8 | if (paint != null) {↵ | 8 | if (image != null) {↵ | |
9 | this.backgroundPaint = paint;↵ | 9 | this.backgroundImage = image;↵ | |
10 | fireChartChanged();↵ | 10 | fireChartChanged();↵ | |
11 | }↵ | 11 | }↵ | |
12 | } | 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) | 0.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 21 |
Number of mapped statements | 5 |
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) | 1.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (this.backgroundPaint != null) |
| 1 | if (this.backgroundImage != null) | |||||||||||||||||||||
2 | if (!this.backgroundPaint.equals(paint)) |
| 2 | if (!this.backgroundImage.equals(image)) | |||||||||||||||||||||
|
| 3 | this.backgroundImage = image; | ||||||||||||||||||||||
3 | this.backgroundPaint = paint; |
| | ||||||||||||||||||||||
4 | fireChartChanged(); | 4 | fireChartChanged(); | ||||||||||||||||||||||
else | else | ||||||||||||||||||||||||
5 | if (paint != null) |
| 5 | if (image != null) | |||||||||||||||||||||
|
| 6 | this.backgroundImage = image; | ||||||||||||||||||||||
6 | this.backgroundPaint = paint; |
| | ||||||||||||||||||||||
7 | fireChartChanged(); | 7 | fireChartChanged(); |
Row | Violation |
---|---|
1 | Type java.awt.Paint of variable this.backgroundPaint does not match with type java.awt.Image of variable this.backgroundImage |
2 | Type java.awt.Paint of variable paint does not match with type java.awt.Image of variable image |
3 | Type java.awt.Paint of variable this.backgroundPaint does not match with type java.awt.Image of variable this.backgroundImage |
4 | Unmatched statement this.backgroundImage=image; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement this.backgroundPaint=paint; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Type java.awt.Paint of variable paint does not match with type java.awt.Image of variable image |
7 | Unmatched statement this.backgroundImage=image; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
8 | Unmatched statement this.backgroundPaint=paint; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |