File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CategoryTick.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/ItemLabelPosition.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 14 | |||
1 | if (this == obj) {↵ | 1 | if (obj == this) {↵ | |
2 | return true; ↵ | 2 | return true;↵ | |
3 | }↵ | 3 | } ↵ | |
4 | if (obj instanceof CategoryTick && super.equals(obj)) {↵ | 4 | if (!(obj instanceof ↵ | |
5 | CategoryTick that = (CategoryTick) obj; ↵ | |||
6 | ↵ | 5 | ItemLabelPosition)) {↵ | |
6 | return false;↵ | |||
7 | }↵ | |||
8 | ItemLabelPosition that = (ItemLabelPosition) obj;↵ | |||
7 | if (!ObjectUtilities.equal(this.category, that.category)) {↵ | 9 | if (!this.itemLabelAnchor.equals(that.itemLabelAnchor)) {↵ | |
8 | return false; ↵ | 10 | return false;↵ | |
9 | ↵ | |||
10 | }↵ | 11 | }↵ | |
11 | if (!ObjectUtilities.equal(this.label, that.label)) {↵ | 12 | if (!this.textAnchor.equals(that.textAnchor)) {↵ | |
12 | return false; ↵ | 13 | return false;↵ | |
13 | }↵ | 14 | }↵ | |
14 | if (!ObjectUtilities.equal(this.labelAnchor, that.labelAnchor)) {↵ | 15 | if (!this.rotationAnchor.equals(that.rotationAnchor)) {↵ | |
15 | return false;↵ | 16 | return false;↵ | |
16 | ↵ | 17 | }↵ | |
17 | }↵ | 18 | if (this.angle != that.angle) {↵ | |
18 | return true;↵ | 19 | return false;↵ | |
19 | }↵ | 20 | } ↵ | |
20 | return false; | 21 | 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) | 1.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 37 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 8.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | CategoryTick that = (CategoryTick)obj; | | ||||||||||||||
5 | if (!ObjectUtilities.equal(this.category, that.category)) |
| 3 | if (!(obj instanceof ItemLabelPosition)) | ||||||||||||
6 | return false; | 4 | return false; | |||||||||||||
| 5 | ItemLabelPosition that = (ItemLabelPosition)obj; | ||||||||||||||
7 | if (!ObjectUtilities.equal(this.label, that.label)) |
| 6 | if (!this.itemLabelAnchor.equals(that.itemLabelAnchor)) | ||||||||||||
8 | return false; | 7 | return false; | |||||||||||||
9 | if (!ObjectUtilities.equal(this.labelAnchor, that.labelAnchor)) |
| 8 | if (!this.textAnchor.equals(that.textAnchor)) | ||||||||||||
10 | return false; | 9 | return false; |
Row | Violation |
---|---|
1 | Expression ObjectUtilities.equal(this.category,that.category) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ObjectUtilities.equal(this.label,that.label) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression this.itemLabelAnchor.equals(that.itemLabelAnchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression ObjectUtilities.equal(this.labelAnchor,that.labelAnchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression this.textAnchor.equals(that.textAnchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Not all possible execution flows end in a return statement |