43-127-147

if (obj == this) { return true; } if (!(obj instanceof XYBubbleRenderer)) { return false; } XYBubbleRenderer that = (XYBubbleRenderer) obj; if (this.scaleType != that.scaleType) { return false; } return super.equals(obj);
if (obj == this) { return true; } if (!(obj instanceof XYDifferenceRenderer)) { return false; } if (!super.equals(obj)) { return false; } XYDifferenceRenderer that = (XYDifferenceRenderer) obj; if (!PaintUtilities.equal(this.positivePaint, that.positivePaint)) { return false; } if (!PaintUtilities.equal(this.negativePaint, that.negativePaint)) { return false; } if (this.shapesVisible != that.shapesVisible) { return false; } if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) { return false; } if (this.roundXCoordinates != that.roundXCoordinates) { return false; } return true;

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

1

    if (obj == this) {↵

1

    if (obj == this) {↵

2

                return true;↵

2

                return true;   ↵

3

            }↵

3

            }↵

4

            if (!(obj instanceof XYBubbleRenderer)) {↵

4

            if (!(obj instanceof XYDifferenceRenderer)) {↵

5

                return false;↵

5

                return false;   ↵

6

            }↵

6

            }↵

7

            XYBubbl↵

7

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

8

                return false;   ↵

9

            }↵

8

    eRenderer that = (XYBubbleRenderer) obj;↵

10

            XYDifferenceRenderer that = (XYDifferenceRenderer) obj;↵

9

            if (this.scaleType != that.scaleTyp↵

11

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

12

                return false;   ↵

13

            }↵

14

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

15

                return false;   ↵

16

            }↵

10

    e) {↵

17

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

11

                return false;↵

18

                return false;   ↵

12

            }↵

19

            }↵

13

            return super.equals(obj)↵

20

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

21

                return false;   ↵

22

            }↵

23

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

24

                return false;↵

25

            }↵

14

    ;

26

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

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 4
   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.4
   Clone type | Type 2

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

   1

       if (obj == this)

   1

       if (obj == this)

   2

       return true;

   2 | return true;
   2 | return true;

   Preondition Violations
   Conditional return true;
   Conditional return true;

   2

       return true;

   3

       if (!(obj instanceof XYBubbleRenderer))

   3 | if (!(obj instanceof XYBubbleRenderer))
   3 | if (!(obj instanceof XYDifferenceRenderer))

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.xy.XYBubbleRenderer | org.jfree.chart.renderer.xy.XYDifferenceRenderer | SUBCLASS_TYPE_MISMATCH

   3

       if (!(obj instanceof XYDifferenceRenderer))

   4

       return false;

   4 | return false;
   4 | return false;

   Preondition Violations
   Conditional return false;
   Conditional return false;

   4

       return false;

   Precondition Violations (4)
   Row | Violation
   --- | ---
   1 | Conditional return true;
   2 | Conditional return true;
   3 | Conditional return false;
   4 | Conditional return false;