if (orientation == PlotOrientation.HORIZONTAL) {
box = new Rectangle2D.Double(transY0, transX1, transY1 - transY0,
transX0 - transX1);
}
else if (orientation == PlotOrientation.VERTICAL) {
box = new Rectangle2D.Double(transX0, transY1, transX1 - transX0,
transY0 - transY1);
}
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/annotations/XYBoxAnnotation.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/ValueAxis.java
|
Method name: void draw(Graphics2D, XYPlot, Rectangle2D, ValueAxis, ValueAxis, int, PlotRenderingInfo)
|
|
Method name: AxisState drawTickMarksAndLabels(Graphics2D, double, Rectangle2D, Rectangle2D, RectangleEdge)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | | 1 | if (edge == RectangleEdge.TOP) {↵
|
2 | box = new Rectangle2D.Double(transY0, transX1, transY1 - transY0, ↵ | | 2 | ↵
|
3 | transX0 - transX1);↵ | | 3 | mark = new Line2D.Double(xx, cursor - ol, xx, cursor + il);↵
|
| | | 4 | }↵
|
4 | }↵ | | 5 | ↵
|
5 | else if (orientation == PlotOrientation.VERTICAL) {↵ | | 6 | else if (edge == RectangleEdge.BOTTOM) {↵
|
6 | box = new Rectangle2D.Double(transX0, transY1, transX1 - transX0, ↵ | | 7 | ↵
|
7 | transY0 - transY1);↵ | | |
|
| | | 8 | mark = new Line2D.Double(xx, cursor + ol, xx, cursor - il);↵
|
8 | } | | 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.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 4 |