File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/Plot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/Plot.java | |||
Method name: void setBackgroundPaint(Paint)
|
Method name: void setOutlineStroke(Stroke)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (paint == null) {↵ | 1 | if (stroke == null) {↵ | |
2 | if (this.backgroundPaint != null) {↵ | 2 | if (this.outlineStroke != null) {↵ | |
3 | this.backgroundPaint = null;↵ | 3 | this.outlineStroke = null;↵ | |
4 | fireChangeEvent();↵ | 4 | fireChangeEvent();↵ | |
5 | }↵ | 5 | }↵ | |
6 | }↵ | 6 | }↵ | |
7 | else {↵ | 7 | else {↵ | |
8 | if (this.backgroundPaint != null) {↵ | 8 | if (this.outlineStroke != null) {↵ | |
9 | if (this.backgroundPaint.equals(paint)) {↵ | 9 | if (this.outlineStroke.equals(stroke)) {↵ | |
10 | return; // nothing to do↵ | 10 | return; // nothing to do↵ | |
11 | }↵ | 11 | }↵ | |
12 | }↵ | 12 | }↵ | |
13 | this.backgroundPaint = paint;↵ | 13 | this.outlineStroke = stroke;↵ | |
14 | fireChangeEvent();↵ | 14 | fireChangeEvent();↵ | |
15 | } | 15 |
| |
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 | 25 |
Number of mapped statements | 7 |
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) | 2.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (paint == null) |
| 1 | if (stroke == null) | |||||||||||||||||||||
2 | if (this.backgroundPaint != null) |
| 2 | if (this.outlineStroke != null) | |||||||||||||||||||||
|
| 3 | this.outlineStroke = null; | ||||||||||||||||||||||
3 | this.backgroundPaint = null; |
| | ||||||||||||||||||||||
4 | fireChangeEvent(); | 4 | fireChangeEvent(); | ||||||||||||||||||||||
else | else | ||||||||||||||||||||||||
5 | if (this.backgroundPaint != null) |
| 5 | if (this.outlineStroke != null) | |||||||||||||||||||||
6 | if (this.backgroundPaint.equals(paint)) |
| 6 | if (this.outlineStroke.equals(stroke)) | |||||||||||||||||||||
7 | return; | 7 | return; | ||||||||||||||||||||||
|
| 8 | this.outlineStroke = stroke; | ||||||||||||||||||||||
8 | this.backgroundPaint = paint; |
| | ||||||||||||||||||||||
9 | fireChangeEvent(); | 9 | fireChangeEvent(); |
Row | Violation |
---|---|
1 | Type java.awt.Paint of variable paint does not match with type java.awt.Stroke of variable stroke |
2 | Type java.awt.Paint of variable this.backgroundPaint does not match with type java.awt.Stroke of variable this.outlineStroke |
3 | Unmatched statement this.outlineStroke=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement this.backgroundPaint=null; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Type java.awt.Paint of variable this.backgroundPaint does not match with type java.awt.Stroke of variable this.outlineStroke |
6 | Type java.awt.Paint of variable paint does not match with type java.awt.Stroke of variable stroke |
7 | Type java.awt.Paint of variable this.backgroundPaint does not match with type java.awt.Stroke of variable this.outlineStroke |
8 | Unmatched statement this.outlineStroke=stroke; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
9 | Unmatched statement this.backgroundPaint=paint; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |