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);
XIntervalSeries s1 = new XIntervalSeries("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/XIntervalSeriesTests.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
XIntervalSeries s1 = new XIntervalSeries("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);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons61
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements11
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    VectorSeries s1 = new VectorSeries("Series 1");
    1
    VectorSeries s1 = new VectorSeries("Series 1");
    1
    XIntervalSeries s1 = new XIntervalSeries("Series 1");
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    1
    XIntervalSeries s1 = new XIntervalSeries("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
    Expression1Expression2Difference
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_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
    Expression1Expression2Difference
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_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
    Expression1Expression2Difference
    2.03.0LITERAL_VALUE_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_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
    Expression1Expression2Difference
    3.04.0LITERAL_VALUE_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_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
    Expression1Expression2Difference
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_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
    Expression1Expression2Difference
    getVectorXValuegetYValueMETHOD_INVOCATION_NAME_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_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
    Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    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
    Expression1Expression2Difference
    getVectorXValuegetYValueMETHOD_INVOCATION_NAME_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_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
    Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    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
    Expression1Expression2Difference
    getVectorXValuegetYValueMETHOD_INVOCATION_NAME_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_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
    Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    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
    Expression1Expression2Difference
    getVectorXValuegetYValueMETHOD_INVOCATION_NAME_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_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
    Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    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
    Expression1Expression2Difference
    getVectorXValuegetYValueMETHOD_INVOCATION_NAME_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_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
    Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    11
    assertEquals(5.0, s1.getYValue(4), EPSILON);
    Precondition Violations (20)
    Row Violation
    1Expression 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)
    2Expression 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)
    3Expression 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)
    4Expression 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)
    5Expression 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)
    6Expression s1.getVectorXValue(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression s1.getYValue(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    9Expression s1.getVectorXValue(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression s1.getYValue(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    12Expression s1.getVectorXValue(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression s1.getYValue(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    15Expression s1.getVectorXValue(3) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Expression s1.getYValue(3) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    18Expression s1.getVectorXValue(4) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Expression s1.getYValue(4) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    20Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)