File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/DateAxis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/NumberAxis.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 DateAxis)) {↵ | 4 | if (!(obj instanceof NumberAxis)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | Date↵ | 7 | if (!super.equals(obj)) {↵ | |
8 | return false;↵ | |||
9 | }↵ | |||
8 | Axis that = (DateAxis) obj;↵ | 10 | NumberAxis that = (NumberAxis) obj;↵ | |
9 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) {↵ | 11 | if (this.autoRangeIncludesZero != that.autoRangeIncludesZero) {↵ | |
10 | return false;↵ | 12 | return false;↵ | |
11 | }↵ | 13 | }↵ | |
12 | if (!ObjectUtilities.equal(this.dateFormatOverride,↵ | 14 | if (↵ | |
13 | that.dateFormatOverride)) {↵ | 15 | this.autoRangeStickyZero != that.autoRangeStickyZero) {↵ | |
14 | return false;↵ | 16 | return false;↵ | |
15 | }↵ | 17 | }↵ | |
16 | if (!ObjectUtilities.equal(this.tickMarkPosition,↵ | 18 | if (!ObjectUtilities.equal(this.tick↵ | |
17 | that.tickMarkPosition)) {↵ | 19 | Unit, that.tickUnit)) {↵ | |
18 | return false;↵ | 20 | return false;↵ | |
19 | }↵ | 21 | }↵ | |
20 | if (!ObjectUtilities.equal(this.timeline, that.timelin↵ | 22 | if (!ObjectUtilities.equal(this.numberFormatOverride,↵ | |
21 | e)) {↵ | 23 | that.numberFormatOverride)) {↵ | |
22 | return false;↵ | 24 | return false;↵ | |
23 | }↵ | 25 | }↵ | |
24 | if (!super.equals(obj)) {↵ | 26 | if (!this.rangeType.equals(that.rangeType)) {↵ | |
25 | return false;↵ | 27 | return false;↵ | |
26 | }↵ | 28 | }↵ | |
27 | return true; | 29 |
| |
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) | 5.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 105 |
Number of mapped statements | 13 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 9.0 |
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 DateAxis)) |
| 3 | if (!(obj instanceof NumberAxis)) | ||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||
5 | DateAxis that = (DateAxis)obj; |
| 7 | NumberAxis that = (NumberAxis)obj; | ||||||||||||||||||||||||
|
| 8 | if (this.autoRangeIncludesZero != that.autoRangeIncludesZero) | |||||||||||||||||||||||||
|
| 9 | return false; | |||||||||||||||||||||||||
|
| 10 | if (this.autoRangeStickyZero != that.autoRangeStickyZero) | |||||||||||||||||||||||||
|
| 11 | return false; | |||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) |
| 12 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) | ||||||||||||||||||||||||
7 | return false; | 13 | return false; | |||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.dateFormatOverride, that.dateFormatOverride)) |
| 14 | if (!ObjectUtilities.equal(this.numberFormatOverride, that.numberFormatOverride)) | ||||||||||||||||||||||||
9 | return false; | 15 | return false; | |||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.tickMarkPosition, that.tickMarkPosition)) |
| 5 | if (!super.equals(obj)) | ||||||||||||||||||||||||
11 | return false; | 6 | return false; | |||||||||||||||||||||||||
12 | if (!ObjectUtilities.equal(this.timeline, that.timeline)) |
| 16 | if (!this.rangeType.equals(that.rangeType)) | ||||||||||||||||||||||||
13 | return false; | 17 | return false; |
Row | Violation |
---|---|
1 | Unmatched statement if(this.autoRangeIncludesZero != that.autoRangeIncludesZero) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched return false; |
3 | Unmatched statement if(this.autoRangeStickyZero != that.autoRangeStickyZero) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched return false; |
5 | Expression that.tickUnit cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.tickUnit cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.dateFormatOverride cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.numberFormatOverride cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression ObjectUtilities.equal(this.tickMarkPosition,that.tickMarkPosition) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Super method call if(!super.equals(obj)) cannot be extracted from method |
11 | Expression ObjectUtilities.equal(this.timeline,that.timeline) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression this.rangeType.equals(that.rangeType) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables that |
14 | Not all possible execution flows end in a return statement |