1648-27-28

c1.add(new LegendItem("X", "XX", "tt", "url", true, new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), true, Color.red, true, Color.yellow, new BasicStroke(1.0f), true, new Line2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(1.0f), Color.green)); assertFalse(p1.equals(p2));
p2.getFixedLegendItems().add(new LegendItem("X", "XX", "tt", "url", true, new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), true, Color.red, true, Color.yellow, new BasicStroke(1.0f), true, new Line2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(1.0f), Color.green)); assertTrue(p1.equals(p2));

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/chart/plot/junit/CategoryPlotTests.java |  | File path: /jfreechart-1.0.10/tests/org/jfree/chart/plot/junit/CategoryPlotTests.java
Method name: `void testCloning3()` |  | Method name: `void testCloning3()`
Number of AST nodes: 2 |  | Number of AST nodes: 2

1

    c1.add(new LegendItem("X", "XX", "tt", "url", true,↵

1

    p2.getFixedLegendItems().add(new LegendItem("X", "XX", "tt", "url",↵

2

                    new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), true, Color.red,↵

2

                    true, new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), true,↵

3

                    true, Color.yellow, new BasicStroke(1.0f), true,↵

3

                    Color.red, true, Color.yellow, new BasicStroke(1.0f), true,↵

4

                    new Line2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(1.0f),↵

4

                    new Line2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(1.0f),↵

5

                    Color.green));↵

5

                    Color.green));↵

6

            assertFalse(p1.equals(p2));

6

            assertTrue(p1.equals(p2));

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 the same method
Number of node comparisons | 4

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 2
   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
   --- | --- | --- | --- | ---

   10

       c1.add(new LegendItem("X", "XX", "tt", "url", true, new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), true, Color.red, true, Color.yellow, new BasicStroke(1.0f), true, new Line2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(1.0f), Color.green));

   10 | c1.add(new LegendItem("X", "XX", "tt", "url", true, new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), true, Color.red, true, Color.yellow, new BasicStroke(1.0f), true, new Line2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(1.0f), Color.green));
   12 | p2.getFixedLegendItems().add(new LegendItem("X", "XX", "tt", "url", true, new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), true, Color.red, true, Color.yellow, new BasicStroke(1.0f), true, new Line2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(1.0f), Color.green));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   c1 | p2.getFixedLegendItems() | TYPE_COMPATIBLE_REPLACEMENT

   12

       p2.getFixedLegendItems().add(new LegendItem("X", "XX", "tt", "url", true, new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), true, Color.red, true, Color.yellow, new BasicStroke(1.0f), true, new Line2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(1.0f), Color.green));

   11

       assertFalse(p1.equals(p2));

   11 | assertFalse(p1.equals(p2));
   13 | assertTrue(p1.equals(p2));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   assertFalse | assertTrue | METHOD_INVOCATION_NAME_MISMATCH

   Preondition Violations
   Expression assertFalse(p1.equals(p2)) is a void method call, and thus it cannot be parameterized
   Expression assertTrue(p1.equals(p2)) is a void method call, and thus it cannot be parameterized

   13

       assertTrue(p1.equals(p2));

   Precondition Violations (2)
   Row | Violation
   --- | ---
   1 | Expression assertFalse(p1.equals(p2)) is a void method call, and thus it cannot be parameterized
   2 | Expression assertTrue(p1.equals(p2)) is a void method call, and thus it cannot be parameterized