File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/SymbolAxis.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 SymbolAxis)) {↵ | 4 | if (!(obj instanceof GanttRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | SymbolAxis that = (SymbolAxis) obj;↵ | 7 | GanttRenderer that = (GanttRenderer) obj;↵ | |
8 | if (!this.symbols.equals(that.symbols)) {↵ | 8 | if (!PaintUtilities.equal(this.completePaint, that.completePaint)) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (this.gridBandsVisible != that.gridBandsVisible) {↵ | 11 | if (!PaintUtilities.equal(this.incompletePaint, that.incompletePaint)) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!PaintUtilities.equal(this.gridBandPaint, that.gridBandPaint)) {↵ | 14 | if (this.startPercent != that.startPercent) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (!PaintUtilities.equal(this.gridBandAlternatePaint, ↵ | 17 | if (↵ | |
18 | that.gridBandAlternatePaint)) {↵ | 18 | 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.5 |
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) | 5.8 |
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 SymbolAxis)) |
| 3 | if (!(obj instanceof GanttRenderer)) | ||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
5 | SymbolAxis that = (SymbolAxis)obj; |
| 5 | GanttRenderer that = (GanttRenderer)obj; | ||||||||||||||||||||||||||
6 | if (!this.symbols.equals(that.symbols)) |
| 6 | if (!PaintUtilities.equal(this.completePaint, that.completePaint)) | ||||||||||||||||||||||||||
7 | return false; | 7 | return false; | |||||||||||||||||||||||||||
8 | if (this.gridBandsVisible != that.gridBandsVisible) |
| 10 | if (this.startPercent != that.startPercent) | ||||||||||||||||||||||||||
9 | return false; | 11 | return false; | |||||||||||||||||||||||||||
10 | if (!PaintUtilities.equal(this.gridBandPaint, that.gridBandPaint)) |
| 8 | if (!PaintUtilities.equal(this.incompletePaint, that.incompletePaint)) | ||||||||||||||||||||||||||
11 | 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 PaintUtilities.equal(this.completePaint,that.completePaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type boolean of variable this.gridBandsVisible does not match with type double of variable this.startPercent |
4 | Expression that.gridBandsVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.startPercent cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type boolean of variable that.gridBandsVisible does not match with type double of variable that.startPercent |
7 | Expression that.gridBandPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.incompletePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Clone fragment #1 returns variable that with type org.jfree.chart.axis.SymbolAxis , while Clone fragment #2 returns variable that with type org.jfree.chart.renderer.category.GanttRenderer |
10 | Not all possible execution flows end in a return statement |
11 | The refactoring of the clones is infeasible, because classes org.jfree.chart.axis.SymbolAxis and org.jfree.chart.renderer.category.GanttRenderer do not have a common superclass |