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/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 CategoryAxis)) {↵ | 4 | if (!(obj instanceof StandardXYItemRenderer)) {↵ | |
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 | StandardXYItemRenderer that = (StandardXYItemRenderer) obj;↵ | |
9 | if (this.baseShapesVisible != that.baseShapesVisible) {↵ | |||
10 | return false;↵ | |||
11 | }↵ | |||
12 | ) {↵ | 12 | if (this.plotLines != that.plotLines) {↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (that.upperMargin != this.upperMargin) {↵ | 15 | if (this.plotImages != that.plotImages) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (that.categoryMargin != this.categoryMargin) {↵ | 18 | if (this.plotDiscontinuous != that.plotDiscontinuous) {↵ | |
19 | return false;↵ | 19 | return false;↵ | |
20 | }↵ | 20 | }↵ | |
21 | if (that.maximumCategoryLabelWidthRatio↵ | 21 | if (th↵ | |
22 | != this.maximumCategoryLabelWidthRatio) {↵ | 22 | is.gapThresholdType != that.gapThresholdType) {↵ | |
23 | return false;↵ | 23 | return false;↵ | |
24 | }↵ | 24 | }↵ | |
25 | if (that.categoryLabelPositionOffset↵ | 25 | if (th↵ | |
26 | != this.categoryLabelPositionOffset) {↵ | 26 | is.gapThreshold != that.gapThreshold) {↵ | |
27 | return false;↵ | 27 | return false;↵ | |
28 | }↵ | 28 | }↵ | |
29 | if (!ObjectUtilities.equal(that.categoryLabelPositions,↵ | 29 | if (!ObjectUtilities.equal(th↵ | |
30 | this.categoryLabelPositions)) {↵ | 30 | is.shapesFilled, that.shapesFilled)) {↵ | |
31 | return false;↵ | 31 | return false;↵ | |
32 | }↵ | 32 | }↵ | |
33 | if (!ObjectUtilities.equal(that.categoryLabelToolTips,↵ | 33 | if (!this.seriesShapesFilled.equals(that.seriesShapesFilled)) {↵ | |
34 | return false;↵ | |||
34 | ↵ | 35 | }↵ | |
35 | this.categoryLabelToolTips)) {↵ | 36 | if (this.baseShapesFilled != that.baseShapesFilled) {↵ | |
36 | return false;↵ | 37 | return false;↵ | |
37 | }↵ | 38 | }↵ | |
38 | if (!ObjectUtilities.equal(this.tickLabelFontMap,↵ | 39 | if (↵ | |
39 | that.tickLabelFontMap)) {↵ | 40 | this.drawSeriesLineAsPath != that.drawSeriesLineAsPath) {↵ | |
40 | return false;↵ | 41 | return false;↵ | |
41 | }↵ | 42 | }↵ | |
42 | if (!equalPaintMaps(this.tickLabelPaintMap, that.tickLabelPaintMap)) {↵ | 43 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) {↵ | |
43 | return false;↵ | 44 | return false;↵ | |
44 | }↵ | 45 | }↵ | |
45 | return true; | 46 | 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) | 10.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 190 |
Number of mapped statements | 10 |
Number of unmapped statements in the first code fragment | 13 |
Number of unmapped statements in the second code fragment | 17 |
Time elapsed for statement mapping (ms) | 8.2 |
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 StandardXYItemRenderer)) | |||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||
| 5 | StandardXYItemRenderer that = (StandardXYItemRenderer)obj; | |||||||||||||||||||||||||||||
| 6 | if (this.baseShapesVisible != that.baseShapesVisible) | |||||||||||||||||||||||||||||
|
| 7 | return false; | ||||||||||||||||||||||||||||
| 8 | if (this.plotLines != that.plotLines) | |||||||||||||||||||||||||||||
|
| 9 | return false; | ||||||||||||||||||||||||||||
| 10 | if (this.plotImages != that.plotImages) | |||||||||||||||||||||||||||||
|
| 11 | return false; | ||||||||||||||||||||||||||||
| 12 | if (this.plotDiscontinuous != that.plotDiscontinuous) | |||||||||||||||||||||||||||||
|
| 13 | return false; | ||||||||||||||||||||||||||||
| 14 | if (this.gapThresholdType != that.gapThresholdType) | |||||||||||||||||||||||||||||
|
| 15 | return false; | ||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) |
| 20 | if (!this.seriesShapesFilled.equals(that.seriesShapesFilled)) | |||||||||||||||||||||||||||
6 | return false; | 21 | return false; | ||||||||||||||||||||||||||||
7 | CategoryAxis that = (CategoryAxis)obj; | | |||||||||||||||||||||||||||||
8 | if (that.lowerMargin != this.lowerMargin) |
| 16 | if (this.gapThreshold != that.gapThreshold) | |||||||||||||||||||||||||||
9 | return false; | 17 | return false; | ||||||||||||||||||||||||||||
10 | if (that.upperMargin != this.upperMargin) | | |||||||||||||||||||||||||||||
11 | return false; |
| | ||||||||||||||||||||||||||||
12 | if (that.categoryMargin != this.categoryMargin) | | |||||||||||||||||||||||||||||
13 | return false; |
| | ||||||||||||||||||||||||||||
14 | if (that.maximumCategoryLabelWidthRatio != this.maximumCategoryLabelWidthRatio) | | |||||||||||||||||||||||||||||
15 | return false; |
| | ||||||||||||||||||||||||||||
16 | if (that.categoryLabelPositionOffset != this.categoryLabelPositionOffset) | | |||||||||||||||||||||||||||||
17 | return false; |
| | ||||||||||||||||||||||||||||
18 | if (!ObjectUtilities.equal(that.categoryLabelPositions, this.categoryLabelPositions)) | | |||||||||||||||||||||||||||||
19 | return false; |
| | ||||||||||||||||||||||||||||
20 | if (!ObjectUtilities.equal(that.categoryLabelToolTips, this.categoryLabelToolTips)) | | |||||||||||||||||||||||||||||
21 | return false; |
| | ||||||||||||||||||||||||||||
22 | if (!ObjectUtilities.equal(this.tickLabelFontMap, that.tickLabelFontMap)) |
| 18 | if (!ObjectUtilities.equal(this.shapesFilled, that.shapesFilled)) | |||||||||||||||||||||||||||
23 | return false; | 19 | return false; | ||||||||||||||||||||||||||||
| 22 | if (this.baseShapesFilled != that.baseShapesFilled) | |||||||||||||||||||||||||||||
|
| 23 | return false; | ||||||||||||||||||||||||||||
| 24 | if (this.drawSeriesLineAsPath != that.drawSeriesLineAsPath) | |||||||||||||||||||||||||||||
|
| 25 | return false; | ||||||||||||||||||||||||||||
| 26 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) | |||||||||||||||||||||||||||||
|
| 27 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.axis.CategoryAxis does not match with type org.jfree.chart.renderer.xy.StandardXYItemRenderer |
2 | Unmatched return false; |
3 | Unmatched return false; |
4 | Unmatched return false; |
5 | Unmatched return false; |
6 | Unmatched return false; |
7 | Expression this.seriesShapesFilled.equals(that.seriesShapesFilled) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Super method call if(!super.equals(obj)) cannot be extracted from method |
9 | Expression that.lowerMargin cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression that.gapThreshold cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Unmatched return false; |
12 | Unmatched return false; |
13 | Unmatched return false; |
14 | Unmatched return false; |
15 | Unmatched return false; |
16 | Unmatched return false; |
17 | Type java.util.Map of variable this.tickLabelFontMap does not match with type java.lang.Boolean of variable this.shapesFilled |
18 | Type java.util.Map of variable that.tickLabelFontMap does not match with type java.lang.Boolean of variable that.shapesFilled |
19 | Expression that.tickLabelFontMap cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression that.shapesFilled cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Type java.util.Map of variable that.tickLabelFontMap does not match with type java.lang.Boolean of variable that.shapesFilled |
22 | Unmatched return false; |
23 | Unmatched return false; |
24 | Unmatched return false; |
25 | Not all possible execution flows end in a return statement |
26 | The refactoring of the clones is infeasible, because classes org.jfree.chart.axis.CategoryAxis and org.jfree.chart.renderer.xy.StandardXYItemRenderer do not have a common superclass |