EmptyBlock b1 = new EmptyBlock(1.0, 2.0); EmptyBlock b2 = new EmptyBlock(1.0, 2.0); assertTrue(b1.equals(b2)); assertTrue(b2.equals(b2)); b1 = new EmptyBlock(1.1, 2.0); assertFalse(b1.equals(b2)); b2 = new EmptyBlock(1.1, 2.0); assertTrue(b1.equals(b2)); b1 = new EmptyBlock(1.1, 2.2); assertFalse(b1.equals(b2)); b2 = new EmptyBlock(1.1, 2.2); assertTrue(b1.equals(b2));
XYCoordinate v1 = new XYCoordinate(1.0, 2.0); XYCoordinate v2 = new XYCoordinate(1.0, 2.0); assertTrue(v1.equals(v2)); assertTrue(v2.equals(v1)); v1 = new XYCoordinate(1.1, 2.0); assertFalse(v1.equals(v2)); v2 = new XYCoordinate(1.1, 2.0); assertTrue(v1.equals(v2)); v1 = new XYCoordinate(1.1, 2.2); assertFalse(v1.equals(v2)); v2 = new XYCoordinate(1.1, 2.2); assertTrue(v1.equals(v2));
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/chart/block/junit/EmptyBlockTests.java File path: /jfreechart-1.0.10/tests/org/jfree/data/xy/junit/XYCoordinateTests.java
Method name: void testEquals() Method name: void testEquals()
Number of AST nodes: 12 Number of AST nodes: 12
1
EmptyBlock b1 = new EmptyBlock(1.0, 2.0);
2
        EmptyBlock b2 = new EmptyBlock
1
XYCoordinate v1 = new XYCoordinate(1.0, 2.0);
3
(1.0, 2.0);
2
        XYCoordinate v2 = new XYCoordinate(1.0, 2.0);
4
        assertTrue(b1.equals(b2));
3
        assertTrue(v1.equals(v2));
5
        assertTrue(b2.equals(b2));
4
        assertTrue(v2.equals(v1));
6
        
7
        b1 = new EmptyBlock(1.1, 2.0);
5
        v1 = new XYCoordinate(1.1, 2.0);
8
        assertFalse(b1.equals(b2));
6
        assertFalse(v1.equals(v2));
9
        b2 = new EmptyBlock(1.1, 2.0);
7
        v2 = new XYCoordinate(1.1, 2.0);
10
        assertTrue(b1.equals(b2));
8
        assertTrue(v1.equals(v2));
9
        
11
        b1 = new EmptyBlock(1.1, 2.2);
10
        v1 = new XYCoordinate(1.1, 2.2);
12
        assertFalse(b1.equals(b2));
11
        assertFalse(v1.equals(v2));
13
        b2 = new EmptyBlock(1.1, 2.2);
12
        v2 = new XYCoordinate(1.1, 2.2);
14
        assertTrue(b1.equals(b2));
13
        assertTrue(v1.equals(v2));
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 comparisons62
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment6
    Number of unmapped statements in the second code fragment6
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                              
    1
    XYCoordinate v1 = new XYCoordinate(1.0, 2.0);
    Preondition Violations
    Unmatched statement XYCoordinate v1=new XYCoordinate(1.0,2.0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    1
    XYCoordinate v1 = new XYCoordinate(1.0, 2.0);
    1
    EmptyBlock b1 = new EmptyBlock(1.0, 2.0);
                                                                                      
                                                                                              
    2
    XYCoordinate v2 = new XYCoordinate(1.0, 2.0);
    Preondition Violations
    Unmatched statement XYCoordinate v2=new XYCoordinate(1.0,2.0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2
    XYCoordinate v2 = new XYCoordinate(1.0, 2.0);
    2
    EmptyBlock b2 = new EmptyBlock(1.0, 2.0);
                                                                                      
    3
    assertTrue(b1.equals(b2));
    3
    assertTrue(b1.equals(b2));
    3
    assertTrue(v1.equals(v2));
    Differences
    Expression1Expression2Difference
    b2v2VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.xy.XYCoordinateVARIABLE_TYPE_MISMATCH
    b1v1VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.xy.XYCoordinateVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.XYCoordinate of variable v2
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.xy.XYCoordinate extend a common superclass
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.XYCoordinate of variable v1
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.xy.XYCoordinate extend a common superclass
    3
    assertTrue(v1.equals(v2));
    4
    assertTrue(b2.equals(b2));
    4
    assertTrue(b2.equals(b2));
    4
    assertTrue(v2.equals(v1));
    Differences
    Expression1Expression2Difference
    b2v1VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.xy.XYCoordinateVARIABLE_TYPE_MISMATCH
    b2v2VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.xy.XYCoordinateVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.XYCoordinate of variable v1
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.xy.XYCoordinate extend a common superclass
    Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.XYCoordinate of variable v2
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.xy.XYCoordinate extend a common superclass
    4
    assertTrue(v2.equals(v1));
                                                                    
    5
    v1 = new XYCoordinate(1.1, 2.0);
    Preondition Violations
    Unmatched statement v1=new XYCoordinate(1.1,2.0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5
    v1 = new XYCoordinate(1.1, 2.0);
    5
    b1 = new EmptyBlock(1.1, 2.0);
    5
    b1 = new EmptyBlock(1.1, 2.0);
    Preondition Violations
    Unmatched statement b1=new EmptyBlock(1.1,2.0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                
    6
    assertFalse(b1.equals(b2));
    6
    assertFalse(b1.equals(b2));
    6
    assertFalse(v1.equals(v2));
    Differences
    Expression1Expression2Difference
    b2v2VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.xy.XYCoordinateVARIABLE_TYPE_MISMATCH
    b1v1VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.xy.XYCoordinateVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.XYCoordinate of variable v2
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.xy.XYCoordinate extend a common superclass
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.XYCoordinate of variable v1
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.xy.XYCoordinate extend a common superclass
    6
    assertFalse(v1.equals(v2));
                                                                    
    7
    v2 = new XYCoordinate(1.1, 2.0);
    Preondition Violations
    Unmatched statement v2=new XYCoordinate(1.1,2.0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    7
    v2 = new XYCoordinate(1.1, 2.0);
    7
    b2 = new EmptyBlock(1.1, 2.0);
    7
    b2 = new EmptyBlock(1.1, 2.0);
    Preondition Violations
    Unmatched statement b2=new EmptyBlock(1.1,2.0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                
    8
    assertTrue(b1.equals(b2));
    8
    assertTrue(b1.equals(b2));
    8
    assertTrue(v1.equals(v2));
    Differences
    Expression1Expression2Difference
    b2v2VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.xy.XYCoordinateVARIABLE_TYPE_MISMATCH
    b1v1VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.xy.XYCoordinateVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.XYCoordinate of variable v2
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.xy.XYCoordinate extend a common superclass
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.XYCoordinate of variable v1
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.xy.XYCoordinate extend a common superclass
    8
    assertTrue(v1.equals(v2));
                                                                    
    9
    v1 = new XYCoordinate(1.1, 2.2);
    Preondition Violations
    Unmatched statement v1=new XYCoordinate(1.1,2.2); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    9
    v1 = new XYCoordinate(1.1, 2.2);
    9
    b1 = new EmptyBlock(1.1, 2.2);
    9
    b1 = new EmptyBlock(1.1, 2.2);
    Preondition Violations
    Unmatched statement b1=new EmptyBlock(1.1,2.2); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                
    10
    assertFalse(b1.equals(b2));
    10
    assertFalse(b1.equals(b2));
    10
    assertFalse(v1.equals(v2));
    Differences
    Expression1Expression2Difference
    b2v2VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.xy.XYCoordinateVARIABLE_TYPE_MISMATCH
    b1v1VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.xy.XYCoordinateVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.XYCoordinate of variable v2
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.xy.XYCoordinate extend a common superclass
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.XYCoordinate of variable v1
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.xy.XYCoordinate extend a common superclass
    10
    assertFalse(v1.equals(v2));
                                                                      
    11
    v2 = new XYCoordinate(1.1, 2.2);
    Preondition Violations
    Unmatched statement v2=new XYCoordinate(1.1,2.2); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    11
    v2 = new XYCoordinate(1.1, 2.2);
    11
    b2 = new EmptyBlock(1.1, 2.2);
    11
    b2 = new EmptyBlock(1.1, 2.2);
    Preondition Violations
    Unmatched statement b2=new EmptyBlock(1.1,2.2); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                  
    12
    assertTrue(b1.equals(b2));
    12
    assertTrue(b1.equals(b2));
    12
    assertTrue(v1.equals(v2));
    Differences
    Expression1Expression2Difference
    b2v2VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.xy.XYCoordinateVARIABLE_TYPE_MISMATCH
    b1v1VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.xy.XYCoordinateVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.XYCoordinate of variable v2
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.xy.XYCoordinate extend a common superclass
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.XYCoordinate of variable v1
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.xy.XYCoordinate extend a common superclass
    12
    assertTrue(v1.equals(v2));
    Precondition Violations (34)
    Row Violation
    1Unmatched statement XYCoordinate v1=new XYCoordinate(1.0,2.0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement XYCoordinate v2=new XYCoordinate(1.0,2.0); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.XYCoordinate of variable v2
    4Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.XYCoordinate of variable v1
    7Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.XYCoordinate of variable v1
    10Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.XYCoordinate of variable v2
    11Unmatched statement v1=new XYCoordinate(1.1,2.0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    12Unmatched statement b1=new EmptyBlock(1.1,2.0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    13Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.XYCoordinate of variable v2
    14Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.XYCoordinate of variable v1
    17Unmatched statement v2=new XYCoordinate(1.1,2.0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    18Unmatched statement b2=new EmptyBlock(1.1,2.0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    19Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.XYCoordinate of variable v2
    20Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    21Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    22Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.XYCoordinate of variable v1
    23Unmatched statement v1=new XYCoordinate(1.1,2.2); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    24Unmatched statement b1=new EmptyBlock(1.1,2.2); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    25Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.XYCoordinate of variable v2
    26Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    27Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    28Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.XYCoordinate of variable v1
    29Unmatched statement v2=new XYCoordinate(1.1,2.2); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    30Unmatched statement b2=new EmptyBlock(1.1,2.2); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    31Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.xy.XYCoordinate of variable v2
    32Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    33Expression v1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    34Type org.jfree.chart.block.EmptyBlock of variable b1 does not match with type org.jfree.data.xy.XYCoordinate of variable v1