if (isInverted()) {
return max - ((value - this.displayStart)
/ (this.fixedRange.getUpperBound() - this.displayStart))
* (max - min);
}
else {
return min + ((value - this.displayStart)
/ (this.fixedRange.getUpperBound() - this.displayStart))
* (max - min);
}
if (isInverted()) {
return max - ((value - this.fixedRange.getLowerBound())
/ (this.displayEnd - this.fixedRange.getLowerBound()))
* (max - min);
}
else {
return min + ((value - this.fixedRange.getLowerBound())
/ (this.displayEnd - this.fixedRange.getLowerBound()))
* (max - min);
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/ModuloAxis.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/ModuloAxis.java
|
Method name: double transStart(double, Rectangle2D, RectangleEdge, double, double)
|
|
Method name: double transEnd(double, Rectangle2D, RectangleEdge, double, double)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (isInverted()) {↵ | | 1 | if (isInverted()) {↵
|
2 | return max - ((value - this.displayStart) ↵ | | 2 | return max - ((value - this.↵
|
| | | 3 | fixedRange.getLowerBound()) ↵
|
3 | / (this.fixedRange.getUpperBound() - this.displayStart)) ↵ | | 4 | / (this.displayEnd - this.fixedRange.getLowerBound())) ↵
|
4 | * (max - min);↵ | | 5 | * (max - min);↵
|
5 | }↵ | | 6 | }↵
|
6 | else {↵ | | 7 | else {↵
|
7 | return min + ((value - this.displayStart) ↵ | | 8 | return min + ((value - this.↵
|
| | | 9 | fixedRange.getLowerBound()) ↵
|
8 | / (this.fixedRange.getUpperBound() - this.displayStart)) ↵ | | 10 | / (this.displayEnd - this.fixedRange.getLowerBound())) ↵
|
9 | * (max - min);↵ | | 11 | * (max - min);↵
|
10 | } | | 12 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 2.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
9 | if (isInverted()) | | 9 | if (isInverted()) |
10 | return max - ((value - this.displayStart) / (this.fixedRange.getUpperBound() - this.displayStart)) * (max - min); | | 10 | return max - ((value - this.fixedRange.getLowerBound()) / (this.displayEnd - this.fixedRange.getLowerBound())) * (max - min); |
| | | | |
11 | return min + ((value - this.displayStart) / (this.fixedRange.getUpperBound() - this.displayStart)) * (max - min); | | 11 | return min + ((value - this.fixedRange.getLowerBound()) / (this.displayEnd - this.fixedRange.getLowerBound())) * (max - min); |
Precondition Violations (0)
Row |
Violation |