File path: /jfreechart-1.0.10/src/org/jfree/data/statistics/SimpleHistogramBin.java | File path: /jfreechart-1.0.10/src/org/jfree/data/time/Second.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | if (!(obj instanceof SimpleHistogramBin)) {↵ | 1 | if (obj == this) {↵ | |
2 | return false;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | SimpleHistogramBin that = (SimpleHistogramBin) obj;↵ | 4 | ↵ | |
5 | if (this.lowerBound != that.lowerBound) {↵ | 5 | if (!(obj instanceof Second)) {↵ | |
6 | return false;↵ | 6 | return false;↵ | |
7 | }↵ | 7 | }↵ | |
8 | Second that = (Second) obj;↵ | |||
8 | if (this.upperBound != that.upperBound) {↵ | 9 | if (this.second != that.second) {↵ | |
9 | return false;↵ | 10 | return false;↵ | |
10 | }↵ | 11 | }↵ | |
11 | if (this.includeLowerBound != that.includeLowerBound) {↵ | 12 | if (this.minute != that.minute) {↵ | |
12 | return false;↵ | 13 | return false;↵ | |
13 | }↵ | 14 | }↵ | |
14 | if (this.includeUpperBound != that.includeUpperBound) {↵ | 15 | if (this.hour != that.hour) {↵ | |
15 | return false;↵ | 16 | return false;↵ | |
16 | }↵ | 17 | }↵ | |
17 | if (this.itemCount != that.itemCount) {↵ | 18 | if (!this.day.equals(that.day)) {↵ | |
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) | 3.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 58 |
Number of mapped statements | 8 |
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) | 2.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (!(obj instanceof SimpleHistogramBin)) |
| 3 | if (!(obj instanceof Second)) | |||||||||||||||||||||||||||
2 | return false; | 4 | return false; | ||||||||||||||||||||||||||||
3 | SimpleHistogramBin that = (SimpleHistogramBin)obj; | | |||||||||||||||||||||||||||||
| 5 | Second that = (Second)obj; | |||||||||||||||||||||||||||||
4 | if (this.lowerBound != that.lowerBound) |
| 6 | if (this.second != that.second) | |||||||||||||||||||||||||||
5 | return false; | 7 | return false; | ||||||||||||||||||||||||||||
6 | if (this.upperBound != that.upperBound) |
| 8 | if (this.minute != that.minute) | |||||||||||||||||||||||||||
7 | return false; | 9 | return false; | ||||||||||||||||||||||||||||
8 | if (this.includeLowerBound != that.includeLowerBound) |
| 10 | if (this.hour != that.hour) | |||||||||||||||||||||||||||
9 | return false; | 11 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.data.statistics.SimpleHistogramBin does not match with type org.jfree.data.time.Second |
2 | Type double of variable this.lowerBound does not match with type byte of variable this.second |
3 | Type double of variable that.lowerBound does not match with type byte of variable that.second |
4 | Expression that.lowerBound cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.second cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type double of variable that.lowerBound does not match with type byte of variable that.second |
7 | Type double of variable this.upperBound does not match with type byte of variable this.minute |
8 | Type double of variable that.upperBound does not match with type byte of variable that.minute |
9 | Expression that.upperBound cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression that.minute cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Type double of variable that.upperBound does not match with type byte of variable that.minute |
12 | Type boolean of variable this.includeLowerBound does not match with type byte of variable this.hour |
13 | Type boolean of variable that.includeLowerBound does not match with type byte of variable that.hour |
14 | Expression that.includeLowerBound cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression that.hour cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Type boolean of variable that.includeLowerBound does not match with type byte of variable that.hour |
17 | Not all possible execution flows end in a return statement |