File path: /jfreechart-1.0.10/src/org/jfree/chart/annotations/CategoryLineAnnotation.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/block/BorderArrangement.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 18 | Number of AST nodes: 16 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof CategoryLineAnnotation)) {↵ | 4 | if (!(obj instanceof BorderArrangement)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | CategoryLineAnnotation that = (CategoryLineAnnotation) obj;↵ | 7 | BorderArrangement that = (BorderArrangement) obj;↵ | |
8 | if (!this.category1.equals(that.getCategory1())) {↵ | 8 | if (!ObjectUtilities.equal(this.topBlock, that.topBlock)) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (this.value1 != that.getValue1()) {↵ | 11 | if (!ObjectUtilities.equal(this.bottomBlock, that.bottomBlock)) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!this.category2.equals(that.getCategory2())) {↵ | 14 | if (!ObjectUtilities.equal(th↵ | |
15 | return false;↵ | |||
16 | }↵ | |||
17 | if (this.value2 != that.getValue2()) {↵ | 15 | is.leftBlock, that.leftBlock)) {↵ | |
18 | return false;↵ | 16 | return false;↵ | |
19 | }↵ | 17 | }↵ | |
20 | if (!PaintUtilities.equal(this.paint, that.paint)) {↵ | 18 | if (!ObjectUtilities.equal(this.rightBlock, that.rightBlock)) {↵ | |
21 | return false;↵ | 19 | return false;↵ | |
22 | }↵ | 20 | }↵ | |
23 | if (!ObjectUtilities.equal(this.stroke, that.stroke)) {↵ | 21 | if (!ObjectUtilities.equal(this.centerBlock, that.centerBlock)) {↵ | |
24 | return false;↵ | 22 | return false;↵ | |
25 | }↵ | 23 | }↵ | |
26 | return true; | 24 |
| |
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) | 4.5 |
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 | 5 |
Number of unmapped statements in the second code fragment | 1 |
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 CategoryLineAnnotation)) |
| 3 | if (!(obj instanceof BorderArrangement)) | |||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||||||
| 5 | BorderArrangement that = (BorderArrangement)obj; | |||||||||||||||||||||||||||||||||
5 | CategoryLineAnnotation that = (CategoryLineAnnotation)obj; | | |||||||||||||||||||||||||||||||||
6 | if (!this.category1.equals(that.getCategory1())) |
| 6 | if (!ObjectUtilities.equal(this.topBlock, that.topBlock)) | |||||||||||||||||||||||||||||||
7 | return false; | 7 | return false; | ||||||||||||||||||||||||||||||||
8 | if (this.value1 != that.getValue1()) | | |||||||||||||||||||||||||||||||||
9 | return false; |
| | ||||||||||||||||||||||||||||||||
10 | if (!this.category2.equals(that.getCategory2())) |
| 10 | if (!ObjectUtilities.equal(this.leftBlock, that.leftBlock)) | |||||||||||||||||||||||||||||||
11 | return false; | 11 | return false; | ||||||||||||||||||||||||||||||||
12 | if (this.value2 != that.getValue2()) | | |||||||||||||||||||||||||||||||||
13 | return false; |
| | ||||||||||||||||||||||||||||||||
14 | if (!PaintUtilities.equal(this.paint, that.paint)) |
| 12 | if (!ObjectUtilities.equal(this.rightBlock, that.rightBlock)) | |||||||||||||||||||||||||||||||
15 | return false; | 13 | return false; | ||||||||||||||||||||||||||||||||
16 | if (!ObjectUtilities.equal(this.stroke, that.stroke)) |
| 8 | if (!ObjectUtilities.equal(this.bottomBlock, that.bottomBlock)) | |||||||||||||||||||||||||||||||
17 | return false; | 9 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.annotations.CategoryLineAnnotation does not match with type org.jfree.chart.block.BorderArrangement |
2 | Expression this.category1.equals(that.getCategory1()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression ObjectUtilities.equal(this.topBlock,that.topBlock) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Unmatched return false; |
5 | Expression this.category2.equals(that.getCategory2()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression ObjectUtilities.equal(this.leftBlock,that.leftBlock) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Unmatched return false; |
8 | Type java.awt.Paint of variable this.paint does not match with type org.jfree.chart.block.Block of variable this.rightBlock |
9 | Type java.awt.Paint of variable that.paint does not match with type org.jfree.chart.block.Block of variable that.rightBlock |
10 | Expression that.paint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.rightBlock cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type java.awt.Paint of variable that.paint does not match with type org.jfree.chart.block.Block of variable that.rightBlock |
13 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ObjectUtilities |
14 | Type java.awt.Stroke of variable this.stroke does not match with type org.jfree.chart.block.Block of variable this.bottomBlock |
15 | Type java.awt.Stroke of variable that.stroke does not match with type org.jfree.chart.block.Block of variable that.bottomBlock |
16 | Expression that.stroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression that.bottomBlock cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Type java.awt.Stroke of variable that.stroke does not match with type org.jfree.chart.block.Block of variable that.bottomBlock |
19 | Not all possible execution flows end in a return statement |