File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/HighLowRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYDifferenceRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 18 | Number of AST nodes: 18 | |||
1 | if (this == obj) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true; ↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof HighLowRenderer)) {↵ | 4 | if (!(obj instanceof XYDifferenceRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | ↵ | |
7 | HighLowRenderer that = (HighLowRenderer) obj;↵ | 7 | ↵ | |
8 | if (this.drawOpenTicks != that.drawOpenTicks↵ | 8 | }↵ | |
9 | ) {↵ | 9 | if (!super.equals(obj)) {↵ | |
10 | return false;↵ | 10 | return false; ↵ | |
11 | }↵ | 11 | }↵ | |
12 | if (this.drawCloseTicks != that.drawCloseTicks↵ | 12 | XYDifferenceRenderer that = (XYDifferenceRenderer) obj;↵ | |
13 | ) {↵ | 13 | if (!PaintUtilities.equal(this.positivePaint, that.positivePaint)) {↵ | |
14 | return false;↵ | 14 | return false; ↵ | |
15 | }↵ | 15 | }↵ | |
16 | if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) {↵ | 16 | if (!PaintUtilities.equal(this.negativePaint, that.negativePaint)) {↵ | |
17 | return false;↵ | 17 | return false; ↵ | |
18 | }↵ | 18 | }↵ | |
19 | if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) {↵ | 19 | if (this.shapesVisible != that.shapesVisible) {↵ | |
20 | return false;↵ | 20 | return false; ↵ | |
21 | }↵ | 21 | }↵ | |
22 | if (this.tickLength != that.tickLength) {↵ | 22 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) {↵ | |
23 | return false;↵ | 23 | return false; ↵ | |
24 | }↵ | 24 | }↵ | |
25 | if (!super.equals(obj)) {↵ | 25 | if (this.roundXCoordinates != that.roundXCoordinates) {↵ | |
26 | return false;↵ | 26 | return false;↵ | |
27 | }↵ | 27 | }↵ | |
28 | return true; | 28 |
| |
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) | 6.7 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 116 |
Number of mapped statements | 13 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 9.6 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (!(obj instanceof HighLowRenderer)) |
| 3 | if (!(obj instanceof XYDifferenceRenderer)) | ||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||
5 | HighLowRenderer that = (HighLowRenderer)obj; |
| 7 | XYDifferenceRenderer that = (XYDifferenceRenderer)obj; | ||||||||||||||||||
6 | if (this.drawOpenTicks != that.drawOpenTicks) |
| 12 | if (this.shapesVisible != that.shapesVisible) | ||||||||||||||||||
7 | return false; | 13 | return false; | |||||||||||||||||||
8 | if (this.drawCloseTicks != that.drawCloseTicks) |
| 16 | if (this.roundXCoordinates != that.roundXCoordinates) | ||||||||||||||||||
9 | return false; | 17 | return false; | |||||||||||||||||||
10 | if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) |
| 10 | if (!PaintUtilities.equal(this.negativePaint, that.negativePaint)) | ||||||||||||||||||
11 | return false; | 11 | return false; | |||||||||||||||||||
12 | if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) |
| 8 | if (!PaintUtilities.equal(this.positivePaint, that.positivePaint)) | ||||||||||||||||||
13 | return false; | 9 | return false; | |||||||||||||||||||
|
| 14 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) | |||||||||||||||||||
|
| 15 | return false; | |||||||||||||||||||
14 | if (this.tickLength != that.tickLength) |
| | |||||||||||||||||||
15 | return false; |
| | |||||||||||||||||||
16 | if (!super.equals(obj)) |
| 5 | if (!super.equals(obj)) | ||||||||||||||||||
17 | return false; | 6 | return false; |
Row | Violation |
---|---|
1 | Expression that.drawOpenTicks cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression that.shapesVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression that.drawCloseTicks cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression that.roundXCoordinates cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.openTickPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.negativePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.closeTickPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.positivePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Unmatched statement if(!ShapeUtilities.equal(this.legendLine,that.legendLine)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
10 | Unmatched return false; |
11 | 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 |
12 | Unmatched return false; |
13 | Super method call if(!super.equals(obj)) cannot be extracted from method |
14 | Super method call if(!super.equals(obj)) cannot be extracted from method |
15 | Clone fragment #1 returns variable that with type org.jfree.chart.renderer.xy.HighLowRenderer , while Clone fragment #2 returns variable that with type org.jfree.chart.renderer.xy.XYDifferenceRenderer |
16 | Not all possible execution flows end in a return statement |