217-2-4

int result = 193; // lowerBound long temp = Double.doubleToLongBits(this.lowerBound); result = 37 * result + (int) (temp ^ (temp >>> 32)); // upperBound temp = Double.doubleToLongBits(this.upperBound); result = 37 * result + (int) (temp ^ (temp >>> 32)); // startAngle temp = Double.doubleToLongBits(this.startAngle); result = 37 * result + (int) (temp ^ (temp >>> 32)); // extent temp = Double.doubleToLongBits(this.extent); result = 37 * result + (int) (temp ^ (temp >>> 32)); // tickRadius temp = Double.doubleToLongBits(this.tickRadius); result = 37 * result + (int) (temp ^ (temp >>> 32)); // majorTickIncrement // majorTickLength // majorTickPaint // majorTickStroke // minorTickCount // minorTickLength // minorTickPaint // minorTickStroke // tickLabelOffset // tickLabelFont // tickLabelsVisible // tickLabelFormatter // firstTickLabelsVisible return result;
int result = 23; long l = Double.doubleToLongBits(this.top); result = 37 * result + (int) (l ^ (l >>> 32)); l = Double.doubleToLongBits(this.bottom); result = 37 * result + (int) (l ^ (l >>> 32)); l = Double.doubleToLongBits(this.left); result = 37 * result + (int) (l ^ (l >>> 32)); l = Double.doubleToLongBits(this.right); result = 37 * result + (int) (l ^ (l >>> 32)); return result;

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/StandardDialScale.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/AxisSpace.java
Method name: `int hashCode()` |  | Method name: `int hashCode()`
Number of AST nodes: 12 |  | Number of AST nodes: 10

1

    int result = 193;↵

1

    int result = 23;↵

2

            // lowerBound↵

3

            long temp = Double.doubleToLongBits(this.lowerBound);↵

2

            long l = Double.doubleToLongBits(this.top);↵

4

            result = 37 * result + (int) (temp ^ (temp >>> 32));↵

3

            result = 37 * result + (int) (l ^ (l >>> 32));↵

5

            // upperBound↵

4

            ↵

6

            temp = Double.doubleToLongBits(this.upperBound);↵

5

    l = Double.doubleToLongBits(this.bottom);↵

7

            result = 37 * result + (int) (temp ^ (temp >>> 32));↵

6

            result = 37 * result + (int) (l ^ (l >>> 32));↵

8

            // startAngle↵

7

            ↵

9

            temp = Double.doubleToLongBits(this.startAngle);↵

8

    l = Double.doubleToLongBits(this.left);↵

10

            result = 37 * result + (int) (temp ^ (temp >>> 32));        ↵

9

            result = 37 * result + (int) (l ^ (l >>> 32));↵

11

            // extent↵

10

            ↵

12

            temp = Double.doubleToLongBits(this.extent);↵

11

    l = Double.doubleToLongBits(this.↵

13

            result = 37 * result + (int) (temp ^ (temp >>> 32));        ↵

14

            // tickRadius↵

15

            temp = Double.doubleToLongBits(this.tickRadius);↵

12

    right);↵

16

            result = 37 * result + (int) (temp ^ (temp >>> 32));        ↵

13

            result = 37 * result + (int) (l ^ (l >>> 32));↵

17

            // majorTickIncrement↵

18

            // majorTickLength↵

19

            // majorTickPaint↵

20

            // majorTickStroke↵

21

            // minorTickCount↵

22

            // minorTickLength↵

23

            // minorTickPaint↵

24

            // minorTickStroke↵

25

            // tickLabelOffset↵

26

            // tickLabelFont↵

27

            // tickLabelsVisible↵

28

            // tickLabelFormatter↵

29

            // firstTickLabelsVisible↵

30

            return result;

14

            return result;

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.0
Clones location | Clones are in different classes
Number of node comparisons | 120

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 10
   Number of unmapped statements in the first code fragment | 2
   Number of unmapped statements in the second code fragment | 0
   Time elapsed for statement mapping (ms) | 0.0
   Clone type | Type 3

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

   1

       int result = 193;

   1 | int result = 193;
   1 | int result = 23;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   193 | 23 | LITERAL_VALUE_MISMATCH

   1

       int result = 23;

   2

       long temp = Double.doubleToLongBits(this.lowerBound);

   2 | long temp = Double.doubleToLongBits(this.lowerBound);
   2 | long l = Double.doubleToLongBits(this.top);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   temp | l | VARIABLE_NAME_MISMATCH
   lowerBound | top | VARIABLE_NAME_MISMATCH

   2

       long l = Double.doubleToLongBits(this.top);

   3

       result = 37 * result + (int)(temp ^ (temp >>> 32));

   3 | result = 37 * result + (int)(temp ^ (temp >>> 32));
   3 | result = 37 * result + (int)(l ^ (l >>> 32));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   temp | l | VARIABLE_NAME_MISMATCH
   temp | l | VARIABLE_NAME_MISMATCH

   3

       result = 37 * result + (int)(l ^ (l >>> 32));

   4

       temp = Double.doubleToLongBits(this.upperBound);

   4 | temp = Double.doubleToLongBits(this.upperBound);
   4 | l = Double.doubleToLongBits(this.bottom);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   temp | l | VARIABLE_NAME_MISMATCH
   upperBound | bottom | VARIABLE_NAME_MISMATCH

   4

       l = Double.doubleToLongBits(this.bottom);

   5

       result = 37 * result + (int)(temp ^ (temp >>> 32));

   5 | result = 37 * result + (int)(temp ^ (temp >>> 32));
   5 | result = 37 * result + (int)(l ^ (l >>> 32));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   temp | l | VARIABLE_NAME_MISMATCH
   temp | l | VARIABLE_NAME_MISMATCH

   5

       result = 37 * result + (int)(l ^ (l >>> 32));

   6

       temp = Double.doubleToLongBits(this.startAngle);

   6 | temp = Double.doubleToLongBits(this.startAngle);
   6 | l = Double.doubleToLongBits(this.left);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   temp | l | VARIABLE_NAME_MISMATCH
   startAngle | left | VARIABLE_NAME_MISMATCH

   6

       l = Double.doubleToLongBits(this.left);

   7

       result = 37 * result + (int)(temp ^ (temp >>> 32));

   7 | result = 37 * result + (int)(temp ^ (temp >>> 32));
   7 | result = 37 * result + (int)(l ^ (l >>> 32));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   temp | l | VARIABLE_NAME_MISMATCH
   temp | l | VARIABLE_NAME_MISMATCH

   7

       result = 37 * result + (int)(l ^ (l >>> 32));

   8

       temp = Double.doubleToLongBits(this.extent);

   8 | temp = Double.doubleToLongBits(this.extent);
   8 | l = Double.doubleToLongBits(this.right);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   temp | l | VARIABLE_NAME_MISMATCH
   extent | right | VARIABLE_NAME_MISMATCH

   8

       l = Double.doubleToLongBits(this.right);

   9

       result = 37 * result + (int)(temp ^ (temp >>> 32));

   9 | result = 37 * result + (int)(temp ^ (temp >>> 32));
   9 | result = 37 * result + (int)(l ^ (l >>> 32));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   temp | l | VARIABLE_NAME_MISMATCH
   temp | l | VARIABLE_NAME_MISMATCH

   9

       result = 37 * result + (int)(l ^ (l >>> 32));

   10

       temp = Double.doubleToLongBits(this.tickRadius);

   10 | temp = Double.doubleToLongBits(this.tickRadius);

   Preondition Violations
   Unmatched statement temp=Double.doubleToLongBits(this.tickRadius); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   11

       result = 37 * result + (int)(temp ^ (temp >>> 32));

   11 | result = 37 * result + (int)(temp ^ (temp >>> 32));

   Preondition Violations
   Unmatched statement result=37 * result + (int)(temp ^ (temp >>> 32)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   12

       return result;

   10

       return result;

   Precondition Violations (3)
   Row | Violation
   --- | ---
   1 | Unmatched statement temp=Double.doubleToLongBits(this.tickRadius); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   2 | Unmatched statement result=37 * result + (int)(temp ^ (temp >>> 32)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   3 | Clone fragment #1 returns variables result , while Clone fragment #2 returns variables