File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYBoxAndWhiskerRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/data/gantt/Task.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 (object == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof XYBoxAndWhiskerRenderer)) {↵ | 4 | if (!(object instanceof Task)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!super.equals(obj)) {↵ | 7 | ↵ | |
8 | return false;↵ | |||
9 | }↵ | |||
10 | XYBoxAndWhiskerRenderer that = (XYBoxAndWhiskerRenderer) obj;↵ | 8 | Task that = (Task) object;↵ | |
11 | if (this.boxWidth != that.getBoxWidth()) {↵ | 9 | if (!ObjectUtilities.equal(this.description, that.description)) {↵ | |
12 | return false;↵ | 10 | return false;↵ | |
13 | }↵ | 11 | }↵ | |
14 | if (!PaintUtilities.equal(this.boxPaint, that.boxPaint)) {↵ | 12 | if (!ObjectUtilities.equal(this.duration, that.duration)) {↵ | |
15 | return false;↵ | 13 | return false;↵ | |
16 | }↵ | 14 | }↵ | |
17 | if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint↵ | 15 | if (!ObjectUtilities.equal(this.percentComplete, ↵ | |
18 | )) {↵ | 16 | that.percentComplete)) {↵ | |
19 | return false;↵ | 17 | return false;↵ | |
20 | }↵ | 18 | }↵ | |
21 | if (this.fillBox != that.fillBox) {↵ | 19 | if (!ObjectUtilities.equal(this.subtasks, that.subtasks)) {↵ | |
22 | return false;↵ | 20 | return false;↵ | |
23 | }↵ | 21 | }↵ | |
24 | return true; | 22 |
| |
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 76 |
Number of mapped statements | 10 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 4.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) |
| 1 | if (object == this) | ||||||||||||||||||||||||||||||
2 | return true; | 2 | return true; | |||||||||||||||||||||||||||||||
3 | if (!(obj instanceof XYBoxAndWhiskerRenderer)) |
| 3 | if (!(object instanceof Task)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
| 5 | Task that = (Task)object; | ||||||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) |
| 6 | if (!ObjectUtilities.equal(this.description, that.description)) | ||||||||||||||||||||||||||||||
6 | return false; | 7 | return false; | |||||||||||||||||||||||||||||||
7 | XYBoxAndWhiskerRenderer that = (XYBoxAndWhiskerRenderer)obj; | | ||||||||||||||||||||||||||||||||
8 | if (this.boxWidth != that.getBoxWidth()) | | ||||||||||||||||||||||||||||||||
9 | return false; |
| | |||||||||||||||||||||||||||||||
10 | if (!PaintUtilities.equal(this.boxPaint, that.boxPaint)) |
| 10 | if (!ObjectUtilities.equal(this.percentComplete, that.percentComplete)) | ||||||||||||||||||||||||||||||
11 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
12 | if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint)) |
| 8 | if (!ObjectUtilities.equal(this.duration, that.duration)) | ||||||||||||||||||||||||||||||
13 | return false; | 9 | return false; |
Row | Violation |
---|---|
1 | Expression ObjectUtilities.equal(this.description,that.description) 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 | Unmatched return false; |
4 | Type java.awt.Paint of variable this.boxPaint does not match with type java.lang.Double of variable this.percentComplete |
5 | Expression that.boxPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.percentComplete cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Type java.awt.Paint of variable that.boxPaint does not match with type java.lang.Double of variable that.percentComplete |
8 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ObjectUtilities |
9 | Type java.awt.Paint of variable this.artifactPaint does not match with type org.jfree.data.time.TimePeriod of variable this.duration |
10 | Expression that.artifactPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.duration cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type java.awt.Paint of variable that.artifactPaint does not match with type org.jfree.data.time.TimePeriod of variable that.duration |
13 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ObjectUtilities |
14 | Not all possible execution flows end in a return statement |
15 | The refactoring of the clones is infeasible, because classes org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer and org.jfree.data.gantt.Task do not have a common superclass |