1007-5-6

StackedXYAreaRenderer2 r1 = new StackedXYAreaRenderer2(); StackedXYAreaRenderer2 r2 = new StackedXYAreaRenderer2(); assertEquals(r1, r2); assertEquals(r2, r1); r1.setRoundXCoordinates(!r1.getRoundXCoordinates()); assertFalse(r1.equals(r2)); r2.setRoundXCoordinates(r1.getRoundXCoordinates()); assertTrue(r1.equals(r2));
StackedXYBarRenderer r1 = new StackedXYBarRenderer(); StackedXYBarRenderer r2 = new StackedXYBarRenderer(); assertTrue(r1.equals(r2)); assertTrue(r2.equals(r1)); r1.setRenderAsPercentages(true); assertFalse(r1.equals(r2)); r2.setRenderAsPercentages(true); assertTrue(r1.equals(r2));

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/chart/renderer/xy/junit/StackedXYAreaRenderer2Tests.java |  | File path: /jfreechart-1.0.10/tests/org/jfree/chart/renderer/xy/junit/StackedXYBarRendererTests.java
Method name: `void testEquals()` |  | Method name: `void testEquals()`
Number of AST nodes: 8 |  | Number of AST nodes: 8

1

    StackedXYAreaRenderer2 r1 = new StackedXYAreaRenderer2();↵

1

    StackedXYBarRenderer r1 = new StackedXYBarRenderer();↵

2

            StackedXYAreaRenderer2 r2 = new StackedXYAreaRenderer2();↵

2

            StackedXYBarRenderer r2 = new StackedXYBarRenderer();↵

3

            assertEquals(r1, r2);↵

3

            assertTrue(r1.equals(r2));↵

4

            assertEquals(r2, r1);↵

4

            assertTrue(r2.equals(r1));↵

5

            r1.setRoundXCoordinates(!r1.getRoundXCoordinates());↵

5

            r1.setRenderAsPercentages(true);↵

6

            assertFalse(r1.equals(r2));↵

6

            assertFalse(r1.equals(r2));↵

7

            r2.setRoundXCoordinates(r1.getRoundXCoordinates());↵

7

            r2.setRenderAsPercentages(true);↵

8

            assertTrue(r1.equals(r2));

8

            assertTrue(r1.equals(r2));

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

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.0
   Clone type | Type 2

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

   1

       StackedXYAreaRenderer2 r1 = new StackedXYAreaRenderer2();

   1 | StackedXYAreaRenderer2 r1 = new StackedXYAreaRenderer2();
   1 | StackedXYBarRenderer r1 = new StackedXYBarRenderer();

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.xy.StackedXYAreaRenderer2 | org.jfree.chart.renderer.xy.StackedXYBarRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.xy.StackedXYAreaRenderer2 | org.jfree.chart.renderer.xy.StackedXYBarRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.xy.StackedXYAreaRenderer2 | org.jfree.chart.renderer.xy.StackedXYBarRenderer | SUBCLASS_TYPE_MISMATCH

   1

       StackedXYBarRenderer r1 = new StackedXYBarRenderer();

   2

       StackedXYAreaRenderer2 r2 = new StackedXYAreaRenderer2();

   2 | StackedXYAreaRenderer2 r2 = new StackedXYAreaRenderer2();
   2 | StackedXYBarRenderer r2 = new StackedXYBarRenderer();

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.xy.StackedXYAreaRenderer2 | org.jfree.chart.renderer.xy.StackedXYBarRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.xy.StackedXYAreaRenderer2 | org.jfree.chart.renderer.xy.StackedXYBarRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.xy.StackedXYAreaRenderer2 | org.jfree.chart.renderer.xy.StackedXYBarRenderer | SUBCLASS_TYPE_MISMATCH

   2

       StackedXYBarRenderer r2 = new StackedXYBarRenderer();

   3

       assertEquals(r1, r2);

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   assertEquals | assertTrue | METHOD_INVOCATION_NAME_MISMATCH
   assertEquals(r1,r2) | assertTrue(r1.equals(r2)) | ARGUMENT_NUMBER_MISMATCH

   Preondition Violations
   Expression assertEquals(r1,r2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression assertTrue(r1.equals(r2)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression assertEquals(r1,r2) is a void method call, and thus it cannot be parameterized
   Expression assertTrue(r1.equals(r2)) is a void method call, and thus it cannot be parameterized
   Expression assertEquals(r1,r2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression assertTrue(r1.equals(r2)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression assertEquals(r1,r2) is a void method call, and thus it cannot be parameterized
   Expression assertTrue(r1.equals(r2)) is a void method call, and thus it cannot be parameterized

   3

       assertTrue(r1.equals(r2));

   4

       assertEquals(r2, r1);

   4 | assertEquals(r2, r1);
   4 | assertTrue(r2.equals(r1));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   assertEquals | assertTrue | METHOD_INVOCATION_NAME_MISMATCH
   assertEquals(r2,r1) | assertTrue(r2.equals(r1)) | ARGUMENT_NUMBER_MISMATCH

   Preondition Violations
   Expression assertEquals(r2,r1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression assertTrue(r2.equals(r1)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression assertEquals(r2,r1) is a void method call, and thus it cannot be parameterized
   Expression assertTrue(r2.equals(r1)) is a void method call, and thus it cannot be parameterized
   Expression assertEquals(r2,r1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression assertTrue(r2.equals(r1)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression assertEquals(r2,r1) is a void method call, and thus it cannot be parameterized
   Expression assertTrue(r2.equals(r1)) is a void method call, and thus it cannot be parameterized

   4

       assertTrue(r2.equals(r1));

   5

       r1.setRoundXCoordinates(!r1.getRoundXCoordinates());

   5 | r1.setRoundXCoordinates(! r1.getRoundXCoordinates());
   5 | r1.setRenderAsPercentages(true);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   setRoundXCoordinates | setRenderAsPercentages | METHOD_INVOCATION_NAME_MISMATCH
   !r1.getRoundXCoordinates() | true | TYPE_COMPATIBLE_REPLACEMENT
   org.jfree.chart.renderer.xy.StackedXYAreaRenderer2 | org.jfree.chart.renderer.xy.StackedXYBarRenderer | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression r1.setRoundXCoordinates(!r1.getRoundXCoordinates()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression r1.setRenderAsPercentages(true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression r1.setRoundXCoordinates(!r1.getRoundXCoordinates()) is a void method call, and thus it cannot be parameterized
   Expression r1.setRenderAsPercentages(true) is a void method call, and thus it cannot be parameterized
   Expression !r1.getRoundXCoordinates() cannot be parameterized, because it has dependencies to/from statements that will be extracted

   5

       r1.setRenderAsPercentages(true);

   6

       assertFalse(r1.equals(r2));

   6 | assertFalse(r1.equals(r2));
   6 | assertFalse(r1.equals(r2));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.xy.StackedXYAreaRenderer2 | org.jfree.chart.renderer.xy.StackedXYBarRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.xy.StackedXYAreaRenderer2 | org.jfree.chart.renderer.xy.StackedXYBarRenderer | SUBCLASS_TYPE_MISMATCH

   6

       assertFalse(r1.equals(r2));

   7

       r2.setRoundXCoordinates(r1.getRoundXCoordinates());

   7 | r2.setRoundXCoordinates(r1.getRoundXCoordinates());
   7 | r2.setRenderAsPercentages(true);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   setRoundXCoordinates | setRenderAsPercentages | METHOD_INVOCATION_NAME_MISMATCH
   r1.getRoundXCoordinates() | true | TYPE_COMPATIBLE_REPLACEMENT
   org.jfree.chart.renderer.xy.StackedXYAreaRenderer2 | org.jfree.chart.renderer.xy.StackedXYBarRenderer | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression r2.setRoundXCoordinates(r1.getRoundXCoordinates()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression r2.setRenderAsPercentages(true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression r2.setRoundXCoordinates(r1.getRoundXCoordinates()) is a void method call, and thus it cannot be parameterized
   Expression r2.setRenderAsPercentages(true) is a void method call, and thus it cannot be parameterized
   Expression r1.getRoundXCoordinates() cannot be parameterized, because it has dependencies to/from statements that will be extracted

   7

       r2.setRenderAsPercentages(true);

   8

       assertTrue(r1.equals(r2));

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.renderer.xy.StackedXYAreaRenderer2 | org.jfree.chart.renderer.xy.StackedXYBarRenderer | SUBCLASS_TYPE_MISMATCH
   org.jfree.chart.renderer.xy.StackedXYAreaRenderer2 | org.jfree.chart.renderer.xy.StackedXYBarRenderer | SUBCLASS_TYPE_MISMATCH

   8

       assertTrue(r1.equals(r2));

   Precondition Violations (26)
   Row | Violation
   --- | ---
   1 | Expression assertEquals(r1,r2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   2 | Expression assertTrue(r1.equals(r2)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   3 | Expression assertEquals(r1,r2) is a void method call, and thus it cannot be parameterized
   4 | Expression assertTrue(r1.equals(r2)) is a void method call, and thus it cannot be parameterized
   5 | Expression assertEquals(r1,r2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   6 | Expression assertTrue(r1.equals(r2)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   7 | Expression assertEquals(r1,r2) is a void method call, and thus it cannot be parameterized
   8 | Expression assertTrue(r1.equals(r2)) is a void method call, and thus it cannot be parameterized
   9 | Expression assertEquals(r2,r1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   10 | Expression assertTrue(r2.equals(r1)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   11 | Expression assertEquals(r2,r1) is a void method call, and thus it cannot be parameterized
   12 | Expression assertTrue(r2.equals(r1)) is a void method call, and thus it cannot be parameterized
   13 | Expression assertEquals(r2,r1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   14 | Expression assertTrue(r2.equals(r1)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   15 | Expression assertEquals(r2,r1) is a void method call, and thus it cannot be parameterized
   16 | Expression assertTrue(r2.equals(r1)) is a void method call, and thus it cannot be parameterized
   17 | Expression r1.setRoundXCoordinates(!r1.getRoundXCoordinates()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   18 | Expression r1.setRenderAsPercentages(true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   19 | Expression r1.setRoundXCoordinates(!r1.getRoundXCoordinates()) is a void method call, and thus it cannot be parameterized
   20 | Expression r1.setRenderAsPercentages(true) is a void method call, and thus it cannot be parameterized
   21 | Expression !r1.getRoundXCoordinates() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   22 | Expression r2.setRoundXCoordinates(r1.getRoundXCoordinates()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   23 | Expression r2.setRenderAsPercentages(true) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   24 | Expression r2.setRoundXCoordinates(r1.getRoundXCoordinates()) is a void method call, and thus it cannot be parameterized
   25 | Expression r2.setRenderAsPercentages(true) is a void method call, and thus it cannot be parameterized
   26 | Expression r1.getRoundXCoordinates() cannot be parameterized, because it has dependencies to/from statements that will be extracted