File path: /jfreechart-1.0.10/src/org/jfree/data/category/SlidingCategoryDataset.java | File path: /jfreechart-1.0.10/src/org/jfree/data/gantt/SlidingGanttCategoryDataset.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 SlidingCategoryDataset)) {↵ | 4 | if (!(obj instanceof SlidingGanttCategoryDataset)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | SlidingCategoryDataset that = (SlidingCategoryDataset) obj;↵ | 7 | SlidingGanttCategoryDataset that = (SlidingGanttCategoryDataset) obj;↵ | |
8 | if (this.firstCategoryIndex != that.firstCategoryIndex) {↵ | 8 | if (this.firstCategoryIndex != that.firstCategoryIndex) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (this.maximumCategoryCount != that.maximumCategoryCount) {↵ | 11 | if (this.maximumCategoryCount != that.maximumCategoryCount) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!this.underlying.equals(that.underlying)) {↵ | 14 | if (!this.underlying.equals(that.underlying)) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | return true; | 17 |
| |
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.9 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 50 |
Number of mapped statements | 12 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 5.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 SlidingCategoryDataset)) |
| 3 | if (!(obj instanceof SlidingGanttCategoryDataset)) | ||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||
5 | SlidingCategoryDataset that = (SlidingCategoryDataset)obj; |
| 5 | SlidingGanttCategoryDataset that = (SlidingGanttCategoryDataset)obj; | ||||||||||||||||||||
6 | if (this.firstCategoryIndex != that.firstCategoryIndex) |
| 6 | if (this.firstCategoryIndex != that.firstCategoryIndex) | ||||||||||||||||||||
7 | return false; | 7 | return false; | |||||||||||||||||||||
8 | if (this.maximumCategoryCount != that.maximumCategoryCount) |
| 8 | if (this.maximumCategoryCount != that.maximumCategoryCount) | ||||||||||||||||||||
9 | return false; | 9 | return false; | |||||||||||||||||||||
10 | if (!this.underlying.equals(that.underlying)) |
| 10 | if (!this.underlying.equals(that.underlying)) | ||||||||||||||||||||
11 | return false; | 11 | return false; | |||||||||||||||||||||
12 | return true; | 12 | return true; |
Row | Violation |
---|---|
1 | Expression that.firstCategoryIndex cannot be unified with expression that.firstCategoryIndex , because common superclass org.jfree.data.general.AbstractDataset does not declare member(s) private int firstCategoryIndex |
2 | Expression that.maximumCategoryCount cannot be unified with expression that.maximumCategoryCount , because common superclass org.jfree.data.general.AbstractDataset does not declare member(s) private int maximumCategoryCount |
3 | Expression that.underlying cannot be unified with expression that.underlying , because common superclass type org.jfree.data.category.CategoryDataset cannot be passed as an argument to public boolean equals(java.lang.Object) |
4 | Expression that.underlying cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.underlying cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.underlying cannot be unified with expression that.underlying , because common superclass type org.jfree.data.category.CategoryDataset cannot be passed as an argument to public boolean equals(java.lang.Object) |