File path: /jfreechart-1.0.10/src/org/jfree/chart/block/BorderArrangement.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: 16 | 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 BorderArrangement↵ | 4 | if (!(obj instanceof XYDifferenceRenderer)) {↵ | |
5 | return false; ↵ | |||
6 | }↵ | |||
5 | )) {↵ | 7 | if (!super.equals(obj)) {↵ | |
6 | return false;↵ | 8 | return false; ↵ | |
7 | }↵ | 9 | }↵ | |
8 | BorderArrangement that = (BorderArrangement) obj;↵ | 10 | XYDifferenceRenderer that = (XYDifferenceRenderer) obj;↵ | |
9 | if (!ObjectUtilities.equal(this.topBlock, that.topBlock)) {↵ | 11 | if (!PaintUtilities.equal(this.positivePaint, that.positivePaint)) {↵ | |
10 | return false;↵ | 12 | return false; ↵ | |
11 | }↵ | 13 | }↵ | |
12 | if (!ObjectUtilities.equal(this.bottomBlock, that.bottomBlock)) {↵ | 14 | if (!PaintUtilities.equal(this.negativePaint, that.negativePaint)) {↵ | |
13 | return false;↵ | 15 | return false; ↵ | |
14 | }↵ | 16 | }↵ | |
15 | if (!ObjectUtilities.equal(this.leftBlock, that.leftBlock)) {↵ | 17 | if (this.shapesVisible != that.shapesVisible) {↵ | |
16 | return false;↵ | 18 | return false; ↵ | |
17 | }↵ | 19 | }↵ | |
18 | if (!ObjectUtilities.equal(this.rightBlock, that.rightBlock)) {↵ | 20 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) {↵ | |
19 | return false;↵ | 21 | return false; ↵ | |
20 | }↵ | 22 | }↵ | |
21 | if (!ObjectUtilities.equal(this.centerBlock, that.centerBlock)) {↵ | 23 | if (this.roundXCoordinates != that.roundXCoordinates) {↵ | |
22 | return false;↵ | 24 | return false;↵ | |
23 | }↵ | 25 | }↵ | |
24 | return true; | 26 |
| |
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.7 |
Clones location | Clones are in different classes |
Number of node comparisons | 105 |
Number of mapped statements | 12 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 5.1 |
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 BorderArrangement)) |
| 3 | if (!(obj instanceof XYDifferenceRenderer)) | |||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||||||
5 | BorderArrangement that = (BorderArrangement)obj; | | |||||||||||||||||||||||||||||||||
| 7 | XYDifferenceRenderer that = (XYDifferenceRenderer)obj; | |||||||||||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.topBlock, that.topBlock)) |
| 8 | if (!PaintUtilities.equal(this.positivePaint, that.positivePaint)) | |||||||||||||||||||||||||||||||
7 | return false; | 9 | return false; | ||||||||||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.bottomBlock, that.bottomBlock)) |
| 10 | if (!PaintUtilities.equal(this.negativePaint, that.negativePaint)) | |||||||||||||||||||||||||||||||
9 | return false; | 11 | return false; | ||||||||||||||||||||||||||||||||
| 12 | if (this.shapesVisible != that.shapesVisible) | |||||||||||||||||||||||||||||||||
|
| 13 | return false; | ||||||||||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.leftBlock, that.leftBlock)) |
| 14 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) | |||||||||||||||||||||||||||||||
11 | return false; | 15 | return false; | ||||||||||||||||||||||||||||||||
12 | if (!ObjectUtilities.equal(this.rightBlock, that.rightBlock)) |
| 5 | if (!super.equals(obj)) | |||||||||||||||||||||||||||||||
13 | return false; | 6 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.block.BorderArrangement does not match with type org.jfree.chart.renderer.xy.XYDifferenceRenderer |
2 | Type org.jfree.chart.block.Block of variable this.topBlock does not match with type java.awt.Paint of variable this.positivePaint |
3 | Type org.jfree.chart.block.Block of variable that.topBlock does not match with type java.awt.Paint of variable that.positivePaint |
4 | Expression that.topBlock cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.positivePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type org.jfree.chart.block.Block of variable that.topBlock does not match with type java.awt.Paint of variable that.positivePaint |
7 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
8 | Type org.jfree.chart.block.Block of variable this.bottomBlock does not match with type java.awt.Paint of variable this.negativePaint |
9 | Type org.jfree.chart.block.Block of variable that.bottomBlock does not match with type java.awt.Paint of variable that.negativePaint |
10 | Expression that.bottomBlock cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.negativePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type org.jfree.chart.block.Block of variable that.bottomBlock does not match with type java.awt.Paint of variable that.negativePaint |
13 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
14 | Unmatched return false; |
15 | Type org.jfree.chart.block.Block of variable this.leftBlock does not match with type java.awt.Shape of variable this.legendLine |
16 | Type org.jfree.chart.block.Block of variable that.leftBlock does not match with type java.awt.Shape of variable that.legendLine |
17 | Expression that.leftBlock cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression that.legendLine cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Type org.jfree.chart.block.Block of variable that.leftBlock does not match with type java.awt.Shape of variable that.legendLine |
20 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.ShapeUtilities |
21 | Expression ObjectUtilities.equal(this.rightBlock,that.rightBlock) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Super method call if(!super.equals(obj)) cannot be extracted from method |
23 | Not all possible execution flows end in a return statement |
24 | The refactoring of the clones is infeasible, because classes org.jfree.chart.block.BorderArrangement and org.jfree.chart.renderer.xy.XYDifferenceRenderer do not have a common superclass |