1251-19-28

LevelRenderer r1 = new LevelRenderer(); LevelRenderer r2 = new LevelRenderer(); assertTrue(r1.equals(r2)); int h1 = r1.hashCode(); int h2 = r2.hashCode(); assertEquals(h1, h2);
StatisticalLineAndShapeRenderer r1 = new StatisticalLineAndShapeRenderer(); StatisticalLineAndShapeRenderer r2 = new StatisticalLineAndShapeRenderer(); 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/LevelRendererTests.java |  | File path: /jfreechart-1.0.10/tests/org/jfree/chart/renderer/category/junit/StatisticalLineAndShapeRendererTests.java
Method name: `void testHashcode()` |  | Method name: `void testHashcode()`
Number of AST nodes: 6 |  | Number of AST nodes: 6

1

    LevelRenderer r1 = new LevelRenderer();↵

2

            LevelRenderer r2 = new Level↵

1

    StatisticalLineAndShapeRenderer r1↵

2

                = new StatisticalLineAndShapeRenderer();↵

3

            StatisticalLineAndShapeRenderer r2↵

3

    Renderer();↵

4

                = new StatisticalLineAndShapeRenderer();↵

4

            assertTrue(r1.equals(r2));↵

5

            assertTrue(r1.equals(r2));↵

5

            int h1 = r1.hashCode();↵

6

            int h1 = r1.hashCode();↵

6

            int h2 = r2.hashCode();↵

7

            int h2 = r2.hashCode();↵

7

            assertEquals(h1, h2);

8

            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 1

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

   1

       LevelRenderer r1 = new LevelRenderer();

   1

       StatisticalLineAndShapeRenderer r1 = new StatisticalLineAndShapeRenderer();

   2

       LevelRenderer r2 = new LevelRenderer();

   2

       StatisticalLineAndShapeRenderer r2 = new StatisticalLineAndShapeRenderer();

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

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