File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/MultipleXYSeriesLabelGenerator.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 MultipleXYSeriesLabelGenerator)) {↵ | 4 | if (!(obj instanceof SimpleHistogramDataset)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | MultipleXYSeriesLabelGenerator that ↵ | 7 | ↵ | |
8 | = (MultipleXYSeriesLabelGenerator) obj;↵ | 8 | SimpleHistogramDataset that = (SimpleHistogramDataset) obj;↵ | |
9 | if (!this.formatPattern.equals(that.formatPattern)) {↵ | 9 | if (!this.key.equals(that.key)) {↵ | |
10 | return false;↵ | 10 | return false;↵ | |
11 | }↵ | 11 | }↵ | |
12 | if (!this.additionalFormatPattern.equals(↵ | 12 | if (this.ad↵ | |
13 | that.additionalFormatPattern)) {↵ | 13 | justForBinSize != that.adjustForBinSize) {↵ | |
14 | return false;↵ | 14 | return false;↵ | |
15 | }↵ | 15 | }↵ | |
16 | if (!this.seriesLabelLists.equals(that.seriesLabelLists)) {↵ | 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) | 3.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 47 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 4.7 |
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 MultipleXYSeriesLabelGenerator)) |
| 3 | if (!(obj instanceof SimpleHistogramDataset)) | |||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||
5 | MultipleXYSeriesLabelGenerator that = (MultipleXYSeriesLabelGenerator)obj; |
| 5 | SimpleHistogramDataset that = (SimpleHistogramDataset)obj; | |||||||||||||||||||||||||||
6 | if (!this.formatPattern.equals(that.formatPattern)) |
| 6 | if (!this.key.equals(that.key)) | |||||||||||||||||||||||||||
7 | return false; | 7 | return false; | ||||||||||||||||||||||||||||
|
| 8 | if (this.adjustForBinSize != that.adjustForBinSize) | ||||||||||||||||||||||||||||
|
| 9 | return false; | ||||||||||||||||||||||||||||
8 | if (!this.additionalFormatPattern.equals(that.additionalFormatPattern)) |
| 10 | if (!this.bins.equals(that.bins)) | |||||||||||||||||||||||||||
9 | return false; | 11 | return false; |
Row | Violation |
---|---|
1 | Expression that.formatPattern cannot be unified with expression that.key , because common superclass type java.lang.Comparable cannot be passed as an argument to public boolean equals(java.lang.Object) |
2 | Expression that.formatPattern cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression that.key cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type java.lang.String of variable that.formatPattern does not match with type java.lang.Comparable of variable that.key |
5 | Type java.lang.String of variable this.formatPattern does not match with type java.lang.Comparable of variable this.key |
6 | Unmatched statement if(this.adjustForBinSize != that.adjustForBinSize) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
7 | Unmatched return false; |
8 | Expression that.additionalFormatPattern cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.bins cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Type java.lang.String of variable that.additionalFormatPattern does not match with type java.util.List of variable that.bins |
11 | Type java.lang.String of variable this.additionalFormatPattern does not match with type java.util.List of variable this.bins |
12 | Clone fragment #1 returns variable that with type org.jfree.chart.labels.MultipleXYSeriesLabelGenerator , while Clone fragment #2 returns variable that with type org.jfree.data.statistics.SimpleHistogramDataset |
13 | Not all possible execution flows end in a return statement |
14 | The refactoring of the clones is infeasible, because classes org.jfree.chart.labels.MultipleXYSeriesLabelGenerator and org.jfree.data.statistics.SimpleHistogramDataset do not have a common superclass |