File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StandardXYItemRenderer.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: 28 | 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 StandardXYItemRenderer)) {↵ | 4 | if (!(obj instanceof TextTitle)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | StandardXYItemRenderer that = (StandardXYItemRenderer) obj;↵ | 7 | ↵ | |
8 | if (this.baseShapesVisible != that.baseShapesVisible) {↵ | |||
9 | return false;↵ | |||
10 | }↵ | |||
11 | if (this.plotLines != that.plotLines) {↵ | |||
12 | return false;↵ | |||
13 | }↵ | |||
14 | if (this.plotImages != that.plotImages) {↵ | |||
15 | return false;↵ | |||
16 | }↵ | |||
17 | if (this.plotDiscontinuous != that.plotDiscontinuous↵ | 8 | TextTitle that = (TextTitle) obj;↵ | |
9 | if (!ObjectUtilities.equal(this.text, that.text)) {↵ | |||
10 | return false;↵ | |||
11 | }↵ | |||
18 | ) {↵ | 12 | if (!ObjectUtilities.equal(this.font, that.font)) {↵ | |
19 | return false;↵ | 13 | return false;↵ | |
20 | }↵ | 14 | }↵ | |
21 | if (this.gapThresholdType != that.gapThresholdType) {↵ | 15 | if (!PaintUtilities.equal(this.paint, that.paint)) {↵ | |
22 | return false;↵ | 16 | return false;↵ | |
23 | }↵ | 17 | }↵ | |
24 | if (this.gapThreshold != that.gapThreshold) {↵ | 18 | if (this.textAlignment != that.textAlignment) {↵ | |
25 | return false;↵ | 19 | return false;↵ | |
26 | }↵ | 20 | }↵ | |
27 | if (!ObjectUtilities.equal(this.shapesFilled, that.shapesFilled)) {↵ | 21 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) {↵ | |
28 | return false;↵ | 22 | return false;↵ | |
29 | }↵ | 23 | }↵ | |
30 | if (!this.seriesShapesFilled.equals(that.seriesShapesFilled)) {↵ | 24 | if (this.maximumLinesToDisplay != that.maximumLinesToDisplay) {↵ | |
31 | return false;↵ | 25 | return false;↵ | |
32 | }↵ | 26 | }↵ | |
33 | if (this.baseShapesFilled != that.baseShapesFilled) {↵ | 27 | if (this.expandToFitSpace != that.expandToFitSpace) {↵ | |
34 | return false;↵ | 28 | return false;↵ | |
35 | }↵ | 29 | }↵ | |
36 | if (this.drawSeriesLineAsPath != that.drawSeriesLineAsPath) {↵ | 30 | if (!ObjectUtilities.equal(this.toolTipText, that.toolTipText)) {↵ | |
37 | return false;↵ | 31 | return false;↵ | |
38 | }↵ | 32 | }↵ | |
39 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) {↵ | 33 | if (!ObjectUtilities.equal(this.urlText, that.urlText)) {↵ | |
40 | return false;↵ | 34 | return false;↵ | |
41 | }↵ | 35 | }↵ | |
42 | return super.equals(obj); | 36 |
| |
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) | 14.7 |
Clones location | Clones are in different classes |
Number of node comparisons | 207 |
Number of mapped statements | 17 |
Number of unmapped statements in the first code fragment | 10 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 16.9 |
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 StandardXYItemRenderer)) |
| 3 | if (!(obj instanceof TextTitle)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
5 | StandardXYItemRenderer that = (StandardXYItemRenderer)obj; |
| 5 | TextTitle that = (TextTitle)obj; | ||||||||||||||||||||||||||||||
|
| 6 | if (!ObjectUtilities.equal(this.text, that.text)) | |||||||||||||||||||||||||||||||
|
| 7 | return false; | |||||||||||||||||||||||||||||||
6 | if (this.baseShapesVisible != that.baseShapesVisible) |
| 18 | if (this.expandToFitSpace != that.expandToFitSpace) | ||||||||||||||||||||||||||||||
7 | return false; | 19 | return false; | |||||||||||||||||||||||||||||||
8 | if (this.plotLines != that.plotLines) |
| 12 | if (this.textAlignment != that.textAlignment) | ||||||||||||||||||||||||||||||
9 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
10 | if (this.plotImages != that.plotImages) |
| 16 | if (this.maximumLinesToDisplay != that.maximumLinesToDisplay) | ||||||||||||||||||||||||||||||
11 | return false; | 17 | return false; | |||||||||||||||||||||||||||||||
12 | if (this.plotDiscontinuous != that.plotDiscontinuous) |
| | |||||||||||||||||||||||||||||||
13 | return false; |
| | |||||||||||||||||||||||||||||||
14 | if (this.gapThresholdType != that.gapThresholdType) |
| | |||||||||||||||||||||||||||||||
15 | return false; |
| | |||||||||||||||||||||||||||||||
16 | if (this.gapThreshold != that.gapThreshold) |
| | |||||||||||||||||||||||||||||||
17 | return false; |
| | |||||||||||||||||||||||||||||||
18 | if (!ObjectUtilities.equal(this.shapesFilled, that.shapesFilled)) |
| 8 | if (!ObjectUtilities.equal(this.font, that.font)) | ||||||||||||||||||||||||||||||
19 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
20 | if (!this.seriesShapesFilled.equals(that.seriesShapesFilled)) |
| 14 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) | ||||||||||||||||||||||||||||||
21 | return false; | 15 | 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)) |
| 10 | if (!PaintUtilities.equal(this.paint, that.paint)) | ||||||||||||||||||||||||||||||
27 | return false; | 11 | 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 | Expression that.baseShapesVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression that.expandToFitSpace cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type boolean of variable this.plotLines does not match with type org.jfree.ui.HorizontalAlignment of variable this.textAlignment |
6 | Expression that.plotLines cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.textAlignment cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type boolean of variable that.plotLines does not match with type org.jfree.ui.HorizontalAlignment of variable that.textAlignment |
9 | Type boolean of variable this.plotImages does not match with type int of variable this.maximumLinesToDisplay |
10 | Expression that.plotImages 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 | Type boolean of variable that.plotImages does not match with type int of variable that.maximumLinesToDisplay |
13 | Unmatched statement if(this.plotDiscontinuous != that.plotDiscontinuous) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
14 | Unmatched return false; |
15 | Unmatched statement if(this.gapThresholdType != that.gapThresholdType) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
16 | Unmatched return false; |
17 | Unmatched statement if(this.gapThreshold != that.gapThreshold) 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 java.lang.Boolean of variable this.shapesFilled does not match with type java.awt.Font of variable this.font |
20 | Expression that.shapesFilled cannot be unified with expression that.font , because common superclass type java.io.Serializable cannot be passed as an argument to public static boolean equal(java.lang.Object, java.lang.Object) |
21 | Expression that.shapesFilled cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Expression that.font cannot be parameterized, because it has dependencies to/from statements that will be extracted |
23 | Type java.lang.Boolean of variable that.shapesFilled does not match with type java.awt.Font of variable that.font |
24 | Expression this.seriesShapesFilled.equals(that.seriesShapesFilled) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
25 | Expression PaintUtilities.equal(this.backgroundPaint,that.backgroundPaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
26 | Unmatched statement if(this.baseShapesFilled != that.baseShapesFilled) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
27 | Unmatched return false; |
28 | Unmatched statement if(this.drawSeriesLineAsPath != that.drawSeriesLineAsPath) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
29 | Unmatched return false; |
30 | Type java.awt.Shape of variable this.legendLine does not match with type java.awt.Paint of variable this.paint |
31 | Expression that.legendLine cannot be parameterized, because it has dependencies to/from statements that will be extracted |
32 | Expression that.paint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
33 | Type java.awt.Shape of variable that.legendLine does not match with type java.awt.Paint of variable that.paint |
34 | Type org.jfree.util.ShapeUtilities does not match with type org.jfree.util.PaintUtilities |
35 | Clone fragment #1 returns variable that with type org.jfree.chart.renderer.xy.StandardXYItemRenderer , while Clone fragment #2 returns variable that with type org.jfree.chart.title.TextTitle |
36 | Not all possible execution flows end in a return statement |
37 | The refactoring of the clones is infeasible, because classes org.jfree.chart.renderer.xy.StandardXYItemRenderer and org.jfree.chart.title.TextTitle do not have a common superclass |