File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/DialCap.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: 14 | 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 DialCap)) {↵ | 4 | if (!(obj instanceof GanttRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | DialCap that = (DialCap) obj;↵ | 7 | ↵ | |
8 | if (this.radius != that.radius↵ | 8 | GanttRenderer that = (GanttRenderer) obj;↵ | |
9 | ) {↵ | 9 | if (!PaintUtilities.equal(this.completePaint, that.completePaint)) {↵ | |
10 | return false;↵ | 10 | return false;↵ | |
11 | }↵ | 11 | }↵ | |
12 | if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) {↵ | 12 | if (!PaintUtilities.equal(this.incompletePaint, that.incompletePaint)) {↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) {↵ | 15 | if (this.startPercent != that.startPercent) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (!this.outlineStroke.equals(that.outlineStroke)) {↵ | 18 | if (this.endPercent != that.endPercent) {↵ | |
19 | return false;↵ | 19 | return false;↵ | |
20 | }↵ | 20 | }↵ | |
21 | return super.equals(obj); | 21 |
| |
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) | 3.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 61 |
Number of mapped statements | 11 |
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) | 4.3 |
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 DialCap)) |
| 3 | if (!(obj instanceof GanttRenderer)) | ||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||
5 | DialCap that = (DialCap)obj; |
| 5 | GanttRenderer that = (GanttRenderer)obj; | ||||||||||||||||||
6 | if (this.radius != that.radius) |
| 10 | if (this.startPercent != that.startPercent) | ||||||||||||||||||
7 | return false; | 11 | return false; | |||||||||||||||||||
8 | if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) |
| 8 | if (!PaintUtilities.equal(this.incompletePaint, that.incompletePaint)) | ||||||||||||||||||
9 | return false; | 9 | return false; | |||||||||||||||||||
10 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) |
| 6 | if (!PaintUtilities.equal(this.completePaint, that.completePaint)) | ||||||||||||||||||
11 | return false; | 7 | return false; |
Row | Violation |
---|---|
1 | Expression that.radius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression that.startPercent cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression that.fillPaint 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 | Expression that.outlinePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.completePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Clone fragment #1 returns variable that with type org.jfree.chart.plot.dial.DialCap , while Clone fragment #2 returns variable that with type org.jfree.chart.renderer.category.GanttRenderer |
8 | Not all possible execution flows end in a return statement |
9 | The refactoring of the clones is infeasible, because classes org.jfree.chart.plot.dial.DialCap and org.jfree.chart.renderer.category.GanttRenderer do not have a common superclass |