1702-10-17

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(1.0, 2.0, 3.0, 4.0), new BasicStroke(2.1f), Color.green); assertFalse(item1.equals(item2));
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/junit/LegendItemTests.java |  | File path: /jfreechart-1.0.10/tests/org/jfree/chart/plot/junit/CategoryPlotTests.java
Method name: `void testEquals()` |  | Method name: `void testCloning3()`
Number of AST nodes: 2 |  | Number of AST nodes: 2

1

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

1

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

2

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

2

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

3

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

3

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

4

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

4

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

5

                    new BasicStroke(2.1f),↵

5

     new BasicStroke(1.0f),↵

6

     Color.green);↵

6

                    Color.green));↵

7

            assertFalse(item1.equals(item2));

7

            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 different classes having the same super class
Number of node comparisons | 4

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 0
   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 | Unknown type

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

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