File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CategoryAxis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/title/TextTitle.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 26 | Number of AST nodes: 24 | |||
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 ↵ | |
5 | return false;↵ | |||
6 | }↵ | |||
7 | if (!super.equals(obj)) {↵ | 5 | TextTitle)) {↵ | |
8 | return false;↵ | 6 | return false;↵ | |
9 | }↵ | 7 | }↵ | |
10 | CategoryAxis that = (CategoryAxis) obj;↵ | 8 | ↵ | |
11 | if (that.lowerMargin != this.lowerMargin↵ | 9 | TextTitle that = (TextTitle) obj;↵ | |
12 | ) {↵ | 10 | if (!ObjectUtilities.equal(this.text, that.text)) {↵ | |
13 | return false;↵ | 11 | return false;↵ | |
14 | }↵ | 12 | }↵ | |
15 | if (that.upperMargin != this.upperMargin) {↵ | 13 | if (!ObjectUtilities.equal(this.font, that.font)) {↵ | |
16 | return false;↵ | 14 | return false;↵ | |
17 | }↵ | 15 | }↵ | |
18 | if (that.categoryMargin != this.categoryMargin) {↵ | 16 | if (!PaintUtilities.equal(this.paint, that.paint)) {↵ | |
19 | return false;↵ | 17 | return false;↵ | |
20 | }↵ | 18 | }↵ | |
21 | if (that.maximumCategoryLabelWidthRatio↵ | 19 | if (th↵ | |
22 | != this.maximumCategoryLabelWidthRatio) {↵ | 20 | is.textAlignment != that.textAlignment) {↵ | |
23 | return false;↵ | 21 | return false;↵ | |
24 | }↵ | 22 | }↵ | |
25 | if (that.categoryLabelPositionOffset↵ | 23 | if (↵ | |
26 | != this.categoryLabelPositionOffset) {↵ | 24 | !PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) {↵ | |
27 | return false;↵ | 25 | return false;↵ | |
28 | }↵ | 26 | }↵ | |
29 | if (!ObjectUtilities.equal(that.categoryLabelPositions,↵ | 27 | if (↵ | |
30 | this.categoryLabelPositions)) {↵ | 28 | this.maximumLinesToDisplay != that.maximumLinesToDisplay) {↵ | |
31 | return false;↵ | 29 | return false;↵ | |
32 | }↵ | 30 | }↵ | |
33 | if (!ObjectUtilities.equal(that.categoryLabelToolTips,↵ | 31 | if (↵ | |
34 | this.categoryLabelToolTips)) {↵ | 32 | this.expandToFitSpace != that.expandToFitSpace) {↵ | |
35 | return false;↵ | 33 | return false;↵ | |
36 | }↵ | 34 | }↵ | |
37 | if (!ObjectUtilities.equal(this.tickLabelFontMap,↵ | 35 | if (!ObjectUtilities.equal(this.t↵ | |
38 | that.tickLabelFontMap)) {↵ | 36 | oolTipText, that.toolTipText)) {↵ | |
39 | return false;↵ | 37 | return false;↵ | |
40 | }↵ | 38 | }↵ | |
41 | if (!equalPaintMaps(this.tickLabelPaintMap, that.tickLabelPaintMap)) {↵ | 39 | if (!ObjectUtilities.equal(this.urlText, that.urlText)) {↵ | |
42 | return false;↵ | 40 | return false;↵ | |
43 | }↵ | 41 | }↵ | |
44 | return true; | 42 | 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) | 85.7 |
Clones location | Clones are in different classes |
Number of node comparisons | 181 |
Number of mapped statements | 12 |
Number of unmapped statements in the first code fragment | 13 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 139.0 |
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 TextTitle)) | |||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||
| 5 | TextTitle that = (TextTitle)obj; | |||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) |
| 6 | if (!ObjectUtilities.equal(this.text, that.text)) | |||||||||||||||||||||||||||
6 | return false; | 7 | return false; | ||||||||||||||||||||||||||||
7 | CategoryAxis that = (CategoryAxis)obj; | | |||||||||||||||||||||||||||||
8 | if (that.lowerMargin != this.lowerMargin) | | |||||||||||||||||||||||||||||
9 | return false; |
| | ||||||||||||||||||||||||||||
| 10 | if (!PaintUtilities.equal(this.paint, that.paint)) | |||||||||||||||||||||||||||||
|
| 11 | return false; | ||||||||||||||||||||||||||||
10 | if (that.upperMargin != this.upperMargin) | | |||||||||||||||||||||||||||||
11 | return false; |
| | ||||||||||||||||||||||||||||
| 12 | if (this.textAlignment != that.textAlignment) | |||||||||||||||||||||||||||||
|
| 13 | 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) |
| 16 | if (this.maximumLinesToDisplay != that.maximumLinesToDisplay) | |||||||||||||||||||||||||||
17 | return false; | 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)) |
| 8 | if (!ObjectUtilities.equal(this.font, that.font)) | |||||||||||||||||||||||||||
23 | return false; | 9 | return false; | ||||||||||||||||||||||||||||
24 | if (!equalPaintMaps(this.tickLabelPaintMap, that.tickLabelPaintMap)) |
| 14 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) | |||||||||||||||||||||||||||
25 | return false; | 15 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.axis.CategoryAxis does not match with type org.jfree.chart.title.TextTitle |
2 | Expression ObjectUtilities.equal(this.text,that.text) 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 | Unmatched return false; |
5 | Unmatched return false; |
6 | Unmatched return false; |
7 | Unmatched return false; |
8 | Unmatched return false; |
9 | Unmatched return false; |
10 | Expression that.categoryLabelPositionOffset cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.maximumLinesToDisplay cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Unmatched return false; |
13 | Unmatched return false; |
14 | Type java.util.Map of variable this.tickLabelFontMap does not match with type java.awt.Font of variable this.font |
15 | Type java.util.Map of variable that.tickLabelFontMap does not match with type java.awt.Font of variable that.font |
16 | Expression that.tickLabelFontMap cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression that.font cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Type java.util.Map of variable that.tickLabelFontMap does not match with type java.awt.Font of variable that.font |
19 | Expression equalPaintMaps(this.tickLabelPaintMap,that.tickLabelPaintMap) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression PaintUtilities.equal(this.backgroundPaint,that.backgroundPaint) 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.title.TextTitle do not have a common superclass |