if (value == vp) {
return this.boundMappedToLastCycle ? jmin : jmax;
}
else if (value > vp) {
return jmax - (value - vp) * (jmax - jmin) / this.period;
}
else {
return jmin + (vp - value) * (jmax - jmin) / this.period;
}
if (value == vp) {
return this.boundMappedToLastCycle ? jmax : jmin;
}
else if (value >= vp) {
return jmin + (value - vp) * (jmax - jmin) / this.period;
}
else {
return jmax - (vp - value) * (jmax - jmin) / this.period;
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CyclicNumberAxis.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CyclicNumberAxis.java
|
Method name: double valueToJava2D(double, Rectangle2D, RectangleEdge)
|
|
Method name: double valueToJava2D(double, Rectangle2D, RectangleEdge)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (value == vp) {↵ | | 1 | if (value == vp) {↵
|
2 | return this.boundMappedToLastCycle ? jmin : jmax; ↵ | | 2 | return this.boundMappedToLastCycle ? jmax : jmin; ↵
|
3 | }↵ | | 3 | }↵
|
4 | else if (value > vp) {↵ | | 4 | else if (value >= vp) {↵
|
5 | return jmax - (value - vp) * (jmax - jmin) / this.period;↵ | | 5 | return jmin + (value - vp) * (jmax - jmin) / this.period;↵
|
6 | } ↵ | | 6 | } ↵
|
7 | else {↵ | | 7 | else {↵
|
8 | return jmin + (vp - value) * (jmax - jmin) / this.period;↵ | | 8 | return jmax - (vp - value) * (jmax - jmin) / this.period;↵
|
9 | } | | 9 | }
|
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 4 |