if (edge == RectangleEdge.LEFT) { mark = new Line2D.Double(cursor - ol, xx, cursor + il, xx); } else 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.LEFT) { mark = new Line2D.Double(cursor - ol, xx, cursor + il, xx); } else 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: 8 Number of AST nodes: 8
1
if (edge == RectangleEdge.LEFT) {
1
if (edge == RectangleEdge.LEFT) {
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.RIGHT) {
5
                else if (edge == RectangleEdge.RIGHT) {
5
                mark = new Line2D.Double(cursor + ol, xx, cursor - il, xx);
6
                    mark = new Line2D.Double(cursor + ol, xx, cursor - il, xx);
6
            }
7
                }
7
            else if (edge == RectangleEdge.TOP) {
8
                else if (edge == RectangleEdge.TOP) {
8
                mark = new Line2D.Double(xx, cursor - ol, xx, cursor + il);
9
                    mark = new Line2D.Double(xx, cursor - ol, xx, cursor + il);
9
            }
10
                }
10
            else if (edge == RectangleEdge.BOTTOM) {
11
                else if (edge == RectangleEdge.BOTTOM) {
11
                mark = new Line2D.Double(xx, cursor + ol, xx, cursor - il);
12
                    mark = new Line2D.Double(xx, cursor + ol, xx, cursor - il);
12
            }
13
                }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)1.3
Clones locationClones are in different classes having the same super class
Number of node comparisons47
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.3
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    16
    if (edge == RectangleEdge.LEFT)
    21
    if (edge == RectangleEdge.LEFT)
    17
    mark = new Line2D.Double(cursor - ol, xx, cursor + il, xx);
    22
    mark = new Line2D.Double(cursor - ol, xx, cursor + il, xx);
    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