VectorSeries series = new VectorSeries("Series", false, true); series.add(5.0, 5.50, 5.50, 5.50); series.add(5.1, 5.51, 5.51, 5.51); series.add(6.0, 6.6, 6.6, 6.6); series.add(3.0, 3.3, 3.3, 3.3); series.add(4.0, 4.4, 4.4, 4.4); series.add(2.0, 2.2, 2.2, 2.2); series.add(1.0, 1.1, 1.1, 1.1); assertEquals(5.5, series.getVectorXValue(0), EPSILON); assertEquals(5.51, series.getVectorXValue(1), EPSILON); assertEquals(6.6, series.getVectorXValue(2), EPSILON); assertEquals(3.3, series.getVectorXValue(3), EPSILON); assertEquals(4.4, series.getVectorXValue(4), EPSILON); assertEquals(2.2, series.getVectorXValue(5), EPSILON); assertEquals(1.1, series.getVectorXValue(6), EPSILON);
XIntervalSeries series = new XIntervalSeries("Series", false, true); series.add(5.0, 5.50, 5.50, 5.50); series.add(5.1, 5.51, 5.51, 5.51); series.add(6.0, 6.6, 6.6, 6.6); series.add(3.0, 3.3, 3.3, 3.3); series.add(4.0, 4.4, 4.4, 4.4); series.add(2.0, 2.2, 2.2, 2.2); series.add(1.0, 1.1, 1.1, 1.1); assertEquals(5.5, series.getYValue(0), EPSILON); assertEquals(5.51, series.getYValue(1), EPSILON); assertEquals(6.6, series.getYValue(2), EPSILON); assertEquals(3.3, series.getYValue(3), EPSILON); assertEquals(4.4, series.getYValue(4), EPSILON); assertEquals(2.2, series.getYValue(5), EPSILON); assertEquals(1.1, series.getYValue(6), 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 testAdd() Method name: void testAdd()
Number of AST nodes: 15 Number of AST nodes: 15
1
VectorSeries series = new VectorSeries("Series", false, true);
1
XIntervalSeries series = new XIntervalSeries("Series", false, true);
2
        series.add(5.0, 5.50, 5.50, 5.50);
2
        series.add(5.0, 5.50, 5.50, 5.50);
3
        series.add(5.1, 5.51, 5.51, 5.51);
3
        series.add(5.1, 5.51, 5.51, 5.51);
4
        series.add(6.0, 6.6, 6.6, 6.6);
4
        series.add(6.0, 6.6, 6.6, 6.6);
5
        series.add(3.0, 3.3, 3.3, 3.3);
5
        series.add(3.0, 3.3, 3.3, 3.3);
6
        series.add(4.0, 4.4, 4.4, 4.4);
6
        series.add(4.0, 4.4, 4.4, 4.4);
7
        series.add(2.0, 2.2, 2.2, 2.2);
7
        series.add(2.0, 2.2, 2.2, 2.2);
8
        series.add(1.0, 1.1, 1.1, 1.1);
8
        series.add(1.0, 1.1, 1.1, 1.1);
9
        assertEquals(5.5, series.getVectorXValue(0), EPSILON);
9
        assertEquals(5.5, series.getYValue(0), EPSILON);
10
        assertEquals(5.51, series.getVectorXValue(1), EPSILON);
10
        assertEquals(5.51, series.getYValue(1), EPSILON);
11
        assertEquals(6.6, series.getVectorXValue(2), EPSILON);
11
        assertEquals(6.6, series.getYValue(2), EPSILON);
12
        assertEquals(3.3, series.getVectorXValue(3), EPSILON);
12
        assertEquals(3.3, series.getYValue(3), EPSILON);
13
        assertEquals(4.4, series.getVectorXValue(4), EPSILON);
13
        assertEquals(4.4, series.getYValue(4), EPSILON);
14
        assertEquals(2.2, series.getVectorXValue(5), EPSILON);
14
        assertEquals(2.2, series.getYValue(5), EPSILON);
15
        assertEquals(1.1, series.getVectorXValue(6), EPSILON);
15
        assertEquals(1.1, series.getYValue(6), 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 comparisons113
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements15
    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 series = new VectorSeries("Series", false, true);
    1
    VectorSeries series = new VectorSeries("Series", false, true);
    1
    XIntervalSeries series = new XIntervalSeries("Series", false, true);
    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 series = new XIntervalSeries("Series", false, true);
    2
    series.add(5.0, 5.50, 5.50, 5.50);
    2
    series.add(5.0, 5.50, 5.50, 5.50);
    2
    series.add(5.0, 5.50, 5.50, 5.50);
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
    2
    series.add(5.0, 5.50, 5.50, 5.50);
    3
    series.add(5.1, 5.51, 5.51, 5.51);
    3
    series.add(5.1, 5.51, 5.51, 5.51);
    3
    series.add(5.1, 5.51, 5.51, 5.51);
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
    3
    series.add(5.1, 5.51, 5.51, 5.51);
    4
    series.add(6.0, 6.6, 6.6, 6.6);
    4
    series.add(6.0, 6.6, 6.6, 6.6);
    4
    series.add(6.0, 6.6, 6.6, 6.6);
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
    4
    series.add(6.0, 6.6, 6.6, 6.6);
    5
    series.add(3.0, 3.3, 3.3, 3.3);
    5
    series.add(3.0, 3.3, 3.3, 3.3);
    5
    series.add(3.0, 3.3, 3.3, 3.3);
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
    5
    series.add(3.0, 3.3, 3.3, 3.3);
    6
    series.add(4.0, 4.4, 4.4, 4.4);
    6
    series.add(4.0, 4.4, 4.4, 4.4);
    6
    series.add(4.0, 4.4, 4.4, 4.4);
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
    6
    series.add(4.0, 4.4, 4.4, 4.4);
    7
    series.add(2.0, 2.2, 2.2, 2.2);
    7
    series.add(2.0, 2.2, 2.2, 2.2);
    7
    series.add(2.0, 2.2, 2.2, 2.2);
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
    7
    series.add(2.0, 2.2, 2.2, 2.2);
    8
    series.add(1.0, 1.1, 1.1, 1.1);
    8
    series.add(1.0, 1.1, 1.1, 1.1);
    8
    series.add(1.0, 1.1, 1.1, 1.1);
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
    8
    series.add(1.0, 1.1, 1.1, 1.1);
    9
    assertEquals(5.5, series.getVectorXValue(0), EPSILON);
    9
    assertEquals(5.5, series.getVectorXValue(0), EPSILON);
    9
    assertEquals(5.5, series.getYValue(0), EPSILON);
    Differences
    Expression1Expression2Difference
    getVectorXValuegetYValueMETHOD_INVOCATION_NAME_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression series.getVectorXValue(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression series.getYValue(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    9
    assertEquals(5.5, series.getYValue(0), EPSILON);
    10
    assertEquals(5.51, series.getVectorXValue(1), EPSILON);
    10
    assertEquals(5.51, series.getVectorXValue(1), EPSILON);
    10
    assertEquals(5.51, series.getYValue(1), EPSILON);
    Differences
    Expression1Expression2Difference
    getVectorXValuegetYValueMETHOD_INVOCATION_NAME_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression series.getVectorXValue(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression series.getYValue(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    10
    assertEquals(5.51, series.getYValue(1), EPSILON);
    11
    assertEquals(6.6, series.getVectorXValue(2), EPSILON);
    11
    assertEquals(6.6, series.getVectorXValue(2), EPSILON);
    11
    assertEquals(6.6, series.getYValue(2), EPSILON);
    Differences
    Expression1Expression2Difference
    getVectorXValuegetYValueMETHOD_INVOCATION_NAME_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression series.getVectorXValue(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression series.getYValue(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    11
    assertEquals(6.6, series.getYValue(2), EPSILON);
    12
    assertEquals(3.3, series.getVectorXValue(3), EPSILON);
    12
    assertEquals(3.3, series.getVectorXValue(3), EPSILON);
    12
    assertEquals(3.3, series.getYValue(3), EPSILON);
    Differences
    Expression1Expression2Difference
    getVectorXValuegetYValueMETHOD_INVOCATION_NAME_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression series.getVectorXValue(3) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression series.getYValue(3) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    12
    assertEquals(3.3, series.getYValue(3), EPSILON);
    13
    assertEquals(4.4, series.getVectorXValue(4), EPSILON);
    13
    assertEquals(4.4, series.getVectorXValue(4), EPSILON);
    13
    assertEquals(4.4, series.getYValue(4), EPSILON);
    Differences
    Expression1Expression2Difference
    getVectorXValuegetYValueMETHOD_INVOCATION_NAME_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression series.getVectorXValue(4) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression series.getYValue(4) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    13
    assertEquals(4.4, series.getYValue(4), EPSILON);
    14
    assertEquals(2.2, series.getVectorXValue(5), EPSILON);
    14
    assertEquals(2.2, series.getVectorXValue(5), EPSILON);
    14
    assertEquals(2.2, series.getYValue(5), EPSILON);
    Differences
    Expression1Expression2Difference
    getVectorXValuegetYValueMETHOD_INVOCATION_NAME_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression series.getVectorXValue(5) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression series.getYValue(5) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    14
    assertEquals(2.2, series.getYValue(5), EPSILON);
    15
    assertEquals(1.1, series.getVectorXValue(6), EPSILON);
    15
    assertEquals(1.1, series.getVectorXValue(6), EPSILON);
    15
    assertEquals(1.1, series.getYValue(6), EPSILON);
    Differences
    Expression1Expression2Difference
    getVectorXValuegetYValueMETHOD_INVOCATION_NAME_MISMATCH
    org.jfree.data.xy.VectorSeriesorg.jfree.data.xy.XIntervalSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression series.getVectorXValue(6) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression series.getYValue(6) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    15
    assertEquals(1.1, series.getYValue(6), EPSILON);
    Precondition Violations (28)
    Row Violation
    1Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
    2Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
    3Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
    4Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
    5Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
    6Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
    7Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double)
    8Expression series.getVectorXValue(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression series.getYValue(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    11Expression series.getVectorXValue(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression series.getYValue(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    14Expression series.getVectorXValue(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression series.getYValue(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    17Expression series.getVectorXValue(3) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    18Expression series.getYValue(3) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    20Expression series.getVectorXValue(4) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    21Expression series.getYValue(4) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    22Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    23Expression series.getVectorXValue(5) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    24Expression series.getYValue(5) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)
    26Expression series.getVectorXValue(6) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    27Expression series.getYValue(6) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    28Expression series cannot be unified with expression series , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public double getVectorXValue(int) , public double getYValue(int)