File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/DialTextAnnotation.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 DialTextAnnotation)) {↵ | 4 | if (!(obj instanceof HighLowRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | DialTextAnnotation that = (DialTextAnnotation) obj;↵ | 7 | HighLowRenderer that = (HighLowRenderer) obj;↵ | |
8 | if (!this.label.equals(that.label)) {↵ | 8 | if (this.drawOpenTicks != that.drawOpenTicks) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (!this.font.equals(that.font)) {↵ | 11 | if (this.drawCloseTicks != that.drawCloseTicks) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!PaintUtilities.equal(this.paint, that.paint)) {↵ | 14 | if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (this.radius != that.radius) {↵ | 17 | if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) {↵ | |
18 | return false;↵ | 18 | return false;↵ | |
19 | }↵ | 19 | }↵ | |
20 | if (this.angle != that.angle) {↵ | 20 | if (this.tickLength != that.tickLength) {↵ | |
21 | return false;↵ | 21 | return false;↵ | |
22 | }↵ | 22 | }↵ | |
23 | if (!this.anchor.equals(that.anchor)) {↵ | 23 | if (!super.equals(obj)) {↵ | |
24 | return false;↵ | 24 | return false;↵ | |
25 | }↵ | 25 | }↵ | |
26 | return super.equals(obj); | 26 | 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) | 4.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 110 |
Number of mapped statements | 13 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 5.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (!(obj instanceof DialTextAnnotation)) |
| 3 | if (!(obj instanceof HighLowRenderer)) | ||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
5 | DialTextAnnotation that = (DialTextAnnotation)obj; |
| 5 | HighLowRenderer that = (HighLowRenderer)obj; | ||||||||||||||||||||||||||
|
| 6 | if (this.drawOpenTicks != that.drawOpenTicks) | |||||||||||||||||||||||||||
|
| 7 | return false; | |||||||||||||||||||||||||||
6 | if (!this.label.equals(that.label)) |
| 16 | if (!super.equals(obj)) | ||||||||||||||||||||||||||
7 | return false; | 17 | return false; | |||||||||||||||||||||||||||
8 | if (!this.font.equals(that.font)) |
| 10 | if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) | ||||||||||||||||||||||||||
9 | return false; | 11 | return false; | |||||||||||||||||||||||||||
10 | if (!PaintUtilities.equal(this.paint, that.paint)) |
| 12 | if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) | ||||||||||||||||||||||||||
11 | return false; | 13 | return false; | |||||||||||||||||||||||||||
12 | if (this.radius != that.radius) |
| 14 | if (this.tickLength != that.tickLength) | ||||||||||||||||||||||||||
13 | return false; | 15 | return false; | |||||||||||||||||||||||||||
14 | if (this.angle != that.angle) |
| 8 | if (this.drawCloseTicks != that.drawCloseTicks) | ||||||||||||||||||||||||||
15 | return false; | 9 | 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 | Expression this.label.equals(that.label) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Super method call if(!super.equals(obj)) cannot be extracted from method |
5 | Expression this.font.equals(that.font) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression PaintUtilities.equal(this.openTickPaint,that.openTickPaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.paint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.closeTickPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.radius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression that.tickLength cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Type double of variable this.angle does not match with type boolean of variable this.drawCloseTicks |
12 | Expression that.angle cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression that.drawCloseTicks cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Type double of variable that.angle does not match with type boolean of variable that.drawCloseTicks |
15 | Clone fragment #1 returns variable that with type org.jfree.chart.plot.dial.DialTextAnnotation , while Clone fragment #2 returns variable that with type org.jfree.chart.renderer.xy.HighLowRenderer |
16 | Not all possible execution flows end in a return statement |