File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CategoryAxis.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 CategoryAxis)) {↵ | 4 | if (!(obj instanceof CandlestickRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!super.equals(obj)) {↵ | 7 | ↵ | |
8 | return false;↵ | |||
9 | }↵ | |||
10 | CategoryAxis that = (CategoryAxis) obj;↵ | |||
11 | if (that.lowerMargin != this.lowerMargin↵ | 8 | CandlestickRenderer that = (CandlestickRenderer) obj;↵ | |
9 | if (this.candleWidth != that.candleWidth) {↵ | |||
10 | return false;↵ | |||
11 | }↵ | |||
12 | ) {↵ | 12 | if (!PaintUtilities.equal(this.upPaint, that.upPaint)) {↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (that.upperMargin != this.upperMargin) {↵ | 15 | if (!PaintUtilities.equal(this.downPaint, that.downPaint)) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (that.categoryMargin != this.categoryMargin) {↵ | 18 | if (this.drawVolume != that.drawVolume) {↵ | |
19 | return false;↵ | 19 | return false;↵ | |
20 | }↵ | 20 | }↵ | |
21 | if (that.maximumCategoryLabelWidthRatio↵ | 21 | if (this.maxCandleWidthInMilliseconds↵ | |
22 | != this.maximumCategoryLabelWidthRatio) {↵ | 22 | != that.maxCandleWidthInMilliseconds) {↵ | |
23 | return false;↵ | 23 | return false;↵ | |
24 | }↵ | 24 | }↵ | |
25 | if (that.categoryLabelPositionOffset↵ | 25 | if (th↵ | |
26 | != this.categoryLabelPositionOffset) {↵ | 26 | is.autoWidthMethod != that.autoWidthMethod) {↵ | |
27 | return false;↵ | 27 | return false;↵ | |
28 | }↵ | 28 | }↵ | |
29 | if (!ObjectUtilities.equal(that.categoryLabelPositions,↵ | 29 | if (↵ | |
30 | this.categoryLabelPositions)) {↵ | 30 | this.autoWidthFactor != that.autoWidthFactor) {↵ | |
31 | return false;↵ | 31 | return false;↵ | |
32 | }↵ | 32 | }↵ | |
33 | if (!ObjectUtilities.equal(that.categoryLabelToolTips,↵ | 33 | if (↵ | |
34 | this.categoryLabelToolTips)) {↵ | |||
35 | return false;↵ | |||
36 | }↵ | |||
37 | if (!ObjectUtilities.equal(this.tickLabelFontMap,↵ | |||
38 | that.tickLabelFontMap)↵ | 34 | this.autoWidthGap != that.autoWidthGap) {↵ | |
35 | return false;↵ | |||
36 | }↵ | |||
39 | ) {↵ | 37 | if (this.useOutlinePaint != that.useOutlinePaint) {↵ | |
40 | return false;↵ | 38 | return false;↵ | |
41 | }↵ | 39 | }↵ | |
42 | if (!equalPaintMaps(this.tickLabelPaintMap, that.tickLabelPaintMap)) {↵ | 40 | if (!PaintUtilities.equal(this.volumePaint, that.volumePaint)) {↵ | |
43 | return false;↵ | 41 | return false;↵ | |
44 | }↵ | 42 | }↵ | |
45 | return true; | 43 | 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) | 9.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 208 |
Number of mapped statements | 18 |
Number of unmapped statements in the first code fragment | 7 |
Number of unmapped statements in the second code fragment | 7 |
Time elapsed for statement mapping (ms) | 11.7 |
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 CategoryAxis)) |
| 3 | if (!(obj instanceof CandlestickRenderer)) | |||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||||||
| 5 | CandlestickRenderer that = (CandlestickRenderer)obj; | |||||||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) |
| 8 | if (!PaintUtilities.equal(this.upPaint, that.upPaint)) | |||||||||||||||||||||||||||||||
6 | return false; | 9 | return false; | ||||||||||||||||||||||||||||||||
7 | CategoryAxis that = (CategoryAxis)obj; | | |||||||||||||||||||||||||||||||||
8 | if (that.lowerMargin != this.lowerMargin) |
| 6 | if (this.candleWidth != that.candleWidth) | |||||||||||||||||||||||||||||||
9 | return false; | 7 | return false; | ||||||||||||||||||||||||||||||||
| 12 | if (this.drawVolume != that.drawVolume) | |||||||||||||||||||||||||||||||||
|
| 13 | return false; | ||||||||||||||||||||||||||||||||
10 | if (that.upperMargin != this.upperMargin) |
| 14 | if (this.maxCandleWidthInMilliseconds != that.maxCandleWidthInMilliseconds) | |||||||||||||||||||||||||||||||
11 | return false; | 15 | return false; | ||||||||||||||||||||||||||||||||
12 | if (that.categoryMargin != this.categoryMargin) |
| 18 | if (this.autoWidthFactor != that.autoWidthFactor) | |||||||||||||||||||||||||||||||
13 | return false; | 19 | return false; | ||||||||||||||||||||||||||||||||
14 | if (that.maximumCategoryLabelWidthRatio != this.maximumCategoryLabelWidthRatio) | | |||||||||||||||||||||||||||||||||
15 | return false; |
| | ||||||||||||||||||||||||||||||||
16 | if (that.categoryLabelPositionOffset != this.categoryLabelPositionOffset) |
| 16 | if (this.autoWidthMethod != that.autoWidthMethod) | |||||||||||||||||||||||||||||||
17 | return false; | 17 | return false; | ||||||||||||||||||||||||||||||||
18 | if (!ObjectUtilities.equal(that.categoryLabelPositions, this.categoryLabelPositions)) | | |||||||||||||||||||||||||||||||||
19 | return false; |
| | ||||||||||||||||||||||||||||||||
| 20 | if (this.autoWidthGap != that.autoWidthGap) | |||||||||||||||||||||||||||||||||
|
| 21 | return false; | ||||||||||||||||||||||||||||||||
20 | if (!ObjectUtilities.equal(that.categoryLabelToolTips, this.categoryLabelToolTips)) | | |||||||||||||||||||||||||||||||||
21 | return false; |
| | ||||||||||||||||||||||||||||||||
| 22 | if (this.useOutlinePaint != that.useOutlinePaint) | |||||||||||||||||||||||||||||||||
|
| 23 | return false; | ||||||||||||||||||||||||||||||||
22 | if (!ObjectUtilities.equal(this.tickLabelFontMap, that.tickLabelFontMap)) |
| 24 | if (!PaintUtilities.equal(this.volumePaint, that.volumePaint)) | |||||||||||||||||||||||||||||||
23 | return false; | 25 | return false; | ||||||||||||||||||||||||||||||||
24 | if (!equalPaintMaps(this.tickLabelPaintMap, that.tickLabelPaintMap)) |
| 10 | if (!PaintUtilities.equal(this.downPaint, that.downPaint)) | |||||||||||||||||||||||||||||||
25 | return false; | 11 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.axis.CategoryAxis does not match with type org.jfree.chart.renderer.xy.CandlestickRenderer |
2 | Expression PaintUtilities.equal(this.upPaint,that.upPaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Super method call if(!super.equals(obj)) cannot be extracted from method |
4 | Expression that.lowerMargin cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.candleWidth cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Unmatched return false; |
7 | Expression that.upperMargin cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.maxCandleWidthInMilliseconds cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.categoryMargin cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression that.autoWidthFactor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Unmatched return false; |
12 | Expression that.categoryLabelPositionOffset cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression that.autoWidthMethod cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Unmatched return false; |
15 | Unmatched return false; |
16 | Unmatched return false; |
17 | Unmatched return false; |
18 | Type java.util.Map of variable this.tickLabelFontMap does not match with type java.awt.Paint of variable this.volumePaint |
19 | Type java.util.Map of variable that.tickLabelFontMap does not match with type java.awt.Paint of variable that.volumePaint |
20 | Expression that.tickLabelFontMap cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression that.volumePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Type java.util.Map of variable that.tickLabelFontMap does not match with type java.awt.Paint of variable that.volumePaint |
23 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
24 | Expression equalPaintMaps(this.tickLabelPaintMap,that.tickLabelPaintMap) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
25 | Expression PaintUtilities.equal(this.downPaint,that.downPaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
26 | Not all possible execution flows end in a return statement |
27 | The refactoring of the clones is infeasible, because classes org.jfree.chart.axis.CategoryAxis and org.jfree.chart.renderer.xy.CandlestickRenderer do not have a common superclass |