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: 6 | Number of AST nodes: 6 | |||
1 | if (RectangleEdge.isTopOrBottom(edge)) {↵ | 1 | if (RectangleEdge.isTopOrBottom(edge)) {↵ | |
2 | min = area.getX();↵ | 2 | max = area.getMaxX();↵ | |
3 | max = area.getX() + area.getWidth() * length1↵ | 3 | min = area.getMaxX() - area.getWidth() * length2 ↵ | |
4 | / (length1 + length2);↵ | 4 | / (length1 + length2);↵ | |
5 | }↵ | 5 | }↵ | |
6 | else if (RectangleEdge.isLeftOrRight(edge)) {↵ | 6 | else if (RectangleEdge.isLeftOrRight(edge)) {↵ | |
7 | min = area.getMaxY();↵ | 7 | max = area.getMinY();↵ | |
8 | max = area.getMaxY() - area.getHeight() * length1 ↵ | 8 | min = area.getMinY() + area.getHeight() * length2 ↵ | |
9 | / (length1 + length2);↵ | 9 | / (length1 + length2);↵ | |
10 | } | 10 |
| |
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) | 0.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 28 |
Number of mapped statements | 6 |
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) | 3.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (RectangleEdge.isTopOrBottom(edge)) | 3 | if (RectangleEdge.isTopOrBottom(edge)) | |||||||||||
4 | min = area.getX(); |
| 5 | min = area.getMaxX() - area.getWidth() * length2 / (length1 + length2); | ||||||||||
5 | max = area.getX() + area.getWidth() * length1 / (length1 + length2); |
| 4 | max = area.getMaxX(); | ||||||||||
6 | else if (RectangleEdge.isLeftOrRight(edge)) | 6 | else if (RectangleEdge.isLeftOrRight(edge)) | |||||||||||
7 | min = area.getMaxY(); |
| 8 | min = area.getMinY() + area.getHeight() * length2 / (length1 + length2); | ||||||||||
8 | max = area.getMaxY() - area.getHeight() * length1 / (length1 + length2); |
| 7 | max = area.getMinY(); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables min, max , while Clone fragment #2 returns variables max, min |