File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/NumberAxis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/HighLowRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 18 | Number of AST nodes: 18 | |||
1 | if (obj == this) {↵ | 1 | if (this == obj) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof NumberAxis)) {↵ | 4 | if (!(obj instanceof HighLowRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!super.equals(obj)) {↵ | 7 | ↵ | |
8 | return false;↵ | |||
9 | }↵ | |||
10 | NumberAxis that = (NumberAxis) obj;↵ | 8 | HighLowRenderer that = (HighLowRenderer) obj;↵ | |
11 | if (this.autoRangeIncludesZero != that.autoRangeIncludesZero) {↵ | 9 | if (this.drawOpenTicks != that.drawOpenTicks) {↵ | |
12 | return false;↵ | 10 | return false;↵ | |
13 | }↵ | 11 | }↵ | |
14 | if (this.autoRangeStickyZero != that.autoRangeStickyZero) {↵ | 12 | if (this.drawCloseTicks != that.drawCloseTicks) {↵ | |
15 | return false;↵ | 13 | return false;↵ | |
16 | }↵ | 14 | }↵ | |
17 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) {↵ | 15 | if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) {↵ | |
18 | return false;↵ | 16 | return false;↵ | |
19 | }↵ | 17 | }↵ | |
20 | if (!ObjectUtilities.equal(this.numberFormatOverride,↵ | 18 | if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) {↵ | |
19 | return false;↵ | |||
21 | ↵ | 20 | }↵ | |
22 | that.numberFormatOverride)) {↵ | 21 | if (this.tickLength != that.tickLength) {↵ | |
23 | return false;↵ | 22 | return false;↵ | |
24 | }↵ | 23 | }↵ | |
25 | if (!this.rangeType.equals(that.rangeType)) {↵ | 24 | if (!super.equals(obj)) {↵ | |
26 | return false;↵ | 25 | return false;↵ | |
27 | }↵ | 26 | }↵ | |
28 | return true; | 27 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 110 |
Number of mapped statements | 12 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 5.4 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (!(obj instanceof NumberAxis)) |
| 3 | if (!(obj instanceof HighLowRenderer)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
| 5 | HighLowRenderer that = (HighLowRenderer)obj; | ||||||||||||||||||||||||||||||||
| 14 | if (this.tickLength != that.tickLength) | ||||||||||||||||||||||||||||||||
|
| 15 | return false; | |||||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) |
| 16 | if (!super.equals(obj)) | ||||||||||||||||||||||||||||||
6 | return false; | 17 | return false; | |||||||||||||||||||||||||||||||
7 | NumberAxis that = (NumberAxis)obj; | | ||||||||||||||||||||||||||||||||
8 | if (this.autoRangeIncludesZero != that.autoRangeIncludesZero) |
| 8 | if (this.drawCloseTicks != that.drawCloseTicks) | ||||||||||||||||||||||||||||||
9 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
10 | if (this.autoRangeStickyZero != that.autoRangeStickyZero) |
| 6 | if (this.drawOpenTicks != that.drawOpenTicks) | ||||||||||||||||||||||||||||||
11 | return false; | 7 | return false; | |||||||||||||||||||||||||||||||
12 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) |
| 12 | if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) | ||||||||||||||||||||||||||||||
13 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
14 | if (!ObjectUtilities.equal(this.numberFormatOverride, that.numberFormatOverride)) |
| 10 | if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) | ||||||||||||||||||||||||||||||
15 | return false; | 11 | return false; |
Row | Violation |
---|---|
1 | Unmatched return false; |
2 | Super method call if(!super.equals(obj)) cannot be extracted from method |
3 | Super method call if(!super.equals(obj)) cannot be extracted from method |
4 | Expression that.autoRangeIncludesZero cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.drawCloseTicks cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.autoRangeStickyZero cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.drawOpenTicks cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type org.jfree.chart.axis.NumberTickUnit of variable this.tickUnit does not match with type java.awt.Paint of variable this.closeTickPaint |
9 | Expression that.tickUnit cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression that.closeTickPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Type org.jfree.chart.axis.NumberTickUnit of variable that.tickUnit does not match with type java.awt.Paint of variable that.closeTickPaint |
12 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
13 | Type java.text.NumberFormat of variable this.numberFormatOverride does not match with type java.awt.Paint of variable this.openTickPaint |
14 | Expression that.numberFormatOverride cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression that.openTickPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Type java.text.NumberFormat of variable that.numberFormatOverride does not match with type java.awt.Paint of variable that.openTickPaint |
17 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
18 | Not all possible execution flows end in a return statement |