File path: /jfreechart-1.0.10/src/org/jfree/chart/block/BlockContainer.java | File path: /jfreechart-1.0.10/src/org/jfree/data/statistics/SimpleHistogramDataset.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true; ↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof BlockContainer)) {↵ | 4 | if (!(obj instanceof SimpleHistogramDataset)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | ↵ | 6 | }↵ | |
7 | }↵ | 7 | ↵ | |
8 | if (!super.equals(obj↵ | 8 | SimpleHistogramDataset that = (SimpleHistogramDataset) obj;↵ | |
9 | )) {↵ | 9 | if (!this.key.equals(that.key)) {↵ | |
10 | return false; ↵ | 10 | return false;↵ | |
11 | }↵ | 11 | }↵ | |
12 | BlockContainer that = (BlockContainer) obj;↵ | 12 | ↵ | |
13 | if (!this.arrangement.equals(that.arrangement)) {↵ | 13 | if (this.adjustForBinSize != that.adjustForBinSize) {↵ | |
14 | return false; ↵ | 14 | return false;↵ | |
15 | }↵ | 15 | }↵ | |
16 | if (!this.blocks.equals(that.blocks)) {↵ | 16 | if (!this.bins.equals(that.bins)) {↵ | |
17 | return false; ↵ | 17 | return false;↵ | |
18 | }↵ | 18 | }↵ | |
19 | return true; | 19 |
| |
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) | 2.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 47 |
Number of mapped statements | 8 |
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) | 3.2 |
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 BlockContainer)) |
| 3 | if (!(obj instanceof SimpleHistogramDataset)) | ||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
| 5 | SimpleHistogramDataset that = (SimpleHistogramDataset)obj; | ||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) |
| 6 | if (!this.key.equals(that.key)) | ||||||||||||||||||||||||||
6 | return false; | 7 | return false; | |||||||||||||||||||||||||||
7 | BlockContainer that = (BlockContainer)obj; | | ||||||||||||||||||||||||||||
| 8 | if (this.adjustForBinSize != that.adjustForBinSize) | ||||||||||||||||||||||||||||
|
| 9 | return false; | |||||||||||||||||||||||||||
8 | if (!this.arrangement.equals(that.arrangement)) |
| 10 | if (!this.bins.equals(that.bins)) | ||||||||||||||||||||||||||
9 | return false; | 11 | return false; |
Row | Violation |
---|---|
1 | Expression this.key.equals(that.key) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Super method call if(!super.equals(obj)) cannot be extracted from method |
3 | Unmatched return false; |
4 | Expression that.arrangement cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.bins cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type org.jfree.chart.block.Arrangement of variable that.arrangement does not match with type java.util.List of variable that.bins |
7 | Type org.jfree.chart.block.Arrangement of variable this.arrangement does not match with type java.util.List of variable this.bins |
8 | Not all possible execution flows end in a return statement |
9 | The refactoring of the clones is infeasible, because classes org.jfree.chart.block.BlockContainer and org.jfree.data.statistics.SimpleHistogramDataset do not have a common superclass |