1648-21-22

item1 = new LegendItem("Label2", "Description2", "ToolTip", "URL", false, new Rectangle2D.Double(4.0, 3.0, 2.0, 1.0), false, Color.black, false, Color.yellow, new BasicStroke(2.1f), false, new Line2D.Double(4.0, 3.0, 2.0, 1.0), new BasicStroke(2.1f), Color.green); assertFalse(item1.equals(item2));
item2 = new LegendItem("Label2", "Description2", "ToolTip", "URL", false, new Rectangle2D.Double(4.0, 3.0, 2.0, 1.0), false, Color.black, false, Color.yellow, new BasicStroke(2.1f), false, new Line2D.Double(4.0, 3.0, 2.0, 1.0), new BasicStroke(2.1f), Color.green); assertTrue(item1.equals(item2));

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

1

    item1 = new LegendItem("Label2", "Description2", "ToolTip",↵

1

    item2 = new LegendItem("Label2", "Description2", "ToolTip",↵

2

                    "URL", false, new Rectangle2D.Double(4.0, 3.0, 2.0, 1.0),↵

2

                    "URL", false, new Rectangle2D.Double(4.0, 3.0, 2.0, 1.0),↵

3

                    false, Color.black, false, Color.yellow, new BasicStroke(2.1f),↵

3

                    false, Color.black, false, Color.yellow, new BasicStroke(2.1f),↵

4

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

4

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

5

                    new BasicStroke(2.1f), Color.green);↵

5

                    new BasicStroke(2.1f), Color.green);↵

6

            assertFalse(item1.equals(item2));

6

            assertTrue(item1.equals(item2));

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

   45

       item1 = new LegendItem("Label2", "Description2", "ToolTip", "URL", false, new Rectangle2D.Double(4.0, 3.0, 2.0, 1.0), false, Color.black, false, Color.yellow, new BasicStroke(2.1f), false, new Line2D.Double(4.0, 3.0, 2.0, 1.0), new BasicStroke(2.1f), Color.green);

   45 | item1 = new LegendItem("Label2", "Description2", "ToolTip", "URL", false, new Rectangle2D.Double(4.0, 3.0, 2.0, 1.0), false, Color.black, false, Color.yellow, new BasicStroke(2.1f), false, new Line2D.Double(4.0, 3.0, 2.0, 1.0), new BasicStroke(2.1f), Color.green);
   47 | item2 = new LegendItem("Label2", "Description2", "ToolTip", "URL", false, new Rectangle2D.Double(4.0, 3.0, 2.0, 1.0), false, Color.black, false, Color.yellow, new BasicStroke(2.1f), false, new Line2D.Double(4.0, 3.0, 2.0, 1.0), new BasicStroke(2.1f), Color.green);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   item1 | item2 | VARIABLE_NAME_MISMATCH

   47

       item2 = new LegendItem("Label2", "Description2", "ToolTip", "URL", false, new Rectangle2D.Double(4.0, 3.0, 2.0, 1.0), false, Color.black, false, Color.yellow, new BasicStroke(2.1f), false, new Line2D.Double(4.0, 3.0, 2.0, 1.0), new BasicStroke(2.1f), Color.green);

   46

       assertFalse(item1.equals(item2));

   46 | assertFalse(item1.equals(item2));
   48 | assertTrue(item1.equals(item2));

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

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

   48

       assertTrue(item1.equals(item2));

   Precondition Violations (4)
   Row | Violation
   --- | ---
   1 | Expression assertFalse(item1.equals(item2)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   2 | Expression assertTrue(item1.equals(item2)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   3 | Expression assertFalse(item1.equals(item2)) is a void method call, and thus it cannot be parameterized
   4 | Expression assertTrue(item1.equals(item2)) is a void method call, and thus it cannot be parameterized