File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/CandlestickRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StandardXYItemRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 26 | Number of AST nodes: 28 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof CandlestickRenderer)) {↵ | 4 | if (!(obj instanceof StandardXYItemRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | CandlestickRenderer that = (CandlestickRenderer) obj;↵ | 7 | StandardXYItemRenderer that = (StandardXYItemRenderer) obj;↵ | |
8 | if (this.candleWidth != that.candleWidth) {↵ | 8 | if (this.baseShapesVisible != that.baseShapesVisible) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (!PaintUtilities.equal(this.upPaint, that.upPaint)↵ | 11 | if (this.plotLines != that.plotLines) {↵ | |
12 | return false;↵ | |||
13 | }↵ | |||
12 | ) {↵ | 14 | if (this.plotImages != that.plotImages) {↵ | |
13 | return false;↵ | 15 | return false;↵ | |
14 | }↵ | 16 | }↵ | |
15 | if (!PaintUtilities.equal(this.downPaint, that.downPaint)) {↵ | 17 | if (this.plotDiscontinuous != that.plotDiscontinuous) {↵ | |
16 | return false;↵ | 18 | return false;↵ | |
17 | }↵ | 19 | }↵ | |
18 | if (this.drawVolume != that.drawVolume) {↵ | 20 | if (this.gapThresholdType != that.gapThresholdType) {↵ | |
19 | return false;↵ | 21 | return false;↵ | |
20 | }↵ | 22 | }↵ | |
21 | if (this.maxCandleWidthInMilliseconds↵ | 23 | if (this.↵ | |
22 | != that.maxCandleWidthInMilliseconds) {↵ | 24 | gapThreshold != that.gapThreshold) {↵ | |
23 | return false;↵ | 25 | return false;↵ | |
24 | }↵ | 26 | }↵ | |
25 | if (this.autoWidthMethod != that.autoWidthMethod) {↵ | 27 | if (!ObjectUtilities.equal(this.shapesFilled, that.shapesFilled)) {↵ | |
26 | return false;↵ | 28 | return false;↵ | |
27 | }↵ | 29 | }↵ | |
28 | if (this.autoWidthFactor != that.autoWidthFactor) {↵ | 30 | if (!this.seriesShapesFilled.equals(that.seriesShapesFilled)) {↵ | |
29 | return false;↵ | 31 | return false;↵ | |
30 | }↵ | 32 | }↵ | |
31 | if (this.autoWidthGap != that.autoWidthGap) {↵ | 33 | if (this.baseShapesFilled != that.baseShapesFilled) {↵ | |
32 | return false;↵ | 34 | return false;↵ | |
33 | }↵ | 35 | }↵ | |
34 | if (this.useOutlinePaint != that.useOutlinePaint) {↵ | 36 | if (this.drawSeriesLineAsPath != that.drawSeriesLineAsPath) {↵ | |
35 | return false;↵ | 37 | return false;↵ | |
36 | }↵ | 38 | }↵ | |
37 | if (!PaintUtilities.equal(this.volumePaint, that.volumePaint)) {↵ | 39 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) {↵ | |
38 | return false;↵ | 40 | return false;↵ | |
39 | }↵ | 41 | }↵ | |
40 | return super.equals(obj); | 42 |
| |
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) | 23.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 298 |
Number of mapped statements | 26 |
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) | 20.8 |
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 CandlestickRenderer)) |
| 3 | if (!(obj instanceof StandardXYItemRenderer)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
5 | CandlestickRenderer that = (CandlestickRenderer)obj; |
| 5 | StandardXYItemRenderer that = (StandardXYItemRenderer)obj; | ||||||||||||||||||||||||||||||
|
| 6 | if (this.baseShapesVisible != that.baseShapesVisible) | |||||||||||||||||||||||||||||||
|
| 7 | return false; | |||||||||||||||||||||||||||||||
6 | if (this.candleWidth != that.candleWidth) |
| 16 | if (this.gapThreshold != that.gapThreshold) | ||||||||||||||||||||||||||||||
7 | return false; | 17 | return false; | |||||||||||||||||||||||||||||||
8 | if (!PaintUtilities.equal(this.upPaint, that.upPaint)) |
| 18 | if (!ObjectUtilities.equal(this.shapesFilled, that.shapesFilled)) | ||||||||||||||||||||||||||||||
9 | return false; | 19 | return false; | |||||||||||||||||||||||||||||||
10 | if (!PaintUtilities.equal(this.downPaint, that.downPaint)) |
| 26 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) | ||||||||||||||||||||||||||||||
11 | return false; | 27 | return false; | |||||||||||||||||||||||||||||||
12 | if (this.drawVolume != that.drawVolume) |
| 12 | if (this.plotDiscontinuous != that.plotDiscontinuous) | ||||||||||||||||||||||||||||||
13 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
14 | if (this.maxCandleWidthInMilliseconds != that.maxCandleWidthInMilliseconds) |
| 14 | if (this.gapThresholdType != that.gapThresholdType) | ||||||||||||||||||||||||||||||
15 | return false; | 15 | return false; | |||||||||||||||||||||||||||||||
16 | if (this.autoWidthMethod != that.autoWidthMethod) |
| 10 | if (this.plotImages != that.plotImages) | ||||||||||||||||||||||||||||||
17 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
18 | if (this.autoWidthFactor != that.autoWidthFactor) |
| 22 | if (this.baseShapesFilled != that.baseShapesFilled) | ||||||||||||||||||||||||||||||
19 | return false; | 23 | return false; | |||||||||||||||||||||||||||||||
20 | if (this.autoWidthGap != that.autoWidthGap) |
| 24 | if (this.drawSeriesLineAsPath != that.drawSeriesLineAsPath) | ||||||||||||||||||||||||||||||
21 | return false; | 25 | return false; | |||||||||||||||||||||||||||||||
22 | if (this.useOutlinePaint != that.useOutlinePaint) |
| 8 | if (this.plotLines != that.plotLines) | ||||||||||||||||||||||||||||||
23 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
24 | if (!PaintUtilities.equal(this.volumePaint, that.volumePaint)) |
| 20 | if (!this.seriesShapesFilled.equals(that.seriesShapesFilled)) | ||||||||||||||||||||||||||||||
25 | return false; | 21 | return false; | |||||||||||||||||||||||||||||||
26 | return super.equals(obj); |
| 28 | return super.equals(obj); |
Row | Violation |
---|---|
1 | Unmatched statement if(this.baseShapesVisible != that.baseShapesVisible) 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 that.candleWidth cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression that.gapThreshold cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type java.awt.Paint of variable this.upPaint does not match with type java.lang.Boolean of variable this.shapesFilled |
6 | Expression that.upPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.shapesFilled cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type java.awt.Paint of variable that.upPaint does not match with type java.lang.Boolean of variable that.shapesFilled |
9 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ObjectUtilities |
10 | Type java.awt.Paint of variable this.downPaint does not match with type java.awt.Shape of variable this.legendLine |
11 | Expression that.downPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression that.legendLine cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Type java.awt.Paint of variable that.downPaint does not match with type java.awt.Shape of variable that.legendLine |
14 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ShapeUtilities |
15 | Expression that.drawVolume cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression that.plotDiscontinuous cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Type double of variable this.maxCandleWidthInMilliseconds does not match with type org.jfree.util.UnitType of variable this.gapThresholdType |
18 | Expression that.maxCandleWidthInMilliseconds cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression that.gapThresholdType cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Type double of variable that.maxCandleWidthInMilliseconds does not match with type org.jfree.util.UnitType of variable that.gapThresholdType |
21 | Type int of variable this.autoWidthMethod does not match with type boolean of variable this.plotImages |
22 | Expression that.autoWidthMethod cannot be parameterized, because it has dependencies to/from statements that will be extracted |
23 | Expression that.plotImages cannot be parameterized, because it has dependencies to/from statements that will be extracted |
24 | Type int of variable that.autoWidthMethod does not match with type boolean of variable that.plotImages |
25 | Type double of variable this.autoWidthFactor does not match with type boolean of variable this.baseShapesFilled |
26 | Expression that.autoWidthFactor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
27 | Expression that.baseShapesFilled cannot be parameterized, because it has dependencies to/from statements that will be extracted |
28 | Type double of variable that.autoWidthFactor does not match with type boolean of variable that.baseShapesFilled |
29 | Type double of variable this.autoWidthGap does not match with type boolean of variable this.drawSeriesLineAsPath |
30 | Expression that.autoWidthGap cannot be parameterized, because it has dependencies to/from statements that will be extracted |
31 | Expression that.drawSeriesLineAsPath cannot be parameterized, because it has dependencies to/from statements that will be extracted |
32 | Type double of variable that.autoWidthGap does not match with type boolean of variable that.drawSeriesLineAsPath |
33 | Expression that.useOutlinePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
34 | Expression that.plotLines cannot be parameterized, because it has dependencies to/from statements that will be extracted |
35 | Expression PaintUtilities.equal(this.volumePaint,that.volumePaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
36 | Expression this.seriesShapesFilled.equals(that.seriesShapesFilled) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
37 | Super method call return super.equals(obj); cannot be extracted from method |
38 | Super method call return super.equals(obj); cannot be extracted from method |
39 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables that |
40 | Not all possible execution flows end in a return statement |