43-124-139

if (obj == this) { return true; } if (!(obj instanceof StatisticalLineAndShapeRenderer)) { return false; } StatisticalLineAndShapeRenderer that = (StatisticalLineAndShapeRenderer) obj; if (!PaintUtilities.equal(this.errorIndicatorPaint, that.errorIndicatorPaint)) { return false; } return super.equals(obj);
if (obj == this) { return true; } if (!(obj instanceof StandardXYZToolTipGenerator)) { return false; } if (!super.equals(obj)) { return false; } StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator) obj; if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) { return false; } if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) { return false; } return true;

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StatisticalLineAndShapeRenderer.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/StandardXYZToolTipGenerator.java
Method name: `boolean equals(Object)` |  | Method name: `boolean equals(Object)`
Number of AST nodes: 8 |  | Number of AST nodes: 12

1

    if (obj == this) {↵

1

    if (obj == this) {↵

2

                return true;↵

2

                return true;↵

3

            }↵

3

            }↵

4

            if (!(obj instanceof StatisticalLineAndShapeRenderer)) {↵

4

            if (!(obj instanceof StandardXYZToolTipGenerator)) {↵

5

                return false;↵

5

                return false;↵

6

            }↵

6

            }↵

7

            StatisticalLineAndShapeRenderer that↵

7

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

8

                return false;↵

8

            ↵

9

            }↵

9

            = (StatisticalLineAndShapeRenderer) obj;↵

10

            StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator) obj;↵

10

            if (!PaintUtilities.equal(this.errorIndicatorPaint,↵

11

            if (!ObjectUtilities.equal(this.↵

11

                    that.errorIndicatorPain↵

12

    zFormat, that.zFormat)) {↵

13

                return false;↵

14

            }↵

12

    t)) {↵

15

            if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) {↵

13

                return false;↵

16

                return false;↵

14

            }↵

17

            }↵

15

            return super.equals(obj);

18

            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) | 0.6
Clones location | Clones are in different classes
Number of node comparisons | 37

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 7
   Number of unmapped statements in the first code fragment | 1
   Number of unmapped statements in the second code fragment | 5
   Time elapsed for statement mapping (ms) | 0.7
   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 StatisticalLineAndShapeRenderer))

   3 | if (!(obj instanceof StatisticalLineAndShapeRenderer))
   3 | if (!(obj instanceof StandardXYZToolTipGenerator))

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.category.StatisticalLineAndShapeRenderer | org.jfree.chart.labels.StandardXYZToolTipGenerator | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type boolean of variable obj instanceof StatisticalLineAndShapeRenderer does not match with type boolean of variable obj instanceof StandardXYZToolTipGenerator
   - Make classes org.jfree.chart.renderer.category.StatisticalLineAndShapeRenderer and org.jfree.chart.labels.StandardXYZToolTipGenerator extend a common superclass

   3

       if (!(obj instanceof StandardXYZToolTipGenerator))

   4

       return false;

   4

       return false;

   5

       StatisticalLineAndShapeRenderer that = (StatisticalLineAndShapeRenderer)obj;

   6

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

   6 | if (! PaintUtilities.equal(this.errorIndicatorPaint, that.errorIndicatorPaint))
   5 | if (! super.equals(obj))

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

   5

       if (!super.equals(obj))

   7

       return false;

   6

       return false;

   7

       StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator)obj;

   8

       if (!ObjectUtilities.equal(this.zFormat, that.zFormat))

   9 | return false;

   Preondition Violations
   Unmatched return false;

   9

       return false;

   10

       if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat))

   11 | return false;

   Preondition Violations
   Unmatched return false;

   11

       return false;

   8

       return super.equals(obj);

   8 | return super.equals(obj);
   12 | return true;

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

   12

       return true;

   Precondition Violations (3)
   Row | Violation
   --- | ---
   1 | Type boolean of variable obj instanceof StatisticalLineAndShapeRenderer does not match with type boolean of variable obj instanceof StandardXYZToolTipGenerator
   2 | Unmatched return false;
   3 | Unmatched return false;