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));
MeanAndStandardDeviation m1 = new MeanAndStandardDeviation(1.2, 3.4); MeanAndStandardDeviation m2 = new MeanAndStandardDeviation(1.2, 3.4); assertTrue(m1.equals(m2)); assertTrue(m2.equals(m1)); m1 = new MeanAndStandardDeviation(1.0, 3.4); assertFalse(m1.equals(m2)); m2 = new MeanAndStandardDeviation(1.0, 3.4); assertTrue(m1.equals(m2)); m1 = new MeanAndStandardDeviation(1.0, 3.0); assertFalse(m1.equals(m2)); m2 = new MeanAndStandardDeviation(1.0, 3.0); assertTrue(m1.equals(m2));
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/statistics/junit/MeanAndStandardDeviationTests.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);
1
MeanAndStandardDeviation m1 = new MeanAndStandardDeviation(1.2, 3.4);
2
        EmptyBlock b2 = new EmptyBlock(1.0, 2.0);
2
        MeanAndStandardDeviation m2 = new MeanAndStandardDeviation(1.2, 3.4);
3
        assertTrue(b1.equals(b2));
3
        assertTrue(m1.equals(m2));
4
        assertTrue(b2.equals(b2));
4
        assertTrue(m2.equals(m1));
5
        
6
        b1 = new EmptyBlock(1.1, 2.0);
5
        m1 = new MeanAndStandardDeviation(1.0, 3.4);
7
        assertFalse(b1.equals(b2));
6
        assertFalse(m1.equals(m2));
8
        b2 = new EmptyBlock(1.1, 2.0);
7
        m2 = new MeanAndStandardDeviation(1.0, 3.4);
9
        assertTrue(b1.equals(b2));
8
        assertTrue(m1.equals(m2));
10
        b1 = new EmptyBlock(1.1, 2.2);
9
        m1 = new MeanAndStandardDeviation(1.0, 3.0);
11
        assertFalse(b1.equals(b2));
10
        assertFalse(m1.equals(m2));
12
        b2 = new EmptyBlock(1.1, 2.2);
11
        m2 = new MeanAndStandardDeviation(1.0, 3.0);
13
        assertTrue(b1.equals(b2));
12
        assertTrue(m1.equals(m2));
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
    MeanAndStandardDeviation m1 = new MeanAndStandardDeviation(1.2, 3.4);
    Preondition Violations
    Unmatched statement MeanAndStandardDeviation m1=new MeanAndStandardDeviation(1.2,3.4); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    1
    MeanAndStandardDeviation m1 = new MeanAndStandardDeviation(1.2, 3.4);
    1
    EmptyBlock b1 = new EmptyBlock(1.0, 2.0);
                                                                                      
                                                                                                                                              
    2
    MeanAndStandardDeviation m2 = new MeanAndStandardDeviation(1.2, 3.4);
    Preondition Violations
    Unmatched statement MeanAndStandardDeviation m2=new MeanAndStandardDeviation(1.2,3.4); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2
    MeanAndStandardDeviation m2 = new MeanAndStandardDeviation(1.2, 3.4);
    2
    EmptyBlock b2 = new EmptyBlock(1.0, 2.0);
                                                                                      
    3
    assertTrue(b1.equals(b2));
    3
    assertTrue(b1.equals(b2));
    3
    assertTrue(m1.equals(m2));
    Differences
    Expression1Expression2Difference
    b2m2VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.statistics.MeanAndStandardDeviationVARIABLE_TYPE_MISMATCH
    b1m1VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.statistics.MeanAndStandardDeviationVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.statistics.MeanAndStandardDeviation of variable m2
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.statistics.MeanAndStandardDeviation extend a common superclass
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression m1 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.statistics.MeanAndStandardDeviation of variable m1
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.statistics.MeanAndStandardDeviation extend a common superclass
    3
    assertTrue(m1.equals(m2));
    4
    assertTrue(b2.equals(b2));
    4
    assertTrue(b2.equals(b2));
    4
    assertTrue(m2.equals(m1));
    Differences
    Expression1Expression2Difference
    b2m1VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.statistics.MeanAndStandardDeviationVARIABLE_TYPE_MISMATCH
    b2m2VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.statistics.MeanAndStandardDeviationVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression m1 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.statistics.MeanAndStandardDeviation of variable m1
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.statistics.MeanAndStandardDeviation extend a common superclass
    Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.statistics.MeanAndStandardDeviation of variable m2
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.statistics.MeanAndStandardDeviation extend a common superclass
    4
    assertTrue(m2.equals(m1));
                                                                                            
    5
    m1 = new MeanAndStandardDeviation(1.0, 3.4);
    Preondition Violations
    Unmatched statement m1=new MeanAndStandardDeviation(1.0,3.4); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5
    m1 = new MeanAndStandardDeviation(1.0, 3.4);
    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(m1.equals(m2));
    Differences
    Expression1Expression2Difference
    b2m2VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.statistics.MeanAndStandardDeviationVARIABLE_TYPE_MISMATCH
    b1m1VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.statistics.MeanAndStandardDeviationVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.statistics.MeanAndStandardDeviation of variable m2
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.statistics.MeanAndStandardDeviation extend a common superclass
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression m1 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.statistics.MeanAndStandardDeviation of variable m1
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.statistics.MeanAndStandardDeviation extend a common superclass
    6
    assertFalse(m1.equals(m2));
                                                                                            
    7
    m2 = new MeanAndStandardDeviation(1.0, 3.4);
    Preondition Violations
    Unmatched statement m2=new MeanAndStandardDeviation(1.0,3.4); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    7
    m2 = new MeanAndStandardDeviation(1.0, 3.4);
    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(m1.equals(m2));
    Differences
    Expression1Expression2Difference
    b2m2VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.statistics.MeanAndStandardDeviationVARIABLE_TYPE_MISMATCH
    b1m1VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.statistics.MeanAndStandardDeviationVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.statistics.MeanAndStandardDeviation of variable m2
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.statistics.MeanAndStandardDeviation extend a common superclass
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression m1 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.statistics.MeanAndStandardDeviation of variable m1
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.statistics.MeanAndStandardDeviation extend a common superclass
    8
    assertTrue(m1.equals(m2));
                                                                                            
    9
    m1 = new MeanAndStandardDeviation(1.0, 3.0);
    Preondition Violations
    Unmatched statement m1=new MeanAndStandardDeviation(1.0,3.0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    9
    m1 = new MeanAndStandardDeviation(1.0, 3.0);
    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(m1.equals(m2));
    Differences
    Expression1Expression2Difference
    b2m2VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.statistics.MeanAndStandardDeviationVARIABLE_TYPE_MISMATCH
    b1m1VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.statistics.MeanAndStandardDeviationVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.statistics.MeanAndStandardDeviation of variable m2
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.statistics.MeanAndStandardDeviation extend a common superclass
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression m1 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.statistics.MeanAndStandardDeviation of variable m1
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.statistics.MeanAndStandardDeviation extend a common superclass
    10
    assertFalse(m1.equals(m2));
                                                                                              
    11
    m2 = new MeanAndStandardDeviation(1.0, 3.0);
    Preondition Violations
    Unmatched statement m2=new MeanAndStandardDeviation(1.0,3.0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    11
    m2 = new MeanAndStandardDeviation(1.0, 3.0);
    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(m1.equals(m2));
    Differences
    Expression1Expression2Difference
    b2m2VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.statistics.MeanAndStandardDeviationVARIABLE_TYPE_MISMATCH
    b1m1VARIABLE_NAME_MISMATCH
    org.jfree.chart.block.EmptyBlockorg.jfree.data.statistics.MeanAndStandardDeviationVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.statistics.MeanAndStandardDeviation of variable m2
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.statistics.MeanAndStandardDeviation extend a common superclass
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression m1 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.statistics.MeanAndStandardDeviation of variable m1
    • Make classes org.jfree.chart.block.EmptyBlock and org.jfree.data.statistics.MeanAndStandardDeviation extend a common superclass
    12
    assertTrue(m1.equals(m2));
    Precondition Violations (34)
    Row Violation
    1Unmatched statement MeanAndStandardDeviation m1=new MeanAndStandardDeviation(1.2,3.4); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement MeanAndStandardDeviation m2=new MeanAndStandardDeviation(1.2,3.4); 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.statistics.MeanAndStandardDeviation of variable m2
    4Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression m1 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.statistics.MeanAndStandardDeviation of variable m1
    7Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression m1 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.statistics.MeanAndStandardDeviation of variable m1
    10Type org.jfree.chart.block.EmptyBlock of variable b2 does not match with type org.jfree.data.statistics.MeanAndStandardDeviation of variable m2
    11Unmatched statement m1=new MeanAndStandardDeviation(1.0,3.4); 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.statistics.MeanAndStandardDeviation of variable m2
    14Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression m1 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.statistics.MeanAndStandardDeviation of variable m1
    17Unmatched statement m2=new MeanAndStandardDeviation(1.0,3.4); 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.statistics.MeanAndStandardDeviation of variable m2
    20Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    21Expression m1 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.statistics.MeanAndStandardDeviation of variable m1
    23Unmatched statement m1=new MeanAndStandardDeviation(1.0,3.0); 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.statistics.MeanAndStandardDeviation of variable m2
    26Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    27Expression m1 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.statistics.MeanAndStandardDeviation of variable m1
    29Unmatched statement m2=new MeanAndStandardDeviation(1.0,3.0); 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.statistics.MeanAndStandardDeviation of variable m2
    32Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    33Expression m1 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.statistics.MeanAndStandardDeviation of variable m1