File path: /jfreechart-1.0.10/src/org/jfree/chart/annotations/XYLineAnnotation.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 (!super.equals(obj)) {↵ | 4 | if (!(obj instanceof CyclicNumberAxis)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!(obj instanceof XYLineAnnotation)) {↵ | 7 | if (!super.equals(obj)) {↵ | |
8 | return false;↵ | 8 | return false;↵ | |
9 | }↵ | 9 | }↵ | |
10 | XYLineAnnotation that = (XYLineAnnotation) obj;↵ | 10 | CyclicNumberAxis that = (CyclicNumberAxis) obj; ↵ | |
11 | if (this.x1 != that.x1) {↵ | 11 | if (this.period != that.period) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (this.y1 != that.y1) {↵ | 14 | if (this.offset != that.offset) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (this.x2 != that.x2) {↵ | 17 | if (↵ | |
18 | return false;↵ | |||
19 | }↵ | |||
20 | if (this.y2 != that.y2↵ | 18 | !PaintUtilities.equal(this.advanceLinePaint, ↵ | |
19 | that.advanceLinePaint)) {↵ | |||
20 | return false;↵ | |||
21 | }↵ | |||
22 | if (!ObjectUtilities.equal(this.advanceLineStroke, ↵ | |||
21 | ) {↵ | 23 | that.advanceLineStroke)) {↵ | |
22 | return false;↵ | 24 | return false;↵ | |
23 | }↵ | 25 | }↵ | |
24 | if (!PaintUtilities.equal(this.paint, that.paint)) {↵ | 26 | if (this.advanceLineVisible != that.advanceLineVisible) {↵ | |
25 | return false;↵ | 27 | return false;↵ | |
26 | }↵ | 28 | }↵ | |
27 | if (!ObjectUtilities.equal(this.stroke, that.stroke)) {↵ | 29 | if (this.boundMappedToLastCycle != that.boundMappedToLastCycle) {↵ | |
28 | return false;↵ | 30 | return false;↵ | |
29 | }↵ | 31 | }↵ | |
30 | // seems to be the same...↵ | |||
31 | return true; | 32 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 148 |
Number of mapped statements | 20 |
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) | 8.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 (!super.equals(obj)) |
| 5 | if (!super.equals(obj)) | ||||||||||||||||||||||||||
4 | return false; | 6 | return false; | |||||||||||||||||||||||||||
5 | if (!(obj instanceof XYLineAnnotation)) |
| 3 | if (!(obj instanceof CyclicNumberAxis)) | ||||||||||||||||||||||||||
6 | return false; | 4 | return false; | |||||||||||||||||||||||||||
7 | XYLineAnnotation that = (XYLineAnnotation)obj; |
| 7 | CyclicNumberAxis that = (CyclicNumberAxis)obj; | ||||||||||||||||||||||||||
8 | if (this.x1 != that.x1) |
| 8 | if (this.period != that.period) | ||||||||||||||||||||||||||
9 | return false; | 9 | return false; | |||||||||||||||||||||||||||
10 | if (this.y1 != that.y1) |
| 10 | if (this.offset != that.offset) | ||||||||||||||||||||||||||
11 | return false; | 11 | return false; | |||||||||||||||||||||||||||
12 | if (this.x2 != that.x2) |
| 16 | if (this.advanceLineVisible != that.advanceLineVisible) | ||||||||||||||||||||||||||
13 | return false; | 17 | return false; | |||||||||||||||||||||||||||
14 | if (this.y2 != that.y2) |
| 18 | if (this.boundMappedToLastCycle != that.boundMappedToLastCycle) | ||||||||||||||||||||||||||
15 | return false; | 19 | return false; | |||||||||||||||||||||||||||
16 | if (!PaintUtilities.equal(this.paint, that.paint)) |
| 12 | if (!PaintUtilities.equal(this.advanceLinePaint, that.advanceLinePaint)) | ||||||||||||||||||||||||||
17 | return false; | 13 | return false; | |||||||||||||||||||||||||||
18 | if (!ObjectUtilities.equal(this.stroke, that.stroke)) |
| 14 | if (!ObjectUtilities.equal(this.advanceLineStroke, that.advanceLineStroke)) | ||||||||||||||||||||||||||
19 | return false; | 15 | return false; | |||||||||||||||||||||||||||
20 | return true; | 20 | return true; |
Row | Violation |
---|---|
1 | Super method call if(!super.equals(obj)) cannot be extracted from method |
2 | Super method call if(!super.equals(obj)) cannot be extracted from method |
3 | Expression that.x1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression that.period cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.y1 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 | Type double of variable this.x2 does not match with type boolean of variable this.advanceLineVisible |
8 | Expression that.x2 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.advanceLineVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Type double of variable that.x2 does not match with type boolean of variable that.advanceLineVisible |
11 | Type double of variable this.y2 does not match with type boolean of variable this.boundMappedToLastCycle |
12 | Expression that.y2 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression that.boundMappedToLastCycle cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Type double of variable that.y2 does not match with type boolean of variable that.boundMappedToLastCycle |
15 | Expression that.paint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression that.advanceLinePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression that.stroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression that.advanceLineStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | The refactoring of the clones is infeasible, because classes org.jfree.chart.annotations.XYLineAnnotation and org.jfree.chart.axis.CyclicNumberAxis do not have a common superclass |