if (obj != null) {
if (obj instanceof Month) {
Month target = (Month) obj;
return (this.month == target.getMonth()
&& (this.year == target.getYearValue()));
}
else {
return false;
}
}
else {
return false;
}
if (obj != null) {
if (obj instanceof Quarter) {
Quarter target = (Quarter) obj;
return (this.quarter == target.getQuarter()
&& (this.year == target.getYearValue()));
}
else {
return false;
}
}
else {
return false;
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/time/Month.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/data/time/Quarter.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | if (obj != null) {↵ | | 1 | if (obj != null) {↵
|
2 | if (obj instanceof Month) {↵ | | 2 | if (obj instanceof Quarter) {↵
|
3 | Month target = (Month) obj;↵ | | 3 | Quarter target = (Quarter) obj;↵
|
4 | return (this.month == target.getMonth() ↵ | | 4 | return (this.quarter == target.getQuarter()↵
|
5 | && (this.year == target.getYearValue()));↵ | | 5 | && (this.year == target.getYearValue()));↵
|
6 | }↵ | | 6 | }↵
|
7 | else {↵ | | 7 | else {↵
|
8 | return false;↵ | | 8 | return false;↵
|
9 | }↵ | | 9 | }↵
|
10 | }↵ | | 10 | }↵
|
11 | else {↵ | | 11 | else {↵
|
12 | return false;↵ | | 12 | return false;↵
|
13 | } | | 13 | }
|
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.0 |
Clones location | |
Number of node comparisons | 0 |