1795-2-7

d2 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[] {3.4}, new double[1], new double[1], new double[1]); assertTrue(d1.equals(d2));
d1 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[] {3.4}, new double[] {5.6}, new double[] {7.8}, new double[] {99.9}); assertFalse(d1.equals(d2));

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

1

    d2 = new DefaultHighLowDataset("Series 2",↵

1

    d1 = new DefaultHighLowDataset("Series 2",↵

2

                    new Date[] {new Date(123L)}, new double[] {1.2},↵

2

                    new Date[] {new Date(123L)}, new double[] {1.2},↵

3

                    new double[] {3.4}, new double[1], new double[1],↵

3

                    new double[] {3.4}, new double[] {5.6}, new double[] {7.8},↵

4

                    new double[1]);↵

4

                    new double[] {99.9});↵

5

            assertTrue(d1.equals(d2));

5

            assertFalse(d1.equals(d2));

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

   19

       d2 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[] {3.4}, new double[1], new double[1], new double[1]);

   19 | d2 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[] {3.4}, new double[1], new double[1], new double[1]);
   29 | d1 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[] {3.4}, new double[] {5.6}, new double[] {7.8}, new double[] {99.9});

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   d2 | d1 | VARIABLE_NAME_MISMATCH
   new double[1] | new double[]{5.6} | ARRAY_DIMENSION_MISMATCH
   new double[1] | new double[]{5.6} | MISSING_ARRAY_INITIALIZER
   new double[1] | new double[]{7.8} | ARRAY_DIMENSION_MISMATCH
   new double[1] | new double[]{7.8} | MISSING_ARRAY_INITIALIZER
   new double[1] | new double[]{99.9} | ARRAY_DIMENSION_MISMATCH
   new double[1] | new double[]{99.9} | MISSING_ARRAY_INITIALIZER

   29

       d1 = new DefaultHighLowDataset("Series 2", new Date[] {new Date(123L)}, new double[] {1.2}, new double[] {3.4}, new double[] {5.6}, new double[] {7.8}, new double[] {99.9});

   20

       assertTrue(d1.equals(d2));

   20 | assertTrue(d1.equals(d2));
   30 | assertFalse(d1.equals(d2));

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

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

   30

       assertFalse(d1.equals(d2));

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