File path: /jfreechart-1.0.10/src/org/jfree/data/ComparableObjectSeries.java | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/XYSeries.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 16 | 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 ComparableObjectSeries)) {↵ | 4 | if (!(obj instanceof XYSeries)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!super.equals(obj)) {↵ | 7 | if (!super.equals(obj)) {↵ | |
8 | return false;↵ | 8 | return false;↵ | |
9 | }↵ | 9 | }↵ | |
10 | ComparableObjectSeries that = (ComparableObjectSeries) obj;↵ | 10 | XYSeries that = (XYSeries) obj;↵ | |
11 | if (this.maximumItemCount != that.maximumItemCount) {↵ | 11 | if (this.maximumItemCount != that.maximumItemCount) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (this.autoSort != that.autoSort) {↵ | 14 | if (this.autoSort != that.autoSort) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (this.allowDuplicateXValues != that.allowDuplicateXValues) {↵ | 17 | if (this.allowDuplicateXValues != that.allowDuplicateXValues) {↵ | |
18 | return false;↵ | 18 | return false;↵ | |
19 | }↵ | 19 | }↵ | |
20 | if (!ObjectUtilities.equal(this.data, that.data)) {↵ | 20 | if (!ObjectUtilities.equal(this.data, that.data)) {↵ | |
21 | return false;↵ | 21 | return false;↵ | |
22 | }↵ | 22 | }↵ | |
23 | return true; | 23 |
| |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 92 |
Number of mapped statements | 16 |
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) | 4.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 1 | if (obj == this) | |||||||||||||||||
2 | return true; | 2 | return true; | |||||||||||||||||
3 | if (!(obj instanceof ComparableObjectSeries)) |
| 3 | if (!(obj instanceof XYSeries)) | ||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||
5 | if (!super.equals(obj)) |
| 5 | if (!super.equals(obj)) | ||||||||||||||||
6 | return false; | 6 | return false; | |||||||||||||||||
7 | ComparableObjectSeries that = (ComparableObjectSeries)obj; |
| 7 | XYSeries that = (XYSeries)obj; | ||||||||||||||||
8 | if (this.maximumItemCount != that.maximumItemCount) |
| 8 | if (this.maximumItemCount != that.maximumItemCount) | ||||||||||||||||
9 | return false; | 9 | return false; | |||||||||||||||||
10 | if (this.autoSort != that.autoSort) |
| 10 | if (this.autoSort != that.autoSort) | ||||||||||||||||
11 | return false; | 11 | return false; | |||||||||||||||||
12 | if (this.allowDuplicateXValues != that.allowDuplicateXValues) |
| 12 | if (this.allowDuplicateXValues != that.allowDuplicateXValues) | ||||||||||||||||
13 | return false; | 13 | return false; | |||||||||||||||||
14 | if (!ObjectUtilities.equal(this.data, that.data)) |
| 14 | if (!ObjectUtilities.equal(this.data, that.data)) | ||||||||||||||||
15 | return false; | 15 | return false; | |||||||||||||||||
16 | return true; | 16 | 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.maximumItemCount cannot be unified with expression that.maximumItemCount , because common superclass org.jfree.data.general.Series does not declare member(s) private int maximumItemCount |
4 | Expression that.autoSort cannot be unified with expression that.autoSort , because common superclass org.jfree.data.general.Series does not declare member(s) private boolean autoSort |
5 | Expression that.allowDuplicateXValues cannot be unified with expression that.allowDuplicateXValues , because common superclass org.jfree.data.general.Series does not declare member(s) private boolean allowDuplicateXValues |
6 | Expression that.data cannot be unified with expression that.data , because common superclass org.jfree.data.general.Series does not declare member(s) protected List#RAW data |