278-1-2

VectorSeries s1 = new VectorSeries("Series 1"); s1.add(1.0, 1.0, 1.0, 1.0); s1.add(2.0, 2.0, 2.0, 2.0); s1.add(2.0, 2.0, 3.0, 3.0); s1.add(2.0, 3.0, 4.0, 4.0); s1.add(3.0, 5.0, 5.0, 5.0); assertEquals(1.0, s1.getVectorXValue(0), EPSILON); assertEquals(2.0, s1.getVectorXValue(1), EPSILON); assertEquals(3.0, s1.getVectorXValue(2), EPSILON); assertEquals(4.0, s1.getVectorXValue(3), EPSILON); assertEquals(5.0, s1.getVectorXValue(4), EPSILON);
YIntervalSeries s1 = new YIntervalSeries("Series 1"); s1.add(1.0, 1.0, 1.0, 1.0); s1.add(2.0, 2.0, 2.0, 2.0); s1.add(2.0, 3.0, 3.0, 3.0); s1.add(2.0, 4.0, 4.0, 4.0); s1.add(3.0, 5.0, 5.0, 5.0); assertEquals(1.0, s1.getYValue(0), EPSILON); assertEquals(2.0, s1.getYValue(1), EPSILON); assertEquals(3.0, s1.getYValue(2), EPSILON); assertEquals(4.0, s1.getYValue(3), EPSILON); assertEquals(5.0, s1.getYValue(4), EPSILON);

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

1

    VectorSeries s1 = new VectorSeries("Series 1");↵

1

    YIntervalSeries s1 = new YIntervalSeries("Series 1");↵

2

            s1.add(1.0, 1.0, 1.0, 1.0);↵

2

            s1.add(1.0, 1.0, 1.0, 1.0);↵

3

            s1.add(2.0, 2.0, 2.0, 2.0);↵

3

            s1.add(2.0, 2.0, 2.0, 2.0);↵

4

            s1.add(2.0, 2.0, 3.0, 3.0);↵

4

            s1.add(2.0, 3.0, 3.0, 3.0);↵

5

            s1.add(2.0, 3.0, 4.0, 4.0);↵

5

            s1.add(2.0, 4.0, 4.0, 4.0);↵

6

            s1.add(3.0, 5.0, 5.0, 5.0);↵

6

            s1.add(3.0, 5.0, 5.0, 5.0);↵

7

            assertEquals(1.0, s1.getVectorXValue(0), EPSILON);↵

7

            assertEquals(1.0, s1.getYValue(0), EPSILON);↵

8

            assertEquals(2.0, s1.getVectorXValue(1), EPSILON);↵

8

            assertEquals(2.0, s1.getYValue(1), EPSILON);↵

9

            assertEquals(3.0, s1.getVectorXValue(2), EPSILON);↵

9

            assertEquals(3.0, s1.getYValue(2), EPSILON);↵

10

            assertEquals(4.0, s1.getVectorXValue(3), EPSILON);↵

10

            assertEquals(4.0, s1.getYValue(3), EPSILON);↵

11

            assertEquals(5.0, s1.getVectorXValue(4), EPSILON);

11

            assertEquals(5.0, s1.getYValue(4), EPSILON);

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

1. {Non-refactorable}

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

       VectorSeries s1 = new VectorSeries("Series 1");

   1 | VectorSeries s1 = new VectorSeries("Series 1");
   1 | YIntervalSeries s1 = new YIntervalSeries("Series 1");

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.data.xy.VectorSeries | org.jfree.data.xy.YIntervalSeries | SUBCLASS_TYPE_MISMATCH
   org.jfree.data.xy.VectorSeries | org.jfree.data.xy.YIntervalSeries | SUBCLASS_TYPE_MISMATCH
   org.jfree.data.xy.VectorSeries | org.jfree.data.xy.YIntervalSeries | SUBCLASS_TYPE_MISMATCH

   1

       YIntervalSeries s1 = new YIntervalSeries("Series 1");

   2

       s1.add(1.0, 1.0, 1.0, 1.0);

   2 | s1.add(1.0, 1.0, 1.0, 1.0);
   2 | s1.add(1.0, 1.0, 1.0, 1.0);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.data.xy.VectorSeries | org.jfree.data.xy.YIntervalSeries | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)

   2

       s1.add(1.0, 1.0, 1.0, 1.0);

   3

       s1.add(2.0, 2.0, 2.0, 2.0);

   3 | s1.add(2.0, 2.0, 2.0, 2.0);
   3 | s1.add(2.0, 2.0, 2.0, 2.0);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.data.xy.VectorSeries | org.jfree.data.xy.YIntervalSeries | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)

   3

       s1.add(2.0, 2.0, 2.0, 2.0);

   4

       s1.add(2.0, 2.0, 3.0, 3.0);

   4 | s1.add(2.0, 2.0, 3.0, 3.0);
   4 | s1.add(2.0, 3.0, 3.0, 3.0);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   2.0 | 3.0 | LITERAL_VALUE_MISMATCH
   org.jfree.data.xy.VectorSeries | org.jfree.data.xy.YIntervalSeries | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)

   4

       s1.add(2.0, 3.0, 3.0, 3.0);

   5

       s1.add(2.0, 3.0, 4.0, 4.0);

   5 | s1.add(2.0, 3.0, 4.0, 4.0);
   5 | s1.add(2.0, 4.0, 4.0, 4.0);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   3.0 | 4.0 | LITERAL_VALUE_MISMATCH
   org.jfree.data.xy.VectorSeries | org.jfree.data.xy.YIntervalSeries | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)

   5

       s1.add(2.0, 4.0, 4.0, 4.0);

   6

       s1.add(3.0, 5.0, 5.0, 5.0);

   6 | s1.add(3.0, 5.0, 5.0, 5.0);
   6 | s1.add(3.0, 5.0, 5.0, 5.0);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.data.xy.VectorSeries | org.jfree.data.xy.YIntervalSeries | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)

   6

       s1.add(3.0, 5.0, 5.0, 5.0);

   7

       assertEquals(1.0, s1.getVectorXValue(0), EPSILON);

   7 | assertEquals(1.0, s1.getVectorXValue(0), EPSILON);
   7 | assertEquals(1.0, s1.getYValue(0), EPSILON);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   getVectorXValue | getYValue | METHOD_INVOCATION_NAME_MISMATCH
   org.jfree.data.xy.VectorSeries | org.jfree.data.xy.YIntervalSeries | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression s1.getVectorXValue(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression s1.getYValue(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   7

       assertEquals(1.0, s1.getYValue(0), EPSILON);

   8

       assertEquals(2.0, s1.getVectorXValue(1), EPSILON);

   8 | assertEquals(2.0, s1.getVectorXValue(1), EPSILON);
   8 | assertEquals(2.0, s1.getYValue(1), EPSILON);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   getVectorXValue | getYValue | METHOD_INVOCATION_NAME_MISMATCH
   org.jfree.data.xy.VectorSeries | org.jfree.data.xy.YIntervalSeries | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression s1.getVectorXValue(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression s1.getYValue(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   8

       assertEquals(2.0, s1.getYValue(1), EPSILON);

   9

       assertEquals(3.0, s1.getVectorXValue(2), EPSILON);

   9 | assertEquals(3.0, s1.getVectorXValue(2), EPSILON);
   9 | assertEquals(3.0, s1.getYValue(2), EPSILON);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   getVectorXValue | getYValue | METHOD_INVOCATION_NAME_MISMATCH
   org.jfree.data.xy.VectorSeries | org.jfree.data.xy.YIntervalSeries | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression s1.getVectorXValue(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression s1.getYValue(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   9

       assertEquals(3.0, s1.getYValue(2), EPSILON);

   10

       assertEquals(4.0, s1.getVectorXValue(3), EPSILON);

   10 | assertEquals(4.0, s1.getVectorXValue(3), EPSILON);
   10 | assertEquals(4.0, s1.getYValue(3), EPSILON);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   getVectorXValue | getYValue | METHOD_INVOCATION_NAME_MISMATCH
   org.jfree.data.xy.VectorSeries | org.jfree.data.xy.YIntervalSeries | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression s1.getVectorXValue(3) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression s1.getYValue(3) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   10

       assertEquals(4.0, s1.getYValue(3), EPSILON);

   11

       assertEquals(5.0, s1.getVectorXValue(4), EPSILON);

   11 | assertEquals(5.0, s1.getVectorXValue(4), EPSILON);
   11 | assertEquals(5.0, s1.getYValue(4), EPSILON);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   getVectorXValue | getYValue | METHOD_INVOCATION_NAME_MISMATCH
   org.jfree.data.xy.VectorSeries | org.jfree.data.xy.YIntervalSeries | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression s1.getVectorXValue(4) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression s1.getYValue(4) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   11

       assertEquals(5.0, s1.getYValue(4), EPSILON);

   Precondition Violations (15)
   Row | Violation
   --- | ---
   1 | Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
   2 | Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
   3 | Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
   4 | Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
   5 | Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
   6 | Expression s1.getVectorXValue(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   7 | Expression s1.getYValue(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   8 | Expression s1.getVectorXValue(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   9 | Expression s1.getYValue(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   10 | Expression s1.getVectorXValue(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   11 | Expression s1.getYValue(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   12 | Expression s1.getVectorXValue(3) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   13 | Expression s1.getYValue(3) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   14 | Expression s1.getVectorXValue(4) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   15 | Expression s1.getYValue(4) cannot be parameterized, because it has dependencies to/from statements that will be extracted