File path: /jfreechart-1.0.10/src/org/jfree/chart/block/BorderArrangement.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/DialTextAnnotation.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 18 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof BorderArrangement)) {↵ | 4 | if (!(obj instanceof DialTextAnnotation)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | BorderArrangement that = (BorderArrangement) obj;↵ | 7 | DialTextAnnotation that = (DialTextAnnotation) obj;↵ | |
8 | if (!ObjectUtilities.equal(this.topBlock, that.topBlock)) {↵ | 8 | if (!this.label.equals(that.label)) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (!ObjectUtilities.equal(this.bottomBlock, that.bottomBlock)) {↵ | 11 | if (!this.font.equals(that.font)) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!ObjectUtilities.equal(this.leftBlock, that.leftBlock)) {↵ | 14 | if (!PaintUtilities.equal(this.paint, that.paint)) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (!ObjectUtilities.equal(this.rightBlock, that.rightBlock)↵ | 17 | if (this.radius != that.radius) {↵ | |
18 | return false;↵ | |||
19 | }↵ | |||
18 | ) {↵ | 20 | if (this.angle != that.angle) {↵ | |
19 | return false;↵ | 21 | return false;↵ | |
20 | }↵ | 22 | }↵ | |
21 | if (!ObjectUtilities.equal(this.centerBlock, that.centerBlock)) {↵ | 23 | if (!this.anchor.equals(that.anchor)) {↵ | |
22 | return false;↵ | 24 | return false;↵ | |
23 | }↵ | 25 | }↵ | |
24 | return true; | 26 | return super.equals(obj); | |
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.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 105 |
Number of mapped statements | 12 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 4.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 BorderArrangement)) |
| 3 | if (!(obj instanceof DialTextAnnotation)) | |||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||||||
| 5 | DialTextAnnotation that = (DialTextAnnotation)obj; | |||||||||||||||||||||||||||||||||
5 | BorderArrangement that = (BorderArrangement)obj; | | |||||||||||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.topBlock, that.topBlock)) |
| 10 | if (!PaintUtilities.equal(this.paint, that.paint)) | |||||||||||||||||||||||||||||||
7 | return false; | 11 | return false; | ||||||||||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.bottomBlock, that.bottomBlock)) |
| 8 | if (!this.font.equals(that.font)) | |||||||||||||||||||||||||||||||
9 | return false; | 9 | return false; | ||||||||||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.leftBlock, that.leftBlock)) |
| 6 | if (!this.label.equals(that.label)) | |||||||||||||||||||||||||||||||
11 | return false; | 7 | return false; | ||||||||||||||||||||||||||||||||
| 12 | if (this.radius != that.radius) | |||||||||||||||||||||||||||||||||
|
| 13 | return false; | ||||||||||||||||||||||||||||||||
| 14 | if (this.angle != that.angle) | |||||||||||||||||||||||||||||||||
|
| 15 | return false; | ||||||||||||||||||||||||||||||||
12 | if (!ObjectUtilities.equal(this.rightBlock, that.rightBlock)) |
| 16 | if (!this.anchor.equals(that.anchor)) | |||||||||||||||||||||||||||||||
13 | return false; | 17 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.block.BorderArrangement does not match with type org.jfree.chart.plot.dial.DialTextAnnotation |
2 | Type org.jfree.chart.block.Block of variable this.topBlock does not match with type java.awt.Paint of variable this.paint |
3 | Type org.jfree.chart.block.Block of variable that.topBlock does not match with type java.awt.Paint of variable that.paint |
4 | Expression that.topBlock cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.paint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type org.jfree.chart.block.Block of variable that.topBlock does not match with type java.awt.Paint of variable that.paint |
7 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
8 | Expression ObjectUtilities.equal(this.bottomBlock,that.bottomBlock) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression this.font.equals(that.font) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression ObjectUtilities.equal(this.leftBlock,that.leftBlock) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression this.label.equals(that.label) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Unmatched return false; |
13 | Unmatched return false; |
14 | Expression ObjectUtilities.equal(this.rightBlock,that.rightBlock) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression this.anchor.equals(that.anchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Not all possible execution flows end in a return statement |
17 | The refactoring of the clones is infeasible, because classes org.jfree.chart.block.BorderArrangement and org.jfree.chart.plot.dial.DialTextAnnotation do not have a common superclass |