43-124-126

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 YIntervalRenderer)) { return false; } YIntervalRenderer that = (YIntervalRenderer) obj; if (!ObjectUtilities.equal(this.additionalItemLabelGenerator, that.additionalItemLabelGenerator)) { return false; } return super.equals(obj);

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/renderer/xy/YIntervalRenderer.java
Method name: `boolean equals(Object)` |  | Method name: `boolean equals(Object)`
Number of AST nodes: 8 |  | Number of AST nodes: 8

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 YIntervalRenderer)) {↵

5

                return false;↵

5

        		return false;↵

6

            }↵

6

        	}↵

7

            StatisticalLineAndShapeRenderer that↵

7

        ↵

8

                    = (StatisticalLineAndShapeRenderer) obj;↵

8

    	YIntervalRenderer that = (YIntervalRenderer) obj;↵

9

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

9

        	if (!ObjectUtilities.equal(this.↵

10

                    that.errorIndicatorPaint↵

10

    additionalItemLabelGenerator,↵

11

    )) {↵

11

        			that.additionalItemLabelGenerator)) {↵

12

                return false;↵

12

        		return false;↵

13

            }↵

13

        	}↵

14

            return super.equals(obj);

14

        	return super.equals(obj);

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.4
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 31

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 8
   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) | 0.8
   Clone type | Type 2

   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 YIntervalRenderer))

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.category.StatisticalLineAndShapeRenderer | org.jfree.chart.renderer.xy.YIntervalRenderer | SUBCLASS_TYPE_MISMATCH

   3

       if (!(obj instanceof YIntervalRenderer))

   4

       return false;

   4

       return false;

   5

       StatisticalLineAndShapeRenderer that = (StatisticalLineAndShapeRenderer)obj;

   5 | StatisticalLineAndShapeRenderer that = (StatisticalLineAndShapeRenderer)obj;
   5 | YIntervalRenderer that = (YIntervalRenderer)obj;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.category.StatisticalLineAndShapeRenderer | org.jfree.chart.renderer.xy.YIntervalRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.category.StatisticalLineAndShapeRenderer | org.jfree.chart.renderer.xy.YIntervalRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.category.StatisticalLineAndShapeRenderer | org.jfree.chart.renderer.xy.YIntervalRenderer | SUBCLASS_TYPE_MISMATCH

   5

       YIntervalRenderer that = (YIntervalRenderer)obj;

   6

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

   6 | if (! PaintUtilities.equal(this.errorIndicatorPaint, that.errorIndicatorPaint))
   6 | if (! ObjectUtilities.equal(this.additionalItemLabelGenerator, that.additionalItemLabelGenerator))

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   errorIndicatorPaint | additionalItemLabelGenerator | VARIABLE_NAME_MISMATCH
   java.awt.Paint | org.jfree.chart.labels.XYItemLabelGenerator | VARIABLE_TYPE_MISMATCH
   org.jfree.util.PaintUtilities | org.jfree.util.ObjectUtilities | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type java.awt.Paint of variable this.errorIndicatorPaint does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable this.additionalItemLabelGenerator
   - Make classes java.awt.Paint and org.jfree.chart.labels.XYItemLabelGenerator extend a common superclass

   Type org.jfree.util.PaintUtilities of variable PaintUtilities does not match with type org.jfree.util.ObjectUtilities of variable ObjectUtilities
   - Make classes org.jfree.util.PaintUtilities and org.jfree.util.ObjectUtilities extend a common superclass

   6

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

   7

       return false;

   7

       return false;

   8

       return super.equals(obj);

   8

       return super.equals(obj);

   Precondition Violations (2)
   Row | Violation
   --- | ---
   1 | Type java.awt.Paint of variable this.errorIndicatorPaint does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable this.additionalItemLabelGenerator
   2 | Type org.jfree.util.PaintUtilities of variable PaintUtilities does not match with type org.jfree.util.ObjectUtilities of variable ObjectUtilities