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 setOutlinePaint(Paint)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (paint == null) {↵ | 1 | if (paint == null) {↵ | |
2 | if (this.backgroundPaint != null) {↵ | 2 | if (this.outlinePaint != null) {↵ | |
3 | this.backgroundPaint = null;↵ | 3 | this.outlinePaint = null;↵ | |
4 | fireChangeEvent();↵ | 4 | fireChangeEvent();↵ | |
5 | }↵ | 5 | }↵ | |
6 | }↵ | 6 | }↵ | |
7 | else {↵ | 7 | else {↵ | |
8 | if (this.backgroundPaint != null) {↵ | 8 | if (this.outlinePaint != null) {↵ | |
9 | if (this.backgroundPaint.equals(paint)) {↵ | 9 | if (this.outlinePaint.equals(paint)) {↵ | |
10 | return; // nothing to do↵ | 10 | return; // nothing to do↵ | |
11 | }↵ | 11 | }↵ | |
12 | }↵ | 12 | }↵ | |
13 | this.backgroundPaint = paint;↵ | 13 | this.outlinePaint = paint;↵ | |
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 | 9 |
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) | 2.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (paint == null) | 1 | if (paint == null) | |||||||||||||
2 | if (this.backgroundPaint != null) |
| 2 | if (this.outlinePaint != null) | ||||||||||||
3 | this.backgroundPaint = null; |
| 3 | this.outlinePaint = null; | ||||||||||||
4 | fireChangeEvent(); | 4 | fireChangeEvent(); | |||||||||||||
else | else | |||||||||||||||
5 | if (this.backgroundPaint != null) |
| 5 | if (this.outlinePaint != null) | ||||||||||||
6 | if (this.backgroundPaint.equals(paint)) |
| 6 | if (this.outlinePaint.equals(paint)) | ||||||||||||
7 | return; | 7 | return; | |||||||||||||
8 | this.backgroundPaint = paint; |
| 8 | this.outlinePaint = paint; | ||||||||||||
9 | fireChangeEvent(); | 9 | fireChangeEvent(); |
Row | Violation |
---|---|
1 | Expression this.backgroundPaint is a field being modified, and thus it cannot be parameterized |
2 | Expression this.outlinePaint is a field being modified, and thus it cannot be parameterized |
3 | Expression this.backgroundPaint is a field being modified, and thus it cannot be parameterized |
4 | Expression this.outlinePaint is a field being modified, and thus it cannot be parameterized |