File path: /jfreechart-1.0.10/experimental/org/jfree/experimental/chart/annotations/XYTitleAnnotation.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CyclicNumberAxis.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 20 | Number of AST nodes: 20 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) { ↵ | |
2 | return true;↵ | 2 | return true; ↵ | |
3 | }↵ | 3 | } ↵ | |
4 | if (!(obj instanceof XYTitleAnnotation)) {↵ | 4 | if (!(obj instanceof CyclicNumberAxis)) { ↵ | |
5 | return false;↵ | 5 | return false; ↵ | |
6 | }↵ | 6 | } ↵ | |
7 | XYTitleAnnotation that = (XYTitleAnnotation) obj;↵ | 7 | ↵ | |
8 | if (this.coordinateType != that.coordinateType) {↵ | |||
9 | return false;↵ | |||
10 | ↵ | 8 | if (!super.equals(obj)) {↵ | |
9 | return false;↵ | |||
10 | }↵ | |||
11 | }↵ | 11 | CyclicNumberAxis that = (CyclicNumberAxis) obj; ↵ | |
12 | if (this.x != that.x) {↵ | 12 | if (this.period != that.period) { ↵ | |
13 | return false;↵ | 13 | return false; ↵ | |
14 | }↵ | 14 | } ↵ | |
15 | if (this.y != that.y) {↵ | 15 | if (this.offset != that.offset) { ↵ | |
16 | return false;↵ | 16 | return false; ↵ | |
17 | }↵ | 17 | } ↵ | |
18 | if (this.maxWidth != that.maxWidth↵ | 18 | if (!PaintUtilities.equal(this.advanceLinePaint, ↵ | |
19 | ) {↵ | 19 | that.advanceLinePaint)) { ↵ | |
20 | return false;↵ | 20 | return false; ↵ | |
21 | }↵ | 21 | } ↵ | |
22 | if (this.maxHeight != that.maxHeight↵ | 22 | if (!ObjectUtilities.equal(this.advanceLineStroke, ↵ | |
23 | ) {↵ | 23 | that.advanceLineStroke)) { ↵ | |
24 | return false;↵ | 24 | return false; ↵ | |
25 | }↵ | 25 | } ↵ | |
26 | if (!ObjectUtilities.equal(this.title, that.title)) {↵ | 26 | if (this.advanceLineVisible != that.advanceLineVisible) { ↵ | |
27 | return false;↵ | 27 | return false; ↵ | |
28 | }↵ | 28 | } ↵ | |
29 | if (!this.anchor.equals(that.anchor)) {↵ | 29 | if (this.boundMappedToLastCycle != that.boundMappedToLastCycle) { ↵ | |
30 | return false;↵ | 30 | return false; ↵ | |
31 | }↵ | 31 | } ↵ | |
32 | return super.equals(obj); | 32 | 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) | 7.7 |
Clones location | Clones are in different classes |
Number of node comparisons | 142 |
Number of mapped statements | 17 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 10.5 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 1 | if (obj == this) | |||||||||||||||||||||||||||
2 | return true; | 2 | return true; | |||||||||||||||||||||||||||
3 | if (!(obj instanceof XYTitleAnnotation)) |
| 3 | if (!(obj instanceof CyclicNumberAxis)) | ||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
5 | XYTitleAnnotation that = (XYTitleAnnotation)obj; |
| 7 | CyclicNumberAxis that = (CyclicNumberAxis)obj; | ||||||||||||||||||||||||||
6 | if (this.coordinateType != that.coordinateType) |
| 8 | if (this.period != that.period) | ||||||||||||||||||||||||||
7 | return false; | 9 | return false; | |||||||||||||||||||||||||||
8 | if (this.x != that.x) |
| 10 | if (this.offset != that.offset) | ||||||||||||||||||||||||||
9 | return false; | 11 | return false; | |||||||||||||||||||||||||||
|
| 12 | if (!PaintUtilities.equal(this.advanceLinePaint, that.advanceLinePaint)) | |||||||||||||||||||||||||||
|
| 13 | return false; | |||||||||||||||||||||||||||
10 | if (this.y != that.y) |
| 16 | if (this.advanceLineVisible != that.advanceLineVisible) | ||||||||||||||||||||||||||
11 | return false; | 17 | return false; | |||||||||||||||||||||||||||
12 | if (this.maxWidth != that.maxWidth) |
| 18 | if (this.boundMappedToLastCycle != that.boundMappedToLastCycle) | ||||||||||||||||||||||||||
13 | return false; | 19 | return false; | |||||||||||||||||||||||||||
14 | if (this.maxHeight != that.maxHeight) |
| | |||||||||||||||||||||||||||
15 | return false; |
| | |||||||||||||||||||||||||||
16 | if (!ObjectUtilities.equal(this.title, that.title)) |
| 14 | if (!ObjectUtilities.equal(this.advanceLineStroke, that.advanceLineStroke)) | ||||||||||||||||||||||||||
17 | return false; | 15 | return false; | |||||||||||||||||||||||||||
18 | if (!this.anchor.equals(that.anchor)) |
| 5 | if (!super.equals(obj)) | ||||||||||||||||||||||||||
19 | return false; | 6 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.experimental.chart.util.XYCoordinateType of variable this.coordinateType does not match with type double of variable this.period |
2 | Expression that.coordinateType cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression that.period cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type org.jfree.experimental.chart.util.XYCoordinateType of variable that.coordinateType does not match with type double of variable that.period |
5 | Expression that.x cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.offset cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Unmatched statement if(!PaintUtilities.equal(this.advanceLinePaint,that.advanceLinePaint)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | Unmatched return false; |
9 | Type double of variable this.y does not match with type boolean of variable this.advanceLineVisible |
10 | Expression that.y cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.advanceLineVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type double of variable that.y does not match with type boolean of variable that.advanceLineVisible |
13 | Type double of variable this.maxWidth does not match with type boolean of variable this.boundMappedToLastCycle |
14 | Expression that.maxWidth cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression that.boundMappedToLastCycle cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Type double of variable that.maxWidth does not match with type boolean of variable that.boundMappedToLastCycle |
17 | Unmatched statement if(this.maxHeight != that.maxHeight) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
18 | Unmatched return false; |
19 | Type org.jfree.chart.title.Title of variable this.title does not match with type java.awt.Stroke of variable this.advanceLineStroke |
20 | Expression that.title cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression that.advanceLineStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Type org.jfree.chart.title.Title of variable that.title does not match with type java.awt.Stroke of variable that.advanceLineStroke |
23 | Expression this.anchor.equals(that.anchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
24 | Super method call if(!super.equals(obj)) cannot be extracted from method |
25 | Clone fragment #1 returns variable that with type org.jfree.experimental.chart.annotations.XYTitleAnnotation , while Clone fragment #2 returns variable that with type org.jfree.chart.axis.CyclicNumberAxis |
26 | Not all possible execution flows end in a return statement |
27 | The refactoring of the clones is infeasible, because classes org.jfree.experimental.chart.annotations.XYTitleAnnotation and org.jfree.chart.axis.CyclicNumberAxis do not have a common superclass |