1392-1-2

MatrixSeries m = new MatrixSeries("Test", 3, 2); assertEquals(0, m.getItemColumn(0)); assertEquals(1, m.getItemColumn(1)); assertEquals(0, m.getItemColumn(2)); assertEquals(1, m.getItemColumn(3)); assertEquals(0, m.getItemColumn(4)); assertEquals(1, m.getItemColumn(5));
MatrixSeries m = new MatrixSeries("Test", 3, 2); assertEquals(0, m.getItemRow(0)); assertEquals(0, m.getItemRow(1)); assertEquals(1, m.getItemRow(2)); assertEquals(1, m.getItemRow(3)); assertEquals(2, m.getItemRow(4)); assertEquals(2, m.getItemRow(5));

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

1

    MatrixSeries m = new MatrixSeries("Test", 3, 2);↵

1

    MatrixSeries m = new MatrixSeries("Test", 3, 2);↵

2

            assertEquals(0, m.getItemColumn(0));↵

2

            assertEquals(0, m.getItemRow(0));↵

3

            assertEquals(1, m.getItemColumn(1));↵

3

            assertEquals(0, m.getItemRow(1));↵

4

            assertEquals(0, m.getItemColumn(2));↵

4

            assertEquals(1, m.getItemRow(2));↵

5

            assertEquals(1, m.getItemColumn(3));↵

5

            assertEquals(1, m.getItemRow(3));↵

6

            assertEquals(0, m.getItemColumn(4));↵

6

            assertEquals(2, m.getItemRow(4));↵

7

            assertEquals(1, m.getItemColumn(5));

7

            assertEquals(2, m.getItemRow(5));

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 declared in the same class
Number of node comparisons | 37

1. {Non-refactorable}

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

   1

       MatrixSeries m = new MatrixSeries("Test", 3, 2);

   1

       MatrixSeries m = new MatrixSeries("Test", 3, 2);

   2

       assertEquals(0, m.getItemColumn(0));

   2 | assertEquals(0, m.getItemColumn(0));
   2 | assertEquals(0, m.getItemRow(0));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   getItemColumn | getItemRow | METHOD_INVOCATION_NAME_MISMATCH

   Preondition Violations
   Expression m.getItemColumn(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression m.getItemRow(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   2

       assertEquals(0, m.getItemRow(0));

   3

       assertEquals(1, m.getItemColumn(1));

   3 | assertEquals(1, m.getItemColumn(1));
   4 | assertEquals(1, m.getItemRow(2));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   getItemColumn | getItemRow | METHOD_INVOCATION_NAME_MISMATCH
   1 | 2 | LITERAL_VALUE_MISMATCH

   Preondition Violations
   Expression m.getItemColumn(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression m.getItemRow(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   4

       assertEquals(1, m.getItemRow(2));

   4

       assertEquals(0, m.getItemColumn(2));

   4 | assertEquals(0, m.getItemColumn(2));
   3 | assertEquals(0, m.getItemRow(1));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   getItemColumn | getItemRow | METHOD_INVOCATION_NAME_MISMATCH
   2 | 1 | LITERAL_VALUE_MISMATCH

   Preondition Violations
   Expression m.getItemColumn(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression m.getItemRow(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   3

       assertEquals(0, m.getItemRow(1));

   5

       assertEquals(1, m.getItemColumn(3));

   5 | assertEquals(1, m.getItemColumn(3));
   5 | assertEquals(1, m.getItemRow(3));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   getItemColumn | getItemRow | METHOD_INVOCATION_NAME_MISMATCH

   Preondition Violations
   Expression m.getItemColumn(3) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression m.getItemRow(3) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   5

       assertEquals(1, m.getItemRow(3));

   6

       assertEquals(0, m.getItemColumn(4));

   6 | assertEquals(0, m.getItemColumn(4));
   6 | assertEquals(2, m.getItemRow(4));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   0 | 2 | LITERAL_VALUE_MISMATCH
   getItemColumn | getItemRow | METHOD_INVOCATION_NAME_MISMATCH

   Preondition Violations
   Expression m.getItemColumn(4) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression m.getItemRow(4) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   6

       assertEquals(2, m.getItemRow(4));

   7

       assertEquals(1, m.getItemColumn(5));

   7 | assertEquals(1, m.getItemColumn(5));
   7 | assertEquals(2, m.getItemRow(5));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   1 | 2 | LITERAL_VALUE_MISMATCH
   getItemColumn | getItemRow | METHOD_INVOCATION_NAME_MISMATCH

   Preondition Violations
   Expression m.getItemColumn(5) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression m.getItemRow(5) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   7

       assertEquals(2, m.getItemRow(5));

   Precondition Violations (12)
   Row | Violation
   --- | ---
   1 | Expression m.getItemColumn(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   2 | Expression m.getItemRow(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   3 | Expression m.getItemColumn(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   4 | Expression m.getItemRow(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   5 | Expression m.getItemColumn(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   6 | Expression m.getItemRow(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   7 | Expression m.getItemColumn(3) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   8 | Expression m.getItemRow(3) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   9 | Expression m.getItemColumn(4) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   10 | Expression m.getItemRow(4) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   11 | Expression m.getItemColumn(5) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   12 | Expression m.getItemRow(5) cannot be parameterized, because it has dependencies to/from statements that will be extracted