217-1-2

int result = 193; long temp = Double.doubleToLongBits(this.startAngle); result = 37 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.extent); result = 37 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.innerRadius); result = 37 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.outerRadius); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = 37 * result + HashUtilities.hashCodeForPaint( this.backgroundPaint); result = 37 * result + HashUtilities.hashCodeForPaint( this.foregroundPaint); result = 37 * result + this.stroke.hashCode(); return result;
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;

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

1

    int result = 193;↵

1

    int result = 193;↵

2

            // lowerBound↵

2

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

3

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

3

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

4

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

5

            // upperBound↵

4

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

6

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

5

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

7

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

8

            // startAngle↵

6

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

9

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

7

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

10

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

11

            // extent↵

8

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

12

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

9

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

13

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

10

            result = 37 * result + HashUtilities.hashCodeForPai↵

14

            ↵

15

            // tickRadius↵

16

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

17

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

11

    nt(↵

18

            // majorTickIncrement↵

12

                    this.background↵

19

            // majorTickLength↵

13

    Paint);↵

20

            // majorTickPaint↵

14

            result = 37 * result + HashUtilities.hashCodeFor↵

21

            // majorTickStroke↵

22

            // minorTickCount↵

23

            // minorTickLength↵

15

    Paint(↵

24

            // minorTickPaint↵

16

                    this.foregroundPaint);↵

25

            ↵

17

            result = 37 * result + this.stroke.hashCode();↵

26

    // minorTickStroke↵

27

            // tickLabelOffset↵

28

            // tickLabelFont↵

29

            // tickLabelsVisible↵

30

            // tickLabelFormatter↵

31

            // firstTickLabelsVisible↵

18

            return result;

32

            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 having the same super class
Number of node comparisons | 92

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 11
   Number of unmapped statements in the first code fragment | 2
   Number of unmapped statements in the second code fragment | 1
   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;

   2

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   startAngle | lowerBound | VARIABLE_NAME_MISMATCH

   2

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

   3

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

   3

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

   4

       temp = Double.doubleToLongBits(this.extent);

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   extent | upperBound | VARIABLE_NAME_MISMATCH

   4

       temp = Double.doubleToLongBits(this.upperBound);

   5

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

   5

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

   6

       temp = Double.doubleToLongBits(this.innerRadius);

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   innerRadius | startAngle | VARIABLE_NAME_MISMATCH

   6

       temp = Double.doubleToLongBits(this.startAngle);

   7

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

   7

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

   8

       temp = Double.doubleToLongBits(this.outerRadius);

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   outerRadius | extent | VARIABLE_NAME_MISMATCH

   8

       temp = Double.doubleToLongBits(this.extent);

   9

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

   9

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

   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

   10

       temp = Double.doubleToLongBits(this.tickRadius);

   10

       result = 37 * result + HashUtilities.hashCodeForPaint(this.backgroundPaint);

   11

       result = 37 * result + HashUtilities.hashCodeForPaint(this.foregroundPaint);

   12

       result = 37 * result + this.stroke.hashCode();

   12 | result = 37 * result + this.stroke.hashCode();
   11 | result = 37 * result + (int)(temp ^ (temp >>> 32));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   this.stroke.hashCode() | (int)(temp ^ (temp >>> 32)) | TYPE_COMPATIBLE_REPLACEMENT

   11

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

   13

       return result;

   12

       return result;

   Precondition Violations (2)
   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 | Clone fragment #1 returns variables result , while Clone fragment #2 returns variables