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