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