43-105-148

if (obj == this) { return true; } if (!(obj instanceof XYAreaRenderer2)) { return false; } XYAreaRenderer2 that = (XYAreaRenderer2) obj; if (this.showOutline != that.showOutline) { return false; } if (!ShapeUtilities.equal(this.legendArea, that.legendArea)) { return false; } return super.equals(obj);
if (obj == this) { return true; } if (!(obj instanceof XYBoxAndWhiskerRenderer)) { return false; } if (!super.equals(obj)) { return false; } XYBoxAndWhiskerRenderer that = (XYBoxAndWhiskerRenderer) obj; if (this.boxWidth != that.getBoxWidth()) { return false; } if (!PaintUtilities.equal(this.boxPaint, that.boxPaint)) { return false; } if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint)) { return false; } if (this.fillBox != that.fillBox) { return false; } return true;

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYAreaRenderer2.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYBoxAndWhiskerRenderer.java
Method name: `boolean equals(Object)` |  | Method name: `boolean equals(Object)`
Number of AST nodes: 10 |  | Number of AST nodes: 16

1

    if (obj == this) {    ↵

1

    if (obj == this) {↵

2

                return true;↵

2

                return true;↵

3

            }↵

3

            }↵

4

            if (!(obj instanceof XYAreaRenderer2↵

4

            if (!(obj instanceof XYBoxAndWhiskerRenderer)) {↵

5

                return false;↵

6

            }↵

5

    )) {↵

7

            if (!super.equals(obj)) {↵

6

                return false;↵

8

                return false;↵

7

            }↵

9

            }↵

8

            XYAreaRenderer2 that = (XYAreaRenderer2) obj;↵

10

            XYBoxAndWhiskerRenderer that = (XYBoxAndWhiskerRenderer) obj;↵

9

            if (this.showOutline != that.showOutline↵

11

            if (this.boxWidth != that.getBoxWidth()) {↵

12

                return false;↵

13

            }↵

10

    ) {↵

14

            if (!PaintUtilities.equal(this.boxPaint, that.boxPaint)) {↵

11

                return false;↵

15

                return false;↵

12

            }↵

16

            }↵

13

            if (!ShapeUtilities.equal(this.legendArea, that.legendArea)) {↵

17

            if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint)) {↵

14

                return false;↵

18

                return false;↵

15

            }↵

19

            }↵

16

            return super.equals(obj)↵

20

            if (this.fillBox != that.fillBox) {↵

21

                return false;↵

22

            }↵

17

    ;

23

            return true;

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) | 1.1
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 62

1. {Non-refactorable}

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

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

   1

       if (obj == this)

   1

       if (obj == this)

   2

       return true;

   2

       return true;

   3

       if (!(obj instanceof XYAreaRenderer2))

   3 | if (!(obj instanceof XYAreaRenderer2))
   3 | if (!(obj instanceof XYBoxAndWhiskerRenderer))

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.xy.XYAreaRenderer2 | org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer | SUBCLASS_TYPE_MISMATCH

   3

       if (!(obj instanceof XYBoxAndWhiskerRenderer))

   4

       return false;

   4

       return false;

   5

       XYAreaRenderer2 that = (XYAreaRenderer2)obj;

   5 | XYAreaRenderer2 that = (XYAreaRenderer2)obj;
   7 | XYBoxAndWhiskerRenderer that = (XYBoxAndWhiskerRenderer)obj;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.xy.XYAreaRenderer2 | org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.xy.XYAreaRenderer2 | org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.xy.XYAreaRenderer2 | org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer | SUBCLASS_TYPE_MISMATCH

   7

       XYBoxAndWhiskerRenderer that = (XYBoxAndWhiskerRenderer)obj;

   8

       if (this.boxWidth != that.getBoxWidth())

   9 | return false;

   Preondition Violations
   Unmatched return false;

   9

       return false;

   10

       if (!PaintUtilities.equal(this.boxPaint, that.boxPaint))

   11 | return false;

   Preondition Violations
   Unmatched return false;

   11

       return false;

   12

       if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint))

   13 | return false;

   Preondition Violations
   Unmatched return false;

   13

       return false;

   6

       if (this.showOutline != that.showOutline)

   6 | if (this.showOutline != that.showOutline)
   14 | if (this.fillBox != that.fillBox)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   showOutline | fillBox | VARIABLE_NAME_MISMATCH
   org.jfree.chart.renderer.xy.XYAreaRenderer2 | org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer | SUBCLASS_TYPE_MISMATCH
   showOutline | fillBox | VARIABLE_NAME_MISMATCH

   Preondition Violations
   Expression that.showOutline cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression that.fillBox cannot be parameterized, because it has dependencies to/from statements that will be extracted

   14

       if (this.fillBox != that.fillBox)

   7

       return false;

   15

       return false;

   8

       if (!ShapeUtilities.equal(this.legendArea, that.legendArea))

   8 | if (! ShapeUtilities.equal(this.legendArea, that.legendArea))
   5 | if (! super.equals(obj))

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   ShapeUtilities.equal(this.legendArea,that.legendArea) | super.equals(obj) | TYPE_COMPATIBLE_REPLACEMENT

   Preondition Violations
   Expression ShapeUtilities.equal(this.legendArea,that.legendArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   5

       if (!super.equals(obj))

   9

       return false;

   6

       return false;

   10

       return super.equals(obj);

   10 | return super.equals(obj);
   16 | return true;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   super.equals(obj) | true | TYPE_COMPATIBLE_REPLACEMENT

   16

       return true;

   Precondition Violations (7)
   Row | Violation
   --- | ---
   1 | Unmatched return false;
   2 | Unmatched return false;
   3 | Unmatched return false;
   4 | Expression that.showOutline cannot be parameterized, because it has dependencies to/from statements that will be extracted
   5 | Expression that.fillBox cannot be parameterized, because it has dependencies to/from statements that will be extracted
   6 | Expression ShapeUtilities.equal(this.legendArea,that.legendArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   7 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables that