File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/DefaultDrawingSupplier.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 DefaultDrawingSupplier)) {↵ | 4 | if (!(obj instanceof TextTitle)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | DefaultDrawingSupplier that = (DefaultDrawingSupplier) obj;↵ | 7 | TextTitle that = (TextTitle) obj;↵ | |
8 | if (!Arrays.equals(this.paintSequence, that.paintSequence)) {↵ | 8 | if (!ObjectUtilities.equal(this.text, that.text)) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (this.paintIndex != that.paintIndex) {↵ | 11 | if (!ObjectUtilities.equal(this.font, that.font)) {↵ | |
12 | return false; ↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!Arrays.equals(this.outlinePaintSequence, ↵ | 14 | if (!PaintUtilities.equal(this.↵ | |
15 | that.outlinePaintSequence)) {↵ | 15 | paint, that.paint)) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (this.outlinePaintIndex != that.outlinePaintIndex) {↵ | 18 | if (this.textAlignment != that.textAlignment) {↵ | |
19 | return false;↵ | 19 | return false;↵ | |
20 | }↵ | 20 | }↵ | |
21 | if (!Arrays.equals(this.strokeSequence, that.strokeSequence)) {↵ | 21 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) {↵ | |
22 | return false;↵ | 22 | return false;↵ | |
23 | }↵ | 23 | }↵ | |
24 | if (this.strokeIndex != that.strokeIndex) {↵ | 24 | if (this.maximumLinesToDisplay != that.maximumLinesToDisplay) {↵ | |
25 | return false; ↵ | 25 | return false;↵ | |
26 | }↵ | 26 | }↵ | |
27 | if (!Arrays.equals(this.outlineStrokeSequence, ↵ | 27 | if (↵ | |
28 | that.outlineStrokeSequence)) {↵ | 28 | this.expandToFitSpace != that.expandToFitSpace) {↵ | |
29 | return false;↵ | 29 | return false;↵ | |
30 | }↵ | 30 | }↵ | |
31 | if (this.outlineStrokeIndex != that.outlineStrokeIndex) {↵ | 31 | if (!ObjectUtilities.equal(this.toolTipText, that.toolTipText)) {↵ | |
32 | return false; ↵ | 32 | return false;↵ | |
33 | }↵ | 33 | }↵ | |
34 | if (!equalShapes(this.shapeSequence, that.shapeSequence)) {↵ | 34 | if (!↵ | |
35 | return false;↵ | |||
36 | }↵ | |||
37 | if (this.shapeIndex != that.shapeIndex) {↵ | 35 | ObjectUtilities.equal(this.urlText, that.urlText)) {↵ | |
38 | return false;↵ | 36 | return false;↵ | |
39 | }↵ | 37 | }↵ | |
40 | return true; | 38 | 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) | 15.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 181 |
Number of mapped statements | 13 |
Number of unmapped statements in the first code fragment | 10 |
Number of unmapped statements in the second code fragment | 6 |
Time elapsed for statement mapping (ms) | 14.6 |
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 DefaultDrawingSupplier)) |
| 3 | if (!(obj instanceof TextTitle)) | ||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
5 | DefaultDrawingSupplier that = (DefaultDrawingSupplier)obj; |
| 5 | TextTitle that = (TextTitle)obj; | ||||||||||||||||||||||||||
|
| 6 | if (!ObjectUtilities.equal(this.text, that.text)) | |||||||||||||||||||||||||||
|
| 7 | return false; | |||||||||||||||||||||||||||
6 | if (!Arrays.equals(this.paintSequence, that.paintSequence)) |
| | |||||||||||||||||||||||||||
7 | return false; |
| | |||||||||||||||||||||||||||
|
| 8 | if (!ObjectUtilities.equal(this.font, that.font)) | |||||||||||||||||||||||||||
|
| 9 | return false; | |||||||||||||||||||||||||||
|
| 10 | if (!PaintUtilities.equal(this.paint, that.paint)) | |||||||||||||||||||||||||||
|
| 11 | return false; | |||||||||||||||||||||||||||
8 | if (this.paintIndex != that.paintIndex) |
| 16 | if (this.maximumLinesToDisplay != that.maximumLinesToDisplay) | ||||||||||||||||||||||||||
9 | return false; | 17 | return false; | |||||||||||||||||||||||||||
10 | if (!Arrays.equals(this.outlinePaintSequence, that.outlinePaintSequence)) |
| | |||||||||||||||||||||||||||
11 | return false; |
| | |||||||||||||||||||||||||||
12 | if (this.outlinePaintIndex != that.outlinePaintIndex) |
| 12 | if (this.textAlignment != that.textAlignment) | ||||||||||||||||||||||||||
13 | return false; | 13 | return false; | |||||||||||||||||||||||||||
14 | if (!Arrays.equals(this.strokeSequence, that.strokeSequence)) |
| | |||||||||||||||||||||||||||
15 | return false; |
| | |||||||||||||||||||||||||||
16 | if (this.strokeIndex != that.strokeIndex) |
| 18 | if (this.expandToFitSpace != that.expandToFitSpace) | ||||||||||||||||||||||||||
17 | return false; | 19 | return false; | |||||||||||||||||||||||||||
18 | if (!Arrays.equals(this.outlineStrokeSequence, that.outlineStrokeSequence)) |
| | |||||||||||||||||||||||||||
19 | return false; |
| | |||||||||||||||||||||||||||
20 | if (this.outlineStrokeIndex != that.outlineStrokeIndex) |
| | |||||||||||||||||||||||||||
21 | return false; |
| | |||||||||||||||||||||||||||
22 | if (!equalShapes(this.shapeSequence, that.shapeSequence)) |
| 14 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) | ||||||||||||||||||||||||||
23 | return false; | 15 | return false; |
Row | Violation |
---|---|
1 | Unmatched statement if(!ObjectUtilities.equal(this.text,that.text)) 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 | Unmatched statement if(!Arrays.equals(this.paintSequence,that.paintSequence)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched return false; |
5 | Unmatched statement if(!ObjectUtilities.equal(this.font,that.font)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched return false; |
7 | Unmatched statement if(!PaintUtilities.equal(this.paint,that.paint)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | Unmatched return false; |
9 | Expression that.paintIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression that.maximumLinesToDisplay cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Unmatched statement if(!Arrays.equals(this.outlinePaintSequence,that.outlinePaintSequence)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
12 | Unmatched return false; |
13 | Type int of variable this.outlinePaintIndex does not match with type org.jfree.ui.HorizontalAlignment of variable this.textAlignment |
14 | Expression that.outlinePaintIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression that.textAlignment cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Type int of variable that.outlinePaintIndex does not match with type org.jfree.ui.HorizontalAlignment of variable that.textAlignment |
17 | Unmatched statement if(!Arrays.equals(this.strokeSequence,that.strokeSequence)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
18 | Unmatched return false; |
19 | Type int of variable this.strokeIndex does not match with type boolean of variable this.expandToFitSpace |
20 | Expression that.strokeIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression that.expandToFitSpace cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Type int of variable that.strokeIndex does not match with type boolean of variable that.expandToFitSpace |
23 | Unmatched statement if(!Arrays.equals(this.outlineStrokeSequence,that.outlineStrokeSequence)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
24 | Unmatched return false; |
25 | Unmatched statement if(this.outlineStrokeIndex != that.outlineStrokeIndex) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
26 | Unmatched return false; |
27 | Expression equalShapes(this.shapeSequence,that.shapeSequence) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
28 | Expression PaintUtilities.equal(this.backgroundPaint,that.backgroundPaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
29 | Clone fragment #1 returns variable that with type org.jfree.chart.plot.DefaultDrawingSupplier , while Clone fragment #2 returns variable that with type org.jfree.chart.title.TextTitle |
30 | Not all possible execution flows end in a return statement |
31 | The refactoring of the clones is infeasible, because classes org.jfree.chart.plot.DefaultDrawingSupplier and org.jfree.chart.title.TextTitle do not have a common superclass |