if (obj == this) {
return true;
}
if (obj instanceof XYItemEntity && super.equals(obj)) {
XYItemEntity ie = (XYItemEntity) obj;
if (this.series != ie.series) {
return false;
}
if (this.item != ie.item) {
return false;
}
return true;
}
return false;
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (!(obj instanceof HistogramType)) {
return false;
}
HistogramType t = (HistogramType) obj;
if (!this.name.equals(t.name)) {
return false;
}
return true;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/entity/XYItemEntity.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/data/statistics/HistogramType.java
|
Method name: boolean equals(Object)
|
|
Method name: boolean equals(Object)
|
Number of AST nodes: 10
|
|
Number of AST nodes: 10
|
|
1 | if (obj == this) {↵ | | 1 | if (obj == null) {↵
|
2 | return true; ↵ | | 2 | return false; ↵
|
3 | ↵ | | 3 | }↵
|
4 | }↵ | | 4 | ↵
|
5 | if (obj instanceof XYItemEntity && super.equals(obj)) {↵ | | 5 | if (obj ↵
|
6 | XYItemEntity ie = (XYItemEntity) obj;↵ | | 6 | == this) {↵
|
| | | 7 | return true;↵
|
| | | 8 | }↵
|
7 | ↵ | | 9 | ↵
|
8 | if (this.series != ie.series) {↵ | | 10 | if (!(obj instanceof HistogramType)) {↵
|
9 | return false;↵ | | 11 | return false;↵
|
10 | ↵ | | 12 | ↵
|
11 | ↵ | | 13 | }↵
|
12 | }↵ | | 14 | ↵
|
13 | ↵ | | 15 | HistogramType t = (HistogramType) obj;↵
|
14 | if (this.item != ie.item) {↵ | | 16 | if (!this.name.equals(t.name)) {↵
|
15 | return false; ↵ | | 17 | return false;↵
|
16 | ↵ | | |
|
17 | }↵ | | 18 | }↵
|
18 | return true;↵ | | 19 | ↵
|
19 | }↵ | | |
|
20 | return false; | | 20 | return true;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 15 |