File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/GanttRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 14 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof BoxAndWhiskerRenderer)) {↵ | 4 | if (!(obj instanceof GanttRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!super.equals(obj)) {↵ | 7 | ↵ | |
8 | return false;↵ | |||
9 | }↵ | |||
10 | BoxAndWhiskerRenderer that = (BoxAndWhiskerRenderer) obj;↵ | 8 | GanttRenderer that = (GanttRenderer) obj;↵ | |
11 | if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint)) {↵ | 9 | if (!PaintUtilities.equal(this.completePaint, that.completePaint)) {↵ | |
12 | return false;↵ | 10 | return false;↵ | |
13 | }↵ | 11 | }↵ | |
14 | if (this.fillBox != that.fillBox) {↵ | 12 | if (!PaintUtilities.equal(this.incompletePaint, that.incompletePaint)) {↵ | |
15 | return false;↵ | 13 | return false;↵ | |
16 | }↵ | 14 | }↵ | |
17 | if (this.itemMargin != that.itemMargin) {↵ | 15 | if (this.startPercent != that.startPercent) {↵ | |
18 | return false;↵ | 16 | return false;↵ | |
19 | }↵ | 17 | }↵ | |
20 | if (this.maximumBarWidth != that.maximumBarWidth) {↵ | 18 | if (this.endPercent != that.endPercent) {↵ | |
21 | return false;↵ | 19 | return false;↵ | |
22 | }↵ | 20 | }↵ | |
23 | return true; | 21 | return super.equals(obj); | |
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) | 4.8 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 76 |
Number of mapped statements | 13 |
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) | 5.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 1 | if (obj == this) | |||||||||||||||||||||||||||
2 | return true; | 2 | return true; | |||||||||||||||||||||||||||
3 | if (!(obj instanceof BoxAndWhiskerRenderer)) |
| 3 | if (!(obj instanceof GanttRenderer)) | ||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
| 5 | GanttRenderer that = (GanttRenderer)obj; | ||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) |
| 6 | if (!PaintUtilities.equal(this.completePaint, that.completePaint)) | ||||||||||||||||||||||||||
6 | return false; | 7 | return false; | |||||||||||||||||||||||||||
7 | BoxAndWhiskerRenderer that = (BoxAndWhiskerRenderer)obj; | | ||||||||||||||||||||||||||||
8 | if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint)) |
| 8 | if (!PaintUtilities.equal(this.incompletePaint, that.incompletePaint)) | ||||||||||||||||||||||||||
9 | return false; | 9 | return false; | |||||||||||||||||||||||||||
10 | if (this.fillBox != that.fillBox) |
| 10 | if (this.startPercent != that.startPercent) | ||||||||||||||||||||||||||
11 | return false; | 11 | return false; | |||||||||||||||||||||||||||
12 | if (this.itemMargin != that.itemMargin) |
| 12 | if (this.endPercent != that.endPercent) | ||||||||||||||||||||||||||
13 | return false; | 13 | return false; | |||||||||||||||||||||||||||
16 | return true; |
| 14 | return super.equals(obj); |
Row | Violation |
---|---|
1 | Expression PaintUtilities.equal(this.completePaint,that.completePaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Super method call if(!super.equals(obj)) cannot be extracted from method |
3 | Expression that.artifactPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression that.incompletePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type boolean of variable this.fillBox does not match with type double of variable this.startPercent |
6 | Expression that.fillBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.startPercent cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type boolean of variable that.fillBox does not match with type double of variable that.startPercent |
9 | Expression that.itemMargin cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression that.endPercent cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Super method call return super.equals(obj); cannot be extracted from method |
12 | Not all possible execution flows end in a return statement |