File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/DefaultDrawingSupplier.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/CandlestickRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 26 | Number of AST nodes: 26 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof DefaultDrawingSupplier)) {↵ | 4 | if (!(obj instanceof CandlestickRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | DefaultDrawingSupplier that = (DefaultDrawingSupplier) obj;↵ | 7 | CandlestickRenderer that = (CandlestickRenderer) obj;↵ | |
8 | if (!Arrays.equals(this.paintSequence, that.paintSequence)) {↵ | 8 | if (this.candleWidth != that.candleWidth) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (this.paintIndex != that.paintIndex) {↵ | 11 | if (!PaintUtilities.equal(this.upPaint, that.upPaint)) {↵ | |
12 | return false; ↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!Arrays.equals(this.outlinePaintSequence, ↵ | 14 | if (!PaintUtilities.equal(this.↵ | |
15 | that.outlinePaintSequence)) {↵ | 15 | downPaint, that.downPaint)) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (this.outlinePaintIndex != that.outlinePaintIndex) {↵ | 18 | if (this.drawVolume != that.drawVolume) {↵ | |
19 | return false;↵ | 19 | return false;↵ | |
20 | }↵ | 20 | }↵ | |
21 | if (!Arrays.equals(this.strokeSequence, that.strokeSequence)↵ | 21 | if (this.maxCandleWidthInMilliseconds↵ | |
22 | ) {↵ | 22 | != that.maxCandleWidthInMilliseconds) {↵ | |
23 | return false;↵ | 23 | return false;↵ | |
24 | }↵ | 24 | }↵ | |
25 | if (this.strokeIndex != that.strokeIndex) {↵ | 25 | if (this.autoWidthMethod != that.autoWidthMethod) {↵ | |
26 | return false; ↵ | 26 | return false;↵ | |
27 | }↵ | 27 | }↵ | |
28 | if (!Arrays.equals(this.outlineStrokeSequence, ↵ | 28 | if (this.aut↵ | |
29 | that.outlineStrokeSequence)) {↵ | 29 | oWidthFactor != that.autoWidthFactor) {↵ | |
30 | return false;↵ | 30 | return false;↵ | |
31 | }↵ | 31 | }↵ | |
32 | if (this.outlineStrokeIndex != that.outlineStrokeIndex) {↵ | 32 | if (this.autoWidthGap != that.autoWidthGap) {↵ | |
33 | return false; ↵ | 33 | return false;↵ | |
34 | }↵ | 34 | }↵ | |
35 | if (!equalShapes(this.shapeSequence, that.shapeSequence)) {↵ | 35 | if (this.useOutlinePaint != that.useOutlinePaint) {↵ | |
36 | return false;↵ | 36 | return false;↵ | |
37 | }↵ | 37 | }↵ | |
38 | if (this.shapeIndex != that.shapeIndex) {↵ | 38 | if (!PaintUtilities.equal(this.volumePaint, that.volumePaint)) {↵ | |
39 | return false;↵ | 39 | return false;↵ | |
40 | }↵ | 40 | }↵ | |
41 | return true; | 41 | return super.equals(obj); | |
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) | 15.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 208 |
Number of mapped statements | 17 |
Number of unmapped statements in the first code fragment | 8 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 12.1 |
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 DefaultDrawingSupplier)) |
| 3 | if (!(obj instanceof CandlestickRenderer)) | ||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
5 | DefaultDrawingSupplier that = (DefaultDrawingSupplier)obj; |
| 5 | CandlestickRenderer that = (CandlestickRenderer)obj; | ||||||||||||||||||||||||||
6 | if (!Arrays.equals(this.paintSequence, that.paintSequence)) |
| | |||||||||||||||||||||||||||
7 | return false; |
| | |||||||||||||||||||||||||||
|
| 8 | if (!PaintUtilities.equal(this.upPaint, that.upPaint)) | |||||||||||||||||||||||||||
|
| 9 | return false; | |||||||||||||||||||||||||||
8 | if (this.paintIndex != that.paintIndex) |
| 16 | if (this.autoWidthMethod != that.autoWidthMethod) | ||||||||||||||||||||||||||
9 | return false; | 17 | return false; | |||||||||||||||||||||||||||
10 | if (!Arrays.equals(this.outlinePaintSequence, that.outlinePaintSequence)) |
| | |||||||||||||||||||||||||||
11 | return false; |
| | |||||||||||||||||||||||||||
12 | if (this.outlinePaintIndex != that.outlinePaintIndex) |
| 12 | if (this.drawVolume != that.drawVolume) | ||||||||||||||||||||||||||
13 | return false; | 13 | return false; | |||||||||||||||||||||||||||
14 | if (!Arrays.equals(this.strokeSequence, that.strokeSequence)) |
| | |||||||||||||||||||||||||||
15 | return false; |
| | |||||||||||||||||||||||||||
16 | if (this.strokeIndex != that.strokeIndex) |
| 18 | if (this.autoWidthFactor != that.autoWidthFactor) | ||||||||||||||||||||||||||
17 | return false; | 19 | return false; | |||||||||||||||||||||||||||
18 | if (!Arrays.equals(this.outlineStrokeSequence, that.outlineStrokeSequence)) |
| | |||||||||||||||||||||||||||
19 | return false; |
| | |||||||||||||||||||||||||||
20 | if (this.outlineStrokeIndex != that.outlineStrokeIndex) |
| 14 | if (this.maxCandleWidthInMilliseconds != that.maxCandleWidthInMilliseconds) | ||||||||||||||||||||||||||
21 | return false; | 15 | return false; | |||||||||||||||||||||||||||
22 | if (!equalShapes(this.shapeSequence, that.shapeSequence)) |
| 10 | if (!PaintUtilities.equal(this.downPaint, that.downPaint)) | ||||||||||||||||||||||||||
23 | return false; | 11 | return false; | |||||||||||||||||||||||||||
24 | if (this.shapeIndex != that.shapeIndex) |
| 6 | if (this.candleWidth != that.candleWidth) | ||||||||||||||||||||||||||
25 | return false; | 7 | return false; |
Row | Violation |
---|---|
1 | Unmatched statement if(!Arrays.equals(this.paintSequence,that.paintSequence)) 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(!PaintUtilities.equal(this.upPaint,that.upPaint)) 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.paintIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.autoWidthMethod cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Unmatched statement if(!Arrays.equals(this.outlinePaintSequence,that.outlinePaintSequence)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | Unmatched return false; |
9 | Type int of variable this.outlinePaintIndex does not match with type boolean of variable this.drawVolume |
10 | Expression that.outlinePaintIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.drawVolume cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type int of variable that.outlinePaintIndex does not match with type boolean of variable that.drawVolume |
13 | Unmatched statement if(!Arrays.equals(this.strokeSequence,that.strokeSequence)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
14 | Unmatched return false; |
15 | Type int of variable this.strokeIndex does not match with type double of variable this.autoWidthFactor |
16 | Expression that.strokeIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression that.autoWidthFactor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Type int of variable that.strokeIndex does not match with type double of variable that.autoWidthFactor |
19 | Unmatched statement if(!Arrays.equals(this.outlineStrokeSequence,that.outlineStrokeSequence)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
20 | Unmatched return false; |
21 | Type int of variable this.outlineStrokeIndex does not match with type double of variable this.maxCandleWidthInMilliseconds |
22 | Expression that.outlineStrokeIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
23 | Expression that.maxCandleWidthInMilliseconds cannot be parameterized, because it has dependencies to/from statements that will be extracted |
24 | Type int of variable that.outlineStrokeIndex does not match with type double of variable that.maxCandleWidthInMilliseconds |
25 | Expression equalShapes(this.shapeSequence,that.shapeSequence) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
26 | Expression PaintUtilities.equal(this.downPaint,that.downPaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
27 | Type int of variable this.shapeIndex does not match with type double of variable this.candleWidth |
28 | Expression that.shapeIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
29 | Expression that.candleWidth cannot be parameterized, because it has dependencies to/from statements that will be extracted |
30 | Type int of variable that.shapeIndex does not match with type double of variable that.candleWidth |
31 | Clone fragment #1 returns variable that with type org.jfree.chart.plot.DefaultDrawingSupplier , while Clone fragment #2 returns variable that with type org.jfree.chart.renderer.xy.CandlestickRenderer |
32 | Not all possible execution flows end in a return statement |
33 | The refactoring of the clones is infeasible, because classes org.jfree.chart.plot.DefaultDrawingSupplier and org.jfree.chart.renderer.xy.CandlestickRenderer do not have a common superclass |