File path: /jfreechart-1.0.10/src/org/jfree/chart/block/BlockContainer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/MultipleXYSeriesLabelGenerator.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 MultipleXYSeriesLabelGenerator)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | ↵ | 6 | }↵ | |
7 | }↵ | 7 | ↵ | |
8 | if (!sup↵ | 8 | MultipleXYSeriesLabelGenerator that ↵ | |
9 | = (MultipleXYSeriesLabelGenerator) obj;↵ | |||
9 | er.equals(obj)) {↵ | 10 | if (!this.formatPattern.equals(that.formatPattern)) {↵ | |
10 | return false; ↵ | 11 | return false;↵ | |
11 | }↵ | 12 | }↵ | |
12 | BlockContainer that = (BlockContainer) obj;↵ | 13 | ↵ | |
13 | if (!this.arrangement.equals(that.arrangement↵ | 14 | if (!this.additionalFormatPattern.equals(↵ | |
14 | )) {↵ | 15 | that.additionalFormatPattern)) {↵ | |
15 | return false; ↵ | 16 | return false;↵ | |
16 | }↵ | 17 | }↵ | |
17 | if (!this.blocks.equals(that.blocks)) {↵ | 18 | if (!this.seriesLabelLists.equals(that.seriesLabelLists)) {↵ | |
18 | return false; ↵ | 19 | return false;↵ | |
19 | }↵ | 20 | }↵ | |
20 | return true; | 21 |
| |
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.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 62 |
Number of mapped statements | 11 |
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.4 |
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 BlockContainer)) |
| 3 | if (!(obj instanceof MultipleXYSeriesLabelGenerator)) | ||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
| 5 | MultipleXYSeriesLabelGenerator that = (MultipleXYSeriesLabelGenerator)obj; | ||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) |
| 6 | if (!this.formatPattern.equals(that.formatPattern)) | ||||||||||||||||||||||||||
6 | return false; | 7 | return false; | |||||||||||||||||||||||||||
7 | BlockContainer that = (BlockContainer)obj; | | ||||||||||||||||||||||||||||
8 | if (!this.arrangement.equals(that.arrangement)) |
| 8 | if (!this.additionalFormatPattern.equals(that.additionalFormatPattern)) | ||||||||||||||||||||||||||
9 | return false; | 9 | return false; | |||||||||||||||||||||||||||
10 | if (!this.blocks.equals(that.blocks)) |
| 10 | if (!this.seriesLabelLists.equals(that.seriesLabelLists)) | ||||||||||||||||||||||||||
11 | return false; | 11 | return false; | |||||||||||||||||||||||||||
12 | return true; | 12 | return true; |
Row | Violation |
---|---|
1 | Expression this.formatPattern.equals(that.formatPattern) 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 | Expression that.arrangement cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression that.additionalFormatPattern cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type org.jfree.chart.block.Arrangement of variable that.arrangement does not match with type java.lang.String of variable that.additionalFormatPattern |
6 | Type org.jfree.chart.block.Arrangement of variable this.arrangement does not match with type java.lang.String of variable this.additionalFormatPattern |
7 | Expression that.blocks cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.seriesLabelLists cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Type java.util.List of variable that.blocks does not match with type java.util.Map of variable that.seriesLabelLists |
10 | Type java.util.List of variable this.blocks does not match with type java.util.Map of variable this.seriesLabelLists |
11 | The refactoring of the clones is infeasible, because classes org.jfree.chart.block.BlockContainer and org.jfree.chart.labels.MultipleXYSeriesLabelGenerator do not have a common superclass |