1702-1-5

item1 = new LegendItem("Label2", "Description2", "ToolTip", "URL", true, new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), true, Color.red, true, Color.blue, new BasicStroke(1.2f), true, new Line2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(2.1f), Color.green); assertFalse(item1.equals(item2));
item1 = new LegendItem("Label2", "Description2", "ToolTip", "URL", false, new Rectangle2D.Double(4.0, 3.0, 2.0, 1.0), true, Color.red, true, Color.blue, new BasicStroke(1.2f), true, new Line2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(2.1f), Color.green); assertFalse(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

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

2

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

2

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

3

                    true, Color.red, true, Color.blue, new BasicStroke(1.2f), true,↵

3

                    true, Color.red, true, Color.blue, new BasicStroke(1.2f), true,↵

4

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

4

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

5

                    Color.green);↵

5

                    Color.green);↵

6

            assertFalse(item1.equals(item2));

6

            assertFalse(item1.equals(item2));

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

1. {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
   --- | --- | --- | --- | ---

   9

       item1 = new LegendItem("Label2", "Description2", "ToolTip", "URL", true, new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), true, Color.red, true, Color.blue, new BasicStroke(1.2f), true, new Line2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(2.1f), Color.green);

   9 | item1 = new LegendItem("Label2", "Description2", "ToolTip", "URL", true, new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), true, Color.red, true, Color.blue, new BasicStroke(1.2f), true, new Line2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(2.1f), Color.green);
   17 | item1 = new LegendItem("Label2", "Description2", "ToolTip", "URL", false, new Rectangle2D.Double(4.0, 3.0, 2.0, 1.0), true, Color.red, true, Color.blue, new BasicStroke(1.2f), true, new Line2D.Double(1.0, 2.0, 3.0, 4.0), new BasicStroke(2.1f), Color.green);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   true | false | LITERAL_VALUE_MISMATCH
   1.0 | 4.0 | LITERAL_VALUE_MISMATCH
   2.0 | 3.0 | LITERAL_VALUE_MISMATCH
   3.0 | 2.0 | LITERAL_VALUE_MISMATCH
   4.0 | 1.0 | LITERAL_VALUE_MISMATCH

   17

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

   10

       assertFalse(item1.equals(item2));

   18

       assertFalse(item1.equals(item2));

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