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