YInterval i1 = new YInterval(1.0, 0.5, 1.5); YInterval i2 = new YInterval(1.0, 0.5, 1.5); assertEquals(i1, i2); i1 = new YInterval(1.1, 0.5, 1.5); assertFalse(i1.equals(i2)); i2 = new YInterval(1.1, 0.5, 1.5); assertTrue(i1.equals(i2)); i1 = new YInterval(1.1, 0.55, 1.5); assertFalse(i1.equals(i2)); i2 = new YInterval(1.1, 0.55, 1.5); assertTrue(i1.equals(i2)); i1 = new YInterval(1.1, 0.55, 1.55); assertFalse(i1.equals(i2)); i2 = new YInterval(1.1, 0.55, 1.55); assertTrue(i1.equals(i2));
YWithXInterval i1 = new YWithXInterval(1.0, 0.5, 1.5); YWithXInterval i2 = new YWithXInterval(1.0, 0.5, 1.5); assertEquals(i1, i2); i1 = new YWithXInterval(1.1, 0.5, 1.5); assertFalse(i1.equals(i2)); i2 = new YWithXInterval(1.1, 0.5, 1.5); assertTrue(i1.equals(i2)); i1 = new YWithXInterval(1.1, 0.55, 1.5); assertFalse(i1.equals(i2)); i2 = new YWithXInterval(1.1, 0.55, 1.5); assertTrue(i1.equals(i2)); i1 = new YWithXInterval(1.1, 0.55, 1.55); assertFalse(i1.equals(i2)); i2 = new YWithXInterval(1.1, 0.55, 1.55); assertTrue(i1.equals(i2));
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/data/xy/junit/YIntervalTests.java File path: /jfreechart-1.0.10/tests/org/jfree/data/xy/junit/YWithXIntervalTests.java
Method name: void testEquals() Method name: void testEquals()
Number of AST nodes: 15 Number of AST nodes: 15
1
YInterval i1 = new YInterval(1.0, 0.5, 1.5);
1
YWithXInterval i1 = new YWithXInterval(1.0, 0.5, 1.5);
2
        YInterval i2 = new YInterval(1.0, 0.5, 1.5);
2
        YWithXInterval i2 = new YWithXInterval(1.0, 0.5, 1.5);
3
        assertEquals(i1, i2);
3
        assertEquals(i1, i2);
4
        
4
        
5
        i1 = new YInterval(1.1, 0.5, 1.5);
5
        i1 = new YWithXInterval(1.1, 0.5, 1.5);
6
        assertFalse(i1.equals(i2));
6
        assertFalse(i1.equals(i2));
7
        i2 = new YInterval(1.1, 0.5, 1.5);
7
        i2 = new YWithXInterval(1.1, 0.5, 1.5);
8
        assertTrue(i1.equals(i2));
8
        assertTrue(i1.equals(i2));
9
        i1 = new YInterval(1.1, 0.55, 1.5);
9
        i1 = new YWithXInterval(1.1, 0.55, 1.5);
10
        assertFalse(i1.equals(i2));
10
        assertFalse(i1.equals(i2));
11
        i2 = new YInterval(1.1, 0.55, 1.5);
11
        i2 = new YWithXInterval(1.1, 0.55, 1.5);
12
        assertTrue(i1.equals(i2));
12
        assertTrue(i1.equals(i2));
13
    
13
    
14
        i1 = new YInterval(1.1, 0.55, 1.55);
14
        i1 = new YWithXInterval(1.1, 0.55, 1.55);
15
        assertFalse(i1.equals(i2));
15
        assertFalse(i1.equals(i2));
16
        i2 = new YInterval(1.1, 0.55, 1.55);
16
        i2 = new YWithXInterval(1.1, 0.55, 1.55);
17
        assertTrue(i1.equals(i2));
17
        assertTrue(i1.equals(i2));
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 comparisons99
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment8
    Number of unmapped statements in the second code fragment8
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                              
    1
    YWithXInterval i1 = new YWithXInterval(1.0, 0.5, 1.5);
    Preondition Violations
    Unmatched statement YWithXInterval i1=new YWithXInterval(1.0,0.5,1.5); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    1
    YWithXInterval i1 = new YWithXInterval(1.0, 0.5, 1.5);
    1
    YInterval i1 = new YInterval(1.0, 0.5, 1.5);
    1
    YInterval i1 = new YInterval(1.0, 0.5, 1.5);
    Preondition Violations
    Unmatched statement YInterval i1=new YInterval(1.0,0.5,1.5); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                          
                                                                                                              
    2
    YWithXInterval i2 = new YWithXInterval(1.0, 0.5, 1.5);
    Preondition Violations
    Unmatched statement YWithXInterval i2=new YWithXInterval(1.0,0.5,1.5); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2
    YWithXInterval i2 = new YWithXInterval(1.0, 0.5, 1.5);
    2
    YInterval i2 = new YInterval(1.0, 0.5, 1.5);
    2
    YInterval i2 = new YInterval(1.0, 0.5, 1.5);
    Preondition Violations
    Unmatched statement YInterval i2=new YInterval(1.0,0.5,1.5); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                          
    3
    assertEquals(i1, i2);
    3
    assertEquals(i1, i2);
    3
    assertEquals(i1, i2);
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.YIntervalorg.jfree.data.xy.YWithXIntervalVARIABLE_TYPE_MISMATCH
    org.jfree.data.xy.YIntervalorg.jfree.data.xy.YWithXIntervalVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1
    • Make classes org.jfree.data.xy.YInterval and org.jfree.data.xy.YWithXInterval extend a common superclass
    Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2
    • Make classes org.jfree.data.xy.YInterval and org.jfree.data.xy.YWithXInterval extend a common superclass
    3
    assertEquals(i1, i2);
                                                                                
    4
    i1 = new YWithXInterval(1.1, 0.5, 1.5);
    Preondition Violations
    Unmatched statement i1=new YWithXInterval(1.1,0.5,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4
    i1 = new YWithXInterval(1.1, 0.5, 1.5);
    4
    i1 = new YInterval(1.1, 0.5, 1.5);
    4
    i1 = new YInterval(1.1, 0.5, 1.5);
    Preondition Violations
    Unmatched statement i1=new YInterval(1.1,0.5,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                      
    5
    assertFalse(i1.equals(i2));
    5
    assertFalse(i1.equals(i2));
    5
    assertFalse(i1.equals(i2));
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.YIntervalorg.jfree.data.xy.YWithXIntervalVARIABLE_TYPE_MISMATCH
    org.jfree.data.xy.YIntervalorg.jfree.data.xy.YWithXIntervalVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2
    • Make classes org.jfree.data.xy.YInterval and org.jfree.data.xy.YWithXInterval extend a common superclass
    Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1
    • Make classes org.jfree.data.xy.YInterval and org.jfree.data.xy.YWithXInterval extend a common superclass
    5
    assertFalse(i1.equals(i2));
                                                                                
    6
    i2 = new YWithXInterval(1.1, 0.5, 1.5);
    Preondition Violations
    Unmatched statement i2=new YWithXInterval(1.1,0.5,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6
    i2 = new YWithXInterval(1.1, 0.5, 1.5);
    6
    i2 = new YInterval(1.1, 0.5, 1.5);
    6
    i2 = new YInterval(1.1, 0.5, 1.5);
    Preondition Violations
    Unmatched statement i2=new YInterval(1.1,0.5,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                      
    7
    assertTrue(i1.equals(i2));
    7
    assertTrue(i1.equals(i2));
    7
    assertTrue(i1.equals(i2));
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.YIntervalorg.jfree.data.xy.YWithXIntervalVARIABLE_TYPE_MISMATCH
    org.jfree.data.xy.YIntervalorg.jfree.data.xy.YWithXIntervalVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2
    • Make classes org.jfree.data.xy.YInterval and org.jfree.data.xy.YWithXInterval extend a common superclass
    Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1
    • Make classes org.jfree.data.xy.YInterval and org.jfree.data.xy.YWithXInterval extend a common superclass
    7
    assertTrue(i1.equals(i2));
                                                                                  
    8
    i1 = new YWithXInterval(1.1, 0.55, 1.5);
    Preondition Violations
    Unmatched statement i1=new YWithXInterval(1.1,0.55,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8
    i1 = new YWithXInterval(1.1, 0.55, 1.5);
    8
    i1 = new YInterval(1.1, 0.55, 1.5);
    8
    i1 = new YInterval(1.1, 0.55, 1.5);
    Preondition Violations
    Unmatched statement i1=new YInterval(1.1,0.55,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                        
    9
    assertFalse(i1.equals(i2));
    9
    assertFalse(i1.equals(i2));
    9
    assertFalse(i1.equals(i2));
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.YIntervalorg.jfree.data.xy.YWithXIntervalVARIABLE_TYPE_MISMATCH
    org.jfree.data.xy.YIntervalorg.jfree.data.xy.YWithXIntervalVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2
    • Make classes org.jfree.data.xy.YInterval and org.jfree.data.xy.YWithXInterval extend a common superclass
    Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1
    • Make classes org.jfree.data.xy.YInterval and org.jfree.data.xy.YWithXInterval extend a common superclass
    9
    assertFalse(i1.equals(i2));
                                                                                    
    10
    i2 = new YWithXInterval(1.1, 0.55, 1.5);
    Preondition Violations
    Unmatched statement i2=new YWithXInterval(1.1,0.55,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    10
    i2 = new YWithXInterval(1.1, 0.55, 1.5);
    10
    i2 = new YInterval(1.1, 0.55, 1.5);
    10
    i2 = new YInterval(1.1, 0.55, 1.5);
    Preondition Violations
    Unmatched statement i2=new YInterval(1.1,0.55,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                          
    11
    assertTrue(i1.equals(i2));
    11
    assertTrue(i1.equals(i2));
    11
    assertTrue(i1.equals(i2));
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.YIntervalorg.jfree.data.xy.YWithXIntervalVARIABLE_TYPE_MISMATCH
    org.jfree.data.xy.YIntervalorg.jfree.data.xy.YWithXIntervalVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2
    • Make classes org.jfree.data.xy.YInterval and org.jfree.data.xy.YWithXInterval extend a common superclass
    Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1
    • Make classes org.jfree.data.xy.YInterval and org.jfree.data.xy.YWithXInterval extend a common superclass
    11
    assertTrue(i1.equals(i2));
                                                                                      
    12
    i1 = new YWithXInterval(1.1, 0.55, 1.55);
    Preondition Violations
    Unmatched statement i1=new YWithXInterval(1.1,0.55,1.55); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    12
    i1 = new YWithXInterval(1.1, 0.55, 1.55);
    12
    i1 = new YInterval(1.1, 0.55, 1.55);
    12
    i1 = new YInterval(1.1, 0.55, 1.55);
    Preondition Violations
    Unmatched statement i1=new YInterval(1.1,0.55,1.55); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                            
    13
    assertFalse(i1.equals(i2));
    13
    assertFalse(i1.equals(i2));
    13
    assertFalse(i1.equals(i2));
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.YIntervalorg.jfree.data.xy.YWithXIntervalVARIABLE_TYPE_MISMATCH
    org.jfree.data.xy.YIntervalorg.jfree.data.xy.YWithXIntervalVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2
    • Make classes org.jfree.data.xy.YInterval and org.jfree.data.xy.YWithXInterval extend a common superclass
    Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1
    • Make classes org.jfree.data.xy.YInterval and org.jfree.data.xy.YWithXInterval extend a common superclass
    13
    assertFalse(i1.equals(i2));
                                                                                      
    14
    i2 = new YWithXInterval(1.1, 0.55, 1.55);
    Preondition Violations
    Unmatched statement i2=new YWithXInterval(1.1,0.55,1.55); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    14
    i2 = new YWithXInterval(1.1, 0.55, 1.55);
    14
    i2 = new YInterval(1.1, 0.55, 1.55);
    14
    i2 = new YInterval(1.1, 0.55, 1.55);
    Preondition Violations
    Unmatched statement i2=new YInterval(1.1,0.55,1.55); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                            
    15
    assertTrue(i1.equals(i2));
    15
    assertTrue(i1.equals(i2));
    15
    assertTrue(i1.equals(i2));
    Differences
    Expression1Expression2Difference
    org.jfree.data.xy.YIntervalorg.jfree.data.xy.YWithXIntervalVARIABLE_TYPE_MISMATCH
    org.jfree.data.xy.YIntervalorg.jfree.data.xy.YWithXIntervalVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2
    • Make classes org.jfree.data.xy.YInterval and org.jfree.data.xy.YWithXInterval extend a common superclass
    Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1
    • Make classes org.jfree.data.xy.YInterval and org.jfree.data.xy.YWithXInterval extend a common superclass
    15
    assertTrue(i1.equals(i2));
    Precondition Violations (30)
    Row Violation
    1Unmatched statement YWithXInterval i1=new YWithXInterval(1.0,0.5,1.5); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement YInterval i1=new YInterval(1.0,0.5,1.5); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Unmatched statement YWithXInterval i2=new YWithXInterval(1.0,0.5,1.5); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched statement YInterval i2=new YInterval(1.0,0.5,1.5); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1
    6Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2
    7Unmatched statement i1=new YWithXInterval(1.1,0.5,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8Unmatched statement i1=new YInterval(1.1,0.5,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    9Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2
    10Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1
    11Unmatched statement i2=new YWithXInterval(1.1,0.5,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    12Unmatched statement i2=new YInterval(1.1,0.5,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    13Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2
    14Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1
    15Unmatched statement i1=new YWithXInterval(1.1,0.55,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    16Unmatched statement i1=new YInterval(1.1,0.55,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    17Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2
    18Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1
    19Unmatched statement i2=new YWithXInterval(1.1,0.55,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    20Unmatched statement i2=new YInterval(1.1,0.55,1.5); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    21Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2
    22Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1
    23Unmatched statement i1=new YWithXInterval(1.1,0.55,1.55); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    24Unmatched statement i1=new YInterval(1.1,0.55,1.55); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    25Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2
    26Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1
    27Unmatched statement i2=new YWithXInterval(1.1,0.55,1.55); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    28Unmatched statement i2=new YInterval(1.1,0.55,1.55); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    29Type org.jfree.data.xy.YInterval of variable i2 does not match with type org.jfree.data.xy.YWithXInterval of variable i2
    30Type org.jfree.data.xy.YInterval of variable i1 does not match with type org.jfree.data.xy.YWithXInterval of variable i1