387-5-8

if (edge == RectangleEdge.LEFT) { anchor = TextAnchor.CENTER_RIGHT; rotationAnchor = TextAnchor.CENTER_RIGHT; } else { anchor = TextAnchor.CENTER_LEFT; rotationAnchor = TextAnchor.CENTER_LEFT; }
if (edge == RectangleEdge.LEFT) { anchor = TextAnchor.CENTER_RIGHT; rotationAnchor = TextAnchor.CENTER_RIGHT; } else { anchor = TextAnchor.CENTER_LEFT; rotationAnchor = TextAnchor.CENTER_LEFT; }

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/LogarithmicAxis.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/SymbolAxis.java
Method name: `List refreshTicksVertical(Graphics2D, Rectangle2D, RectangleEdge)` |  | Method name: `List refreshTicksVertical(Graphics2D, Rectangle2D, RectangleEdge)`
Number of AST nodes: 5 |  | Number of AST nodes: 5

1

    if (edge == RectangleEdge.LEFT) {↵

1

    if (edge == RectangleEdge.LEFT) {↵

2

                                anchor = TextAnchor.CENTER_RIGHT;↵

2

                            anchor = TextAnchor.CENTER_RIGHT;↵

3

                                rotationAnchor = TextAnchor.CENTER_RIGHT;↵

3

                            rotationAnchor = TextAnchor.CENTER_RIGHT;↵

4

                            }↵

4

                        }↵

5

                            else {↵

5

                        else {↵

6

                                anchor = TextAnchor.CENTER_LEFT;↵

6

                            anchor = TextAnchor.CENTER_LEFT;↵

7

                                rotationAnchor = TextAnchor.CENTER_LEFT;↵

7

                            rotationAnchor = TextAnchor.CENTER_LEFT;↵

8

                            }

8

                        }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 0
Number of non-refactorable cases | 1
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 | 28

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 5
   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.3
   Clone type | Type 1

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

   68

       if (edge == RectangleEdge.LEFT)

   38

       if (edge == RectangleEdge.LEFT)

   69

       anchor = TextAnchor.CENTER_RIGHT;

   39

       anchor = TextAnchor.CENTER_RIGHT;

   70

       rotationAnchor = TextAnchor.CENTER_RIGHT;

   40

       rotationAnchor = TextAnchor.CENTER_RIGHT;

       else

       else

   71

       anchor = TextAnchor.CENTER_LEFT;

   41

       anchor = TextAnchor.CENTER_LEFT;

   72

       rotationAnchor = TextAnchor.CENTER_LEFT;

   42

       rotationAnchor = TextAnchor.CENTER_LEFT;

   Precondition Violations (1)
   Row | Violation
   --- | ---
   1 | Clone fragment #1 returns variables anchor, rotationAnchor , while Clone fragment #2 returns variables anchor, rotationAnchor