if (edge == RectangleEdge.RIGHT) {
mark = new Line2D.Double(cursor + ol, xx, cursor - il, xx);
}
else 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.RIGHT) {
mark = new Line2D.Double(cursor + ol, xx, cursor - il, xx);
}
else 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: 6
|
|
Number of AST nodes: 6
|
|
1 | if (edge == RectangleEdge.RIGHT) {↵ | | 1 | if (edge == RectangleEdge.RIGHT) {↵
|
2 | mark = new Line2D.Double(cursor + ol, xx, cursor - il, xx);↵ | | 2 | mark = new Line2D.Double(cursor + ol, xx, cursor - il, xx);↵
|
3 | }↵ | | 3 | ↵
|
| | | 4 | }↵
|
4 | else if (edge == RectangleEdge.TOP) {↵ | | 5 | else if (edge == RectangleEdge.TOP) {↵
|
5 | mark = new Line2D.Double(xx, cursor - ol, xx, cursor + il);↵ | | 6 | mark = new Line2D.Double(xx, cursor - ol, xx, cursor + il);↵
|
6 | }↵ | | 7 | ↵
|
| | | 8 | }↵
|
7 | else if (edge == RectangleEdge.BOTTOM) {↵ | | 9 | else if (edge == RectangleEdge.BOTTOM) {↵
|
8 | mark = new Line2D.Double(xx, cursor + ol, xx, cursor - il);↵ | | 10 | mark = new Line2D.Double(xx, cursor + ol, xx, cursor - il);↵
|
9 | } | | 11 | }
|
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.8 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 28 |
-
{Refactorable}
Mapping Summary
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) | 7.3 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
18 | else if (edge == RectangleEdge.RIGHT) | | 23 | else if (edge == RectangleEdge.RIGHT) |
19 | mark = new Line2D.Double(cursor + ol, xx, cursor - il, xx); | | 24 | mark = new Line2D.Double(cursor + ol, xx, cursor - il, xx); |
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 |