File path: /jfreechart-1.0.10/src/org/jfree/chart/block/ColorBlock.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/YIntervalRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof ColorBlock)) {↵ | 4 | if (!(obj instanceof YIntervalRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | ColorBlock that = (ColorBlock) obj;↵ | 7 | YIntervalRenderer that = (YIntervalRenderer) obj;↵ | |
8 | if (!PaintUtilities.equal(this.paint, that.paint↵ | 8 | if (!ObjectUtilities.equal(this.additionalItemLabelGenerator,↵ | |
9 | )) {↵ | 9 | that.additionalItemLabelGenerator)) {↵ | |
10 | return false;↵ | 10 | return false;↵ | |
11 | }↵ | 11 | }↵ | |
12 | return super.equals(obj); | 12 | 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) | 0.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 25 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 3.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 ColorBlock)) |
| 3 | if (!(obj instanceof YIntervalRenderer)) | |||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||||||
| 5 | YIntervalRenderer that = (YIntervalRenderer)obj; | |||||||||||||||||||||||||||||||||
5 | ColorBlock that = (ColorBlock)obj; | | |||||||||||||||||||||||||||||||||
6 | if (!PaintUtilities.equal(this.paint, that.paint)) |
| 6 | if (!ObjectUtilities.equal(this.additionalItemLabelGenerator, that.additionalItemLabelGenerator)) | |||||||||||||||||||||||||||||||
7 | return false; | 7 | return false; | ||||||||||||||||||||||||||||||||
8 | return super.equals(obj); |
| 8 | return super.equals(obj); |
Row | Violation |
---|---|
1 | Type org.jfree.chart.block.ColorBlock does not match with type org.jfree.chart.renderer.xy.YIntervalRenderer |
2 | Type java.awt.Paint of variable this.paint does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable this.additionalItemLabelGenerator |
3 | Type java.awt.Paint of variable that.paint does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable that.additionalItemLabelGenerator |
4 | Expression that.paint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.additionalItemLabelGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type java.awt.Paint of variable that.paint does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable that.additionalItemLabelGenerator |
7 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ObjectUtilities |
8 | Super method call return super.equals(obj); cannot be extracted from method |
9 | Super method call return super.equals(obj); cannot be extracted from method |
10 | The refactoring of the clones is infeasible, because classes org.jfree.chart.block.ColorBlock and org.jfree.chart.renderer.xy.YIntervalRenderer do not have a common superclass |