if (edge == RectangleEdge.TOP) {
mark = new Line2D.Double(xx, cursor - ol, xx, cursor + il);
}
else if (edge == RectangleEdge.BOTTOM) {
mark = new Line2D.Double(xx, cursor + ol, xx, cursor - il);
}
if (edge == RectangleEdge.TOP) {
mark = new Line2D.Double(xx, cursor - ol, xx, cursor + il);
}
else if (edge == RectangleEdge.BOTTOM) {
mark = new Line2D.Double(xx, cursor + ol, xx, cursor - il);
}
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/ValueAxis.java
|
Method name: AxisState drawTickMarksAndLabels(Graphics2D, double, Rectangle2D, Rectangle2D, RectangleEdge)
|
|
Method name: AxisState drawTickMarksAndLabels(Graphics2D, double, Rectangle2D, Rectangle2D, RectangleEdge)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (edge == RectangleEdge.TOP) {↵ | | 1 | if (edge == RectangleEdge.TOP) {↵
|
2 | mark = new Line2D.Double(xx, cursor - ol, xx, cursor + il);↵ | | 2 | mark = new Line2D.Double(xx, cursor - ol, xx, cursor + il);↵
|
3 | }↵ | | 3 | }↵
|
4 | else if (edge == RectangleEdge.BOTTOM) {↵ | | 4 | else if (edge == RectangleEdge.BOTTOM) {↵
|
5 | mark = new Line2D.Double(xx, cursor + ol, xx, cursor - il);↵ | | 5 | mark = new Line2D.Double(xx, cursor + ol, xx, cursor - il);↵
|
6 | } | | 6 | }
|
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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 14 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 1.1 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
20 | else if (edge == RectangleEdge.TOP) | | 25 | else if (edge == RectangleEdge.TOP) |
21 | mark = new Line2D.Double(xx, cursor - ol, xx, cursor + il); | | 26 | mark = new Line2D.Double(xx, cursor - ol, xx, cursor + il); |
22 | else if (edge == RectangleEdge.BOTTOM) | | 27 | else if (edge == RectangleEdge.BOTTOM) |
23 | mark = new Line2D.Double(xx, cursor + ol, xx, cursor - il); | | 28 | mark = new Line2D.Double(xx, cursor + ol, xx, cursor - il); |
Precondition Violations (0)
Row |
Violation |