File path: /jfreechart-1.0.10/src/org/jfree/data/statistics/HistogramType.java | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/XYBarDataset.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | if (obj == null) {↵ | 1 | if (obj == this) {↵ | |
2 | return false; ↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | ↵ | |||
5 | if (obj == this) {↵ | 4 | if (!(obj instanceof XYBarDataset)) {↵ | |
6 | return true;↵ | 5 | return false;↵ | |
7 | }↵ | 6 | }↵ | |
8 | ↵ | 7 | ↵ | |
9 | if (!(obj instanceof HistogramType)) {↵ | |||
10 | return false;↵ | |||
11 | }↵ | |||
12 | ↵ | |||
13 | HistogramType t = (HistogramType) obj;↵ | |||
14 | if (!this.name.equals(t.name)↵ | 8 | XYBarDataset that = (XYBarDataset) obj;↵ | |
9 | if (!this.underlying.equals(that.underlying)) {↵ | |||
10 | return false;↵ | |||
11 | }↵ | |||
15 | ) {↵ | 12 | if (this.barWidth != that.barWidth) {↵ | |
16 | return false;↵ | 13 | return false;↵ | |
17 | }↵ | 14 | }↵ | |
18 | ↵ | |||
19 | return true; | 15 |
| |
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) | 1.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 29 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == null) |
| 1 | if (obj == this) | ||||||||||||||||||||||||||||||||
2 | return false; |
| 2 | return true; | ||||||||||||||||||||||||||||||||
3 | if (obj == this) | | ||||||||||||||||||||||||||||||||||
4 | return true; |
| | |||||||||||||||||||||||||||||||||
5 | if (!(obj instanceof HistogramType)) |
| 3 | if (!(obj instanceof XYBarDataset)) | ||||||||||||||||||||||||||||||||
6 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||||
| 5 | XYBarDataset that = (XYBarDataset)obj; | ||||||||||||||||||||||||||||||||||
7 | HistogramType t = (HistogramType)obj; | | ||||||||||||||||||||||||||||||||||
8 | if (!this.name.equals(t.name)) |
| 6 | if (!this.underlying.equals(that.underlying)) | ||||||||||||||||||||||||||||||||
9 | return false; | 7 | return false; |
Row | Violation |
---|---|
1 | Unmatched return true; |
2 | Type org.jfree.data.statistics.HistogramType does not match with type org.jfree.data.xy.XYBarDataset |
3 | Expression t.name cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression that.underlying cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type java.lang.String of variable t.name does not match with type org.jfree.data.xy.XYDataset of variable that.underlying |
6 | Expression t.name cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.underlying cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type java.lang.String of variable t.name does not match with type org.jfree.data.xy.XYDataset of variable that.underlying |
9 | Type java.lang.String of variable this.name does not match with type org.jfree.data.xy.XYDataset of variable this.underlying |
10 | Not all possible execution flows end in a return statement |