File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/NumberAxis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYDifferenceRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 18 | Number of AST nodes: 18 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true; ↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof NumberAxis)) {↵ | 4 | if (!(obj instanceof XYDifferenceRenderer)) {↵ | |
5 | return false;↵ | 5 | return false; ↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!super.equals(obj)) {↵ | 7 | if (!super.equals(obj)) {↵ | |
8 | return false;↵ | 8 | return false; ↵ | |
9 | }↵ | 9 | }↵ | |
10 | NumberAxis that = (NumberAxis) obj;↵ | 10 | ↵ | |
11 | if (this.autoRangeIncludesZero != that.autoRangeIncludesZero↵ | 11 | XYDifferenceRenderer that = (XYDifferenceRenderer) obj;↵ | |
12 | ) {↵ | 12 | if (!PaintUtilities.equal(this.positivePaint, that.positivePaint)) {↵ | |
13 | return false;↵ | 13 | return false; ↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (this.autoRangeStickyZero != that.autoRangeStickyZero) {↵ | 15 | if (!PaintUtilities.equal(this.negativePaint, that.negativePaint)) {↵ | |
16 | return false;↵ | 16 | return false; ↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) {↵ | 18 | if (this.shapesVisible != that.shapesVisible) {↵ | |
19 | return false;↵ | 19 | return false; ↵ | |
20 | }↵ | 20 | }↵ | |
21 | if (!ObjectUtilities.equal(this.numberFormatOverride,↵ | 21 | if (!ShapeUtilities.equal(this.↵ | |
22 | that.numberFormatOverride)) {↵ | 22 | legendLine, that.legendLine)) {↵ | |
23 | return false;↵ | 23 | return false; ↵ | |
24 | }↵ | 24 | }↵ | |
25 | if (!this.rangeType.equals(that.rangeType)) {↵ | 25 | if (this.roundXCoordinates != that.roundXCoordinates) {↵ | |
26 | return false;↵ | 26 | return false;↵ | |
27 | }↵ | 27 | }↵ | |
28 | return true; | 28 |
| |
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) | 5.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 125 |
Number of mapped statements | 18 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 9.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 1 | if (obj == this) | |||||||||||||||||||||||||||||||
2 | return true; | 2 | return true; | |||||||||||||||||||||||||||||||
3 | if (!(obj instanceof NumberAxis)) |
| 3 | if (!(obj instanceof XYDifferenceRenderer)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) |
| 5 | if (!super.equals(obj)) | ||||||||||||||||||||||||||||||
6 | return false; | 6 | return false; | |||||||||||||||||||||||||||||||
7 | NumberAxis that = (NumberAxis)obj; |
| 7 | XYDifferenceRenderer that = (XYDifferenceRenderer)obj; | ||||||||||||||||||||||||||||||
8 | if (this.autoRangeIncludesZero != that.autoRangeIncludesZero) |
| 12 | if (this.shapesVisible != that.shapesVisible) | ||||||||||||||||||||||||||||||
9 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
10 | if (this.autoRangeStickyZero != that.autoRangeStickyZero) |
| 16 | if (this.roundXCoordinates != that.roundXCoordinates) | ||||||||||||||||||||||||||||||
11 | return false; | 17 | return false; | |||||||||||||||||||||||||||||||
12 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) |
| 10 | if (!PaintUtilities.equal(this.negativePaint, that.negativePaint)) | ||||||||||||||||||||||||||||||
13 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
14 | if (!ObjectUtilities.equal(this.numberFormatOverride, that.numberFormatOverride)) |
| 14 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) | ||||||||||||||||||||||||||||||
15 | return false; | 15 | return false; | |||||||||||||||||||||||||||||||
16 | if (!this.rangeType.equals(that.rangeType)) |
| 8 | if (!PaintUtilities.equal(this.positivePaint, that.positivePaint)) | ||||||||||||||||||||||||||||||
17 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
18 | return true; | 18 | return true; |
Row | Violation |
---|---|
1 | Super method call if(!super.equals(obj)) cannot be extracted from method |
2 | Super method call if(!super.equals(obj)) cannot be extracted from method |
3 | Expression that.autoRangeIncludesZero cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression that.shapesVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.autoRangeStickyZero cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.roundXCoordinates cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Type org.jfree.chart.axis.NumberTickUnit of variable this.tickUnit does not match with type java.awt.Paint of variable this.negativePaint |
8 | Expression that.tickUnit cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.negativePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Type org.jfree.chart.axis.NumberTickUnit of variable that.tickUnit does not match with type java.awt.Paint of variable that.negativePaint |
11 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
12 | Type java.text.NumberFormat of variable this.numberFormatOverride does not match with type java.awt.Shape of variable this.legendLine |
13 | Expression that.numberFormatOverride cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression that.legendLine cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Type java.text.NumberFormat of variable that.numberFormatOverride does not match with type java.awt.Shape of variable that.legendLine |
16 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.ShapeUtilities |
17 | Expression this.rangeType.equals(that.rangeType) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression PaintUtilities.equal(this.positivePaint,that.positivePaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | The refactoring of the clones is infeasible, because classes org.jfree.chart.axis.NumberAxis and org.jfree.chart.renderer.xy.XYDifferenceRenderer do not have a common superclass |