XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0); assertEquals(new Double(1.0), item1.getX()); assertEquals(2.0, item1.getXLowValue(), EPSILON); assertEquals(3.0, item1.getXHighValue(), EPSILON); assertEquals(4.0, item1.getYValue(), EPSILON);
YIntervalDataItem item1 = new YIntervalDataItem(1.0, 2.0, 3.0, 4.0); assertEquals(new Double(1.0), item1.getX()); assertEquals(2.0, item1.getYValue(), EPSILON); assertEquals(3.0, item1.getYLowValue(), EPSILON); assertEquals(4.0, item1.getYHighValue(), EPSILON);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/data/xy/junit/XIntervalDataItemTests.java File path: /jfreechart-1.0.10/tests/org/jfree/data/xy/junit/YIntervalDataItemTests.java
Method name: void testConstructor1() Method name: void testConstructor1()
Number of AST nodes: 5 Number of AST nodes: 5
1
XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);
1
YIntervalDataItem item1 = new YIntervalDataItem(1.0, 2.0, 3.0, 4.0);
2
        assertEquals(new Double(1.0), item1.getX());
2
        assertEquals(new Double(1.0), item1.getX());
3
        assertEquals(2.0, item1.getXLowValue(), EPSILON);
3
        assertEquals(2.0, item1.getYValue(), EPSILON);
4
        assertEquals(3.0, item1.getXHighValue(), EPSILON);
4
        assertEquals(3.0, item1.getYLowValue(), EPSILON);
5
        assertEquals(4.0, item1.getYValue(), EPSILON);
5
        assertEquals(4.0, item1.getYHighValue(), 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 comparisons17
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    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
    XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);
    1
    XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);
    1
    YIntervalDataItem item1 = new YIntervalDataItem(1.0, 2.0, 3.0, 4.0);
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.XIntervalDataItemorg.jfree.data.xy.YIntervalDataItemSUBCLASS_TYPE_MISMATCH
    org.jfree.data.xy.XIntervalDataItemorg.jfree.data.xy.YIntervalDataItemSUBCLASS_TYPE_MISMATCH
    org.jfree.data.xy.XIntervalDataItemorg.jfree.data.xy.YIntervalDataItemSUBCLASS_TYPE_MISMATCH
    1
    YIntervalDataItem item1 = new YIntervalDataItem(1.0, 2.0, 3.0, 4.0);
    2
    assertEquals(new Double(1.0), item1.getX());
    2
    assertEquals(new Double(1.0), item1.getX());
    2
    assertEquals(new Double(1.0), item1.getX());
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.XIntervalDataItemorg.jfree.data.xy.YIntervalDataItemSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression item1 cannot be unified with expression item1 , because common superclass org.jfree.data.ComparableObjectItem does not declare member(s) public java.lang.Number getX() , public java.lang.Double getX()
    2
    assertEquals(new Double(1.0), item1.getX());
    3
    assertEquals(2.0, item1.getXLowValue(), EPSILON);
    3
    assertEquals(2.0, item1.getXLowValue(), EPSILON);
    4
    assertEquals(3.0, item1.getYLowValue(), EPSILON);
    Differences
    Expression1Expression2Difference
    2.03.0LITERAL_VALUE_MISMATCH
    getXLowValuegetYLowValueMETHOD_INVOCATION_NAME_MISMATCH
    org.jfree.data.xy.XIntervalDataItemorg.jfree.data.xy.YIntervalDataItemSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression item1.getXLowValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression item1.getYLowValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression item1 cannot be unified with expression item1 , because common superclass org.jfree.data.ComparableObjectItem does not declare member(s) public double getXLowValue() , public double getYLowValue()
    4
    assertEquals(3.0, item1.getYLowValue(), EPSILON);
    4
    assertEquals(3.0, item1.getXHighValue(), EPSILON);
    4
    assertEquals(3.0, item1.getXHighValue(), EPSILON);
    5
    assertEquals(4.0, item1.getYHighValue(), EPSILON);
    Differences
    Expression1Expression2Difference
    3.04.0LITERAL_VALUE_MISMATCH
    getXHighValuegetYHighValueMETHOD_INVOCATION_NAME_MISMATCH
    org.jfree.data.xy.XIntervalDataItemorg.jfree.data.xy.YIntervalDataItemSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression item1.getXHighValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression item1.getYHighValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression item1 cannot be unified with expression item1 , because common superclass org.jfree.data.ComparableObjectItem does not declare member(s) public double getXHighValue() , public double getYHighValue()
    5
    assertEquals(4.0, item1.getYHighValue(), EPSILON);
    5
    assertEquals(4.0, item1.getYValue(), EPSILON);
    5
    assertEquals(4.0, item1.getYValue(), EPSILON);
    3
    assertEquals(2.0, item1.getYValue(), EPSILON);
    Differences
    Expression1Expression2Difference
    4.02.0LITERAL_VALUE_MISMATCH
    org.jfree.data.xy.XIntervalDataItemorg.jfree.data.xy.YIntervalDataItemSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression item1 cannot be unified with expression item1 , because common superclass org.jfree.data.ComparableObjectItem does not declare member(s) public double getYValue()
    3
    assertEquals(2.0, item1.getYValue(), EPSILON);
    Precondition Violations (8)
    Row Violation
    1Expression item1 cannot be unified with expression item1 , because common superclass org.jfree.data.ComparableObjectItem does not declare member(s) public java.lang.Number getX() , public java.lang.Double getX()
    2Expression item1.getXLowValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression item1.getYLowValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression item1 cannot be unified with expression item1 , because common superclass org.jfree.data.ComparableObjectItem does not declare member(s) public double getXLowValue() , public double getYLowValue()
    5Expression item1.getXHighValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression item1.getYHighValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression item1 cannot be unified with expression item1 , because common superclass org.jfree.data.ComparableObjectItem does not declare member(s) public double getXHighValue() , public double getYHighValue()
    8Expression item1 cannot be unified with expression item1 , because common superclass org.jfree.data.ComparableObjectItem does not declare member(s) public double getYValue()