1749-1-2

plot1.setDrawingSupplier(new DefaultDrawingSupplier( new Paint[] {Color.blue}, new Paint[] {Color.red}, new Stroke[] {new BasicStroke(1.1f)}, new Stroke[] {new BasicStroke(9.9f)}, new Shape[] {new Rectangle(1, 2, 3, 4)})); assertFalse(plot1.equals(plot2));
plot2.setDrawingSupplier(new DefaultDrawingSupplier( new Paint[] {Color.blue}, new Paint[] {Color.red}, new Stroke[] {new BasicStroke(1.1f)}, new Stroke[] {new BasicStroke(9.9f)}, new Shape[] {new Rectangle(1, 2, 3, 4)})); assertTrue(plot1.equals(plot2));

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

1

    plot1.setDrawingSupplier(new DefaultDrawingSupplier(↵

1

    plot2.setDrawingSupplier(new DefaultDrawingSupplier(↵

2

                    new Paint[] {Color.blue}, new Paint[] {Color.red}, ↵

2

                    new Paint[] {Color.blue}, new Paint[] {Color.red}, ↵

3

                    new Stroke[] {new BasicStroke(1.1f)}, ↵

3

                    new Stroke[] {new BasicStroke(1.1f)}, ↵

4

                    new Stroke[] {new BasicStroke(9.9f)}, ↵

4

                    new Stroke[] {new BasicStroke(9.9f)}, ↵

5

                    new Shape[] {new Rectangle(1, 2, 3, 4)}));↵

5

                    new Shape[] {new Rectangle(1, 2, 3, 4)}));↵

6

            assertFalse(plot1.equals(plot2));

6

            assertTrue(plot1.equals(plot2));

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

   58

       plot1.setDrawingSupplier(new DefaultDrawingSupplier(new Paint[] {Color.blue}, new Paint[] {Color.red}, new Stroke[] {new BasicStroke(1.1f)}, new Stroke[] {new BasicStroke(9.9f)}, new Shape[] {new Rectangle(1, 2, 3, 4)}));

   58 | plot1.setDrawingSupplier(new DefaultDrawingSupplier(new Paint[] {Color.blue}, new Paint[] {Color.red}, new Stroke[] {new BasicStroke(1.1f)}, new Stroke[] {new BasicStroke(9.9f)}, new Shape[] {new Rectangle(1, 2, 3, 4)}));
   60 | plot2.setDrawingSupplier(new DefaultDrawingSupplier(new Paint[] {Color.blue}, new Paint[] {Color.red}, new Stroke[] {new BasicStroke(1.1f)}, new Stroke[] {new BasicStroke(9.9f)}, new Shape[] {new Rectangle(1, 2, 3, 4)}));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   plot1 | plot2 | VARIABLE_NAME_MISMATCH

   60

       plot2.setDrawingSupplier(new DefaultDrawingSupplier(new Paint[] {Color.blue}, new Paint[] {Color.red}, new Stroke[] {new BasicStroke(1.1f)}, new Stroke[] {new BasicStroke(9.9f)}, new Shape[] {new Rectangle(1, 2, 3, 4)}));

   59

       assertFalse(plot1.equals(plot2));

   59 | assertFalse(plot1.equals(plot2));
   61 | assertTrue(plot1.equals(plot2));

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

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

   61

       assertTrue(plot1.equals(plot2));

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