1251-20-36

LineAndShapeRenderer r1 = new LineAndShapeRenderer(); LineAndShapeRenderer r2 = new LineAndShapeRenderer(); assertTrue(r1.equals(r2)); int h1 = r1.hashCode(); int h2 = r2.hashCode(); assertEquals(h1, h2);
StackedXYAreaRenderer r1 = new StackedXYAreaRenderer(); StackedXYAreaRenderer r2 = new StackedXYAreaRenderer(); assertTrue(r1.equals(r2)); int h1 = r1.hashCode(); int h2 = r2.hashCode(); assertEquals(h1, h2);

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/chart/renderer/category/junit/LineAndShapeRendererTests.java |  | File path: /jfreechart-1.0.10/tests/org/jfree/chart/renderer/xy/junit/StackedXYAreaRendererTests.java
Method name: `void testHashcode()` |  | Method name: `void testHashcode()`
Number of AST nodes: 6 |  | Number of AST nodes: 6

1

    LineAndShapeRenderer r1 = new LineAndShapeRenderer();↵

1

    StackedXYAreaRenderer r1 = new StackedXYAreaRenderer();↵

2

            LineAndShapeRenderer r2 = new LineAndShapeRenderer();↵

2

            StackedXYAreaRenderer r2 = new StackedXYAreaRenderer();↵

3

            assertTrue(r1.equals(r2));↵

3

            assertTrue(r1.equals(r2));↵

4

            int h1 = r1.hashCode();↵

4

            int h1 = r1.hashCode();↵

5

            int h2 = r2.hashCode();↵

5

            int h2 = r2.hashCode();↵

6

            assertEquals(h1, h2);

6

            assertEquals(h1, h2);

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 1
Number of non-refactorable cases | 0
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 | 19

1. {Refactorable}

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

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

   1

       LineAndShapeRenderer r1 = new LineAndShapeRenderer();

   1 | LineAndShapeRenderer r1 = new LineAndShapeRenderer();
   1 | StackedXYAreaRenderer r1 = new StackedXYAreaRenderer();

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.category.LineAndShapeRenderer | org.jfree.chart.renderer.xy.StackedXYAreaRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.category.LineAndShapeRenderer | org.jfree.chart.renderer.xy.StackedXYAreaRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.category.LineAndShapeRenderer | org.jfree.chart.renderer.xy.StackedXYAreaRenderer | SUBCLASS_TYPE_MISMATCH

   1

       StackedXYAreaRenderer r1 = new StackedXYAreaRenderer();

   2

       LineAndShapeRenderer r2 = new LineAndShapeRenderer();

   2 | LineAndShapeRenderer r2 = new LineAndShapeRenderer();
   2 | StackedXYAreaRenderer r2 = new StackedXYAreaRenderer();

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.category.LineAndShapeRenderer | org.jfree.chart.renderer.xy.StackedXYAreaRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.category.LineAndShapeRenderer | org.jfree.chart.renderer.xy.StackedXYAreaRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.category.LineAndShapeRenderer | org.jfree.chart.renderer.xy.StackedXYAreaRenderer | SUBCLASS_TYPE_MISMATCH

   2

       StackedXYAreaRenderer r2 = new StackedXYAreaRenderer();

   3

       assertTrue(r1.equals(r2));

   3 | assertTrue(r1.equals(r2));
   3 | assertTrue(r1.equals(r2));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.category.LineAndShapeRenderer | org.jfree.chart.renderer.xy.StackedXYAreaRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.category.LineAndShapeRenderer | org.jfree.chart.renderer.xy.StackedXYAreaRenderer | SUBCLASS_TYPE_MISMATCH

   3

       assertTrue(r1.equals(r2));

   4

       int h1 = r1.hashCode();

   4 | int h1 = r1.hashCode();
   4 | int h1 = r1.hashCode();

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.category.LineAndShapeRenderer | org.jfree.chart.renderer.xy.StackedXYAreaRenderer | SUBCLASS_TYPE_MISMATCH

   4

       int h1 = r1.hashCode();

   5

       int h2 = r2.hashCode();

   5 | int h2 = r2.hashCode();
   5 | int h2 = r2.hashCode();

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.category.LineAndShapeRenderer | org.jfree.chart.renderer.xy.StackedXYAreaRenderer | SUBCLASS_TYPE_MISMATCH

   5

       int h2 = r2.hashCode();

   6

       assertEquals(h1, h2);

   6

       assertEquals(h1, h2);

   Precondition Violations (0)
   Row | Violation
   --- | ---