1467-1-2

if (edge == RectangleEdge.LEFT) { axisLine = new Line2D.Double(cursor, dataArea.getY(), cursor, dataArea.getMaxY()); } else if (edge == RectangleEdge.RIGHT) { axisLine = new Line2D.Double(cursor, dataArea.getY(), cursor, dataArea.getMaxY()); }
if (edge == RectangleEdge.LEFT) { axisLine = new Line2D.Double(cursor, dataArea.getY(), cursor, dataArea.getMaxY()); } else if (edge == RectangleEdge.RIGHT) { axisLine = new Line2D.Double(cursor, dataArea.getY(), cursor, dataArea.getMaxY()); }

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/Axis.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/ValueAxis.java
Method name: `void drawAxisLine(Graphics2D, double, Rectangle2D, RectangleEdge)` |  | Method name: `void drawAxisLine(Graphics2D, double, Rectangle2D, RectangleEdge)`
Number of AST nodes: 4 |  | Number of AST nodes: 4

1

    if (edge == RectangleEdge.LEFT) {↵

1

    if (edge == RectangleEdge.LEFT) {↵

2

                axisLine = new Line2D.Double(cursor, dataArea.getY(), cursor,↵

2

                axisLine = new Line2D.Double(cursor, dataArea.getY(), cursor,↵

3

                        dataArea.getMaxY());↵

3

                        dataArea.getMaxY());↵

4

            }↵

4

            }↵

5

            else if (edge == RectangleEdge.RIGHT) {↵

5

            else if (edge == RectangleEdge.RIGHT) {↵

6

                axisLine = new Line2D.Double(cursor, dataArea.getY(), cursor,↵

6

                axisLine = new Line2D.Double(cursor, dataArea.getY(), cursor,↵

7

                        dataArea.getMaxY());↵

7

                        dataArea.getMaxY());↵

8

            }

8

            }

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.3
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 13

1. {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) | 0.9
   Clone type | Type 1

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   6

       else if (edge == RectangleEdge.LEFT)

   6

       else if (edge == RectangleEdge.LEFT)

   7

       axisLine = new Line2D.Double(cursor, dataArea.getY(), cursor, dataArea.getMaxY());

   7

       axisLine = new Line2D.Double(cursor, dataArea.getY(), cursor, dataArea.getMaxY());

   8

       else if (edge == RectangleEdge.RIGHT)

   8

       else if (edge == RectangleEdge.RIGHT)

   9

       axisLine = new Line2D.Double(cursor, dataArea.getY(), cursor, dataArea.getMaxY());

   9

       axisLine = new Line2D.Double(cursor, dataArea.getY(), cursor, dataArea.getMaxY());

   Precondition Violations (0)
   Row | Violation
   --- | ---