DialBackground b1 = new DialBackground(); DialBackground b2 = null; try { b2 = (DialBackground) b1.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } assertTrue(b1 != b2); assertTrue(b1.getClass() == b2.getClass()); assertTrue(b1.equals(b2)); // test a customised instance b1 = new DialBackground(); b1.setPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.green)); b1.setGradientPaintTransformer(new StandardGradientPaintTransformer( GradientPaintTransformType.CENTER_VERTICAL)); b2 = null; try { b2 = (DialBackground) b1.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } assertTrue(b1 != b2); assertTrue(b1.getClass() == b2.getClass()); assertTrue(b1.equals(b2)); // check that the listener lists are independent MyDialLayerChangeListener l1 = new MyDialLayerChangeListener(); b1.addChangeListener(l1); assertTrue(b1.hasListener(l1)); assertFalse(b2.hasListener(l1));
DefaultMultiValueCategoryDataset d1 = new DefaultMultiValueCategoryDataset(); DefaultMultiValueCategoryDataset d2 = null; try { d2 = (DefaultMultiValueCategoryDataset) d1.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } assertTrue(d1 != d2); assertTrue(d1.getClass() == d2.getClass()); assertTrue(d1.equals(d2)); // try a dataset with some content... List values = new ArrayList(); values.add(new Integer(99)); d1.add(values, "R1", "C1"); try { d2 = (DefaultMultiValueCategoryDataset) d1.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } assertTrue(d1 != d2); assertTrue(d1.getClass() == d2.getClass()); assertTrue(d1.equals(d2)); // check that the clone doesn't share the same underlying arrays. List values2 = new ArrayList(); values2.add(new Integer(111)); d1.add(values2, "R2", "C2"); assertFalse(d1.equals(d2)); d2.add(values2, "R2", "C2"); assertTrue(d1.equals(d2));
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/chart/plot/dial/junit/DialBackgroundTests.java File path: /jfreechart-1.0.10/tests/org/jfree/data/statistics/junit/DefaultMultiValueCategoryDatasetTests.java
Method name: void testCloning() Method name: void testCloning()
Number of AST nodes: 20 Number of AST nodes: 21
1
DialBackground b1 = new DialBackground();
1
D
2
        DialBackground b
2
efaultMultiValueCategoryDataset d1 
3
                = new DefaultMultiValueCategoryDataset();
3
2 = null;
4
        DefaultMultiValueCategoryDataset d2 = null;
4
        try {
5
        try {
5
            b2 = (DialBackground) b1.clone();
6
            d2 = (DefaultMultiValueCategoryDataset) d1.clone();
6
        }
7
        }
7
        catch (CloneNotSupportedException e) {
8
        catch (CloneNotSupportedException e) {
8
            e.printStackTrace();
9
            e.printStackTrace();
9
        }
10
        }
10
        assertTrue(b1 != b2);
11
        assertTrue(d1 != d2);
11
        assertTrue(b1.getClass() == b2.getClass());
12
        assertTrue(d1.getClass() == d2.getClass());
12
        assertTrue(b1.equals(b2));
13
        assertTrue(d1.equals(d2));
13
        
14
        
14
        // test a customised instance
15
        // t
15
        b1 = new DialBackground();
16
        b1.setPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f,
17
                Color.green));
18
        b1.setGradientPaintTransformer(new StandardGradientPaintTransformer(
19
                GradientPaintTransformType.CENTER_VERTICAL));
20
        b2 = null
16
ry a dataset with some content...
17
        List values = new ArrayList();
18
        values.add(new Integer(99));
21
;
19
        d1.add(values, "R1", "C1");
22
        try {
20
        try {
23
            b2 = (DialBackground) b1.clone();
21
            d2 = (DefaultMultiValueCategoryDataset) d1.clone();
24
        }
22
        }
25
        catch (CloneNotSupportedException e) {
23
        catch (CloneNotSupportedException e) {
26
            e.printStackTrace();
24
            e.printStackTrace();
27
        }
25
        }
28
        assertTrue(b1 != b2);
26
        assertTrue(d1 != d2);
29
        assertTrue(b1.getClass() == b2.getClass());
27
        assertTrue(d1.getClass() == d2.getClass());
30
        assertTrue(b1.equals(b2));
28
        assertTrue(d1.equals(d2));
31
        
29
        
32
        // check that the listener lists are independent
30
        // check that the 
33
        MyDialLayerChangeListener l1 = new MyDialLayerChangeLis
31
clone doesn't share the same underlying arrays.
32
        List values2 = new ArrayList();
34
tener();
33
        values2.add(new Integer(111));
35
        b1.addChangeListener(l1);
34
        d1.add(values2, "R2", "C2");
36
        assertTrue(b1.hasListener(l1));
35
        assertFalse(d1.equals(d2));
37
        assertFalse(b2.hasListener(l1
36
        d2.add(values2, "R2", "C2");
38
));
37
        assertTrue(d1.equals(d2));
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.3
Clones locationClones are in different classes having the same super class
Number of node comparisons247
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements15
    Number of unmapped statements in the first code fragment5
    Number of unmapped statements in the second code fragment6
    Time elapsed for statement mapping (ms)90.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    DialBackground b1 = new DialBackground();
    1
    DialBackground b1 = new DialBackground();
    2
    DefaultMultiValueCategoryDataset d2 = null;
    Differences
    Expression1Expression2Difference
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    b1d2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    new DialBackground()nullTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression new DialBackground() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    DefaultMultiValueCategoryDataset d2 = null;
    2
    DialBackground b2 = null;
    2
    DialBackground b2 = null;
    1
    DefaultMultiValueCategoryDataset d1 = new DefaultMultiValueCategoryDataset();
    Differences
    Expression1Expression2Difference
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    b2d1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    nullnew DefaultMultiValueCategoryDataset()TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression new DefaultMultiValueCategoryDataset() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    1
    DefaultMultiValueCategoryDataset d1 = new DefaultMultiValueCategoryDataset();
    3
    try
    3
    try
    4
    b2 = (DialBackground)b1.clone();
    4
    b2 = (DialBackground)b1.clone();
    4
    d2 = (DefaultMultiValueCategoryDataset)d1.clone();
    Differences
    Expression1Expression2Difference
    b2d2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    b1d1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (DialBackground)b1.clone() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (DefaultMultiValueCategoryDataset)d1.clone() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    d2 = (DefaultMultiValueCategoryDataset)d1.clone();
    5
    assertTrue(b1 != b2);
    5
    assertTrue(b1 != b2);
    5
    assertTrue(d1 != d2);
    Differences
    Expression1Expression2Difference
    b1d1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    b2d2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5
    assertTrue(d1 != d2);
    6
    assertTrue(b1.getClass() == b2.getClass());
    6
    assertTrue(b1.getClass() == b2.getClass());
    6
    assertTrue(d1.getClass() == d2.getClass());
    Differences
    Expression1Expression2Difference
    b1d1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    b2d2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    assertTrue(d1.getClass() == d2.getClass());
    7
    assertTrue(b1.equals(b2));
    7
    assertTrue(b1.equals(b2));
    7
    assertTrue(d1.equals(d2));
    Differences
    Expression1Expression2Difference
    b2d2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    b1d1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b2 cannot be unified with expression d2 , because common superclass type org.jfree.util.PublicCloneable cannot be passed as an argument to public boolean equals(java.lang.Object)
    Expression b2 cannot be unified with expression d2 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b1 cannot be unified with expression d1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    7
    assertTrue(d1.equals(d2));
                                                                  
    8
    List values = new ArrayList();
    Preondition Violations
    Unmatched statement List values=new ArrayList(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    8
    List values = new ArrayList();
    8
    b1 = new DialBackground();
    8
    b1 = new DialBackground();
    Preondition Violations
    Unmatched statement b1=new DialBackground(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                          
                                                                  
    9
    values.add(new Integer(99));
    Preondition Violations
    Unmatched statement values.add(new Integer(99)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    9
    values.add(new Integer(99));
                                                                      
    16
    List values2 = new ArrayList();
    Preondition Violations
    Unmatched statement List values2=new ArrayList(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    16
    List values2 = new ArrayList();
                                                                        
    17
    values2.add(new Integer(111));
    Preondition Violations
    Unmatched statement values2.add(new Integer(111)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    17
    values2.add(new Integer(111));
                                                                  
    19
    assertFalse(d1.equals(d2));
    Preondition Violations
    Unmatched statement assertFalse(d1.equals(d2)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    19
    assertFalse(d1.equals(d2));
    9
    b1.setPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.green));
    9
    b1.setPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.green));
    20
    d2.add(values2, "R2", "C2");
    Differences
    Expression1Expression2Difference
    setPaintaddMETHOD_INVOCATION_NAME_MISMATCH
    b1d2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    b1.setPaint(new GradientPaint(1.0f,2.0f,Color.red,3.0f,4.0f,Color.green))d2.add(values2,"R2","C2")ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression b1.setPaint(new GradientPaint(1.0f,2.0f,Color.red,3.0f,4.0f,Color.green)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d2.add(values2,"R2","C2") cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b1.setPaint(new GradientPaint(1.0f,2.0f,Color.red,3.0f,4.0f,Color.green)) is a void method call, and thus it cannot be parameterized
    Expression d2.add(values2,"R2","C2") is a void method call, and thus it cannot be parameterized
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b1 cannot be unified with expression d2 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public void setPaint(java.awt.Paint) , public void add(List#RAW, Comparable#RAW, Comparable#RAW)
    Expression b1.setPaint(new GradientPaint(1.0f,2.0f,Color.red,3.0f,4.0f,Color.green)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d2.add(values2,"R2","C2") cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b1.setPaint(new GradientPaint(1.0f,2.0f,Color.red,3.0f,4.0f,Color.green)) is a void method call, and thus it cannot be parameterized
    Expression d2.add(values2,"R2","C2") is a void method call, and thus it cannot be parameterized
    20
    d2.add(values2, "R2", "C2");
    10
    b1.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_VERTICAL));
    10
    b1.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_VERTICAL));
    10
    d1.add(values, "R1", "C1");
    Differences
    Expression1Expression2Difference
    setGradientPaintTransformeraddMETHOD_INVOCATION_NAME_MISMATCH
    b1d1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    b1.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_VERTICAL))d1.add(values,"R1","C1")ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression b1.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_VERTICAL)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d1.add(values,"R1","C1") cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b1.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_VERTICAL)) is a void method call, and thus it cannot be parameterized
    Expression d1.add(values,"R1","C1") is a void method call, and thus it cannot be parameterized
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b1 cannot be unified with expression d1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public void setGradientPaintTransformer(org.jfree.ui.GradientPaintTransformer) , public void add(List#RAW, Comparable#RAW, Comparable#RAW)
    Expression b1.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_VERTICAL)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d1.add(values,"R1","C1") cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b1.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_VERTICAL)) is a void method call, and thus it cannot be parameterized
    Expression d1.add(values,"R1","C1") is a void method call, and thus it cannot be parameterized
    10
    d1.add(values, "R1", "C1");
    11
    b2 = null;
    11
    b2 = null;
    Preondition Violations
    Unmatched statement b2=null; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                            
    12
    try
    11
    try
    13
    b2 = (DialBackground)b1.clone();
    13
    b2 = (DialBackground)b1.clone();
    12
    d2 = (DefaultMultiValueCategoryDataset)d1.clone();
    Differences
    Expression1Expression2Difference
    b2d2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    b1d1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression (DialBackground)b1.clone() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (DefaultMultiValueCategoryDataset)d1.clone() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12
    d2 = (DefaultMultiValueCategoryDataset)d1.clone();
    14
    assertTrue(b1 != b2);
    14
    assertTrue(b1 != b2);
    13
    assertTrue(d1 != d2);
    Differences
    Expression1Expression2Difference
    b1d1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    b2d2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13
    assertTrue(d1 != d2);
    15
    assertTrue(b1.getClass() == b2.getClass());
    15
    assertTrue(b1.getClass() == b2.getClass());
    14
    assertTrue(d1.getClass() == d2.getClass());
    Differences
    Expression1Expression2Difference
    b1d1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    b2d2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14
    assertTrue(d1.getClass() == d2.getClass());
    16
    assertTrue(b1.equals(b2));
    16
    assertTrue(b1.equals(b2));
    15
    assertTrue(d1.equals(d2));
    Differences
    Expression1Expression2Difference
    b2d2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    b1d1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b2 cannot be unified with expression d2 , because common superclass type org.jfree.util.PublicCloneable cannot be passed as an argument to public boolean equals(java.lang.Object)
    Expression b2 cannot be unified with expression d2 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b1 cannot be unified with expression d1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    15
    assertTrue(d1.equals(d2));
    17
    MyDialLayerChangeListener l1 = new MyDialLayerChangeListener();
                                                                                                                                      
    18
    b1.addChangeListener(l1);
    18
    b1.addChangeListener(l1);
    18
    d1.add(values2, "R2", "C2");
    Differences
    Expression1Expression2Difference
    addChangeListeneraddMETHOD_INVOCATION_NAME_MISMATCH
    b1d1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.dial.DialBackgroundorg.jfree.data.statistics.DefaultMultiValueCategoryDatasetSUBCLASS_TYPE_MISMATCH
    b1.addChangeListener(l1)d1.add(values2,"R2","C2")ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression b1.addChangeListener(l1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d1.add(values2,"R2","C2") cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b1.addChangeListener(l1) is a void method call, and thus it cannot be parameterized
    Expression d1.add(values2,"R2","C2") is a void method call, and thus it cannot be parameterized
    Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b1 cannot be unified with expression d1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public void addChangeListener(org.jfree.chart.plot.dial.DialLayerChangeListener) , public void add(List#RAW, Comparable#RAW, Comparable#RAW)
    Expression b1.addChangeListener(l1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression d1.add(values2,"R2","C2") cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression b1.addChangeListener(l1) is a void method call, and thus it cannot be parameterized
    Expression d1.add(values2,"R2","C2") is a void method call, and thus it cannot be parameterized
    18
    d1.add(values2, "R2", "C2");
    19
    assertTrue(b1.hasListener(l1));
    19
    assertTrue(b1.hasListener(l1));
    Preondition Violations
    Unmatched statement assertTrue(b1.hasListener(l1)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                          
    20
    assertFalse(b2.hasListener(l1));
    20
    assertFalse(b2.hasListener(l1));
    Preondition Violations
    Unmatched statement assertFalse(b2.hasListener(l1)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                            
                                                                
    21
    assertTrue(d1.equals(d2));
    Preondition Violations
    Unmatched statement assertTrue(d1.equals(d2)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    21
    assertTrue(d1.equals(d2));
    Precondition Violations (86)
    Row Violation
    1Expression new DialBackground() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression new DefaultMultiValueCategoryDataset() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression (DialBackground)b1.clone() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression (DefaultMultiValueCategoryDataset)d1.clone() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    18Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Expression b2 cannot be unified with expression d2 , because common superclass type org.jfree.util.PublicCloneable cannot be passed as an argument to public boolean equals(java.lang.Object)
    20Expression b2 cannot be unified with expression d2 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    21Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    22Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    23Expression b1 cannot be unified with expression d1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    24Unmatched statement List values=new ArrayList(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    25Unmatched statement b1=new DialBackground(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    26Unmatched statement values.add(new Integer(99)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    27Unmatched statement List values2=new ArrayList(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    28Unmatched statement values2.add(new Integer(111)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    29Unmatched statement assertFalse(d1.equals(d2)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    30Expression b1.setPaint(new GradientPaint(1.0f,2.0f,Color.red,3.0f,4.0f,Color.green)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    31Expression d2.add(values2,"R2","C2") cannot be parameterized, because it has dependencies to/from statements that will be extracted
    32Expression b1.setPaint(new GradientPaint(1.0f,2.0f,Color.red,3.0f,4.0f,Color.green)) is a void method call, and thus it cannot be parameterized
    33Expression d2.add(values2,"R2","C2") is a void method call, and thus it cannot be parameterized
    34Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    35Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    36Expression b1 cannot be unified with expression d2 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public void setPaint(java.awt.Paint) , public void add(List#RAW, Comparable#RAW, Comparable#RAW)
    37Expression b1.setPaint(new GradientPaint(1.0f,2.0f,Color.red,3.0f,4.0f,Color.green)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    38Expression d2.add(values2,"R2","C2") cannot be parameterized, because it has dependencies to/from statements that will be extracted
    39Expression b1.setPaint(new GradientPaint(1.0f,2.0f,Color.red,3.0f,4.0f,Color.green)) is a void method call, and thus it cannot be parameterized
    40Expression d2.add(values2,"R2","C2") is a void method call, and thus it cannot be parameterized
    41Expression b1.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_VERTICAL)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    42Expression d1.add(values,"R1","C1") cannot be parameterized, because it has dependencies to/from statements that will be extracted
    43Expression b1.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_VERTICAL)) is a void method call, and thus it cannot be parameterized
    44Expression d1.add(values,"R1","C1") is a void method call, and thus it cannot be parameterized
    45Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    46Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    47Expression b1 cannot be unified with expression d1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public void setGradientPaintTransformer(org.jfree.ui.GradientPaintTransformer) , public void add(List#RAW, Comparable#RAW, Comparable#RAW)
    48Expression b1.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_VERTICAL)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    49Expression d1.add(values,"R1","C1") cannot be parameterized, because it has dependencies to/from statements that will be extracted
    50Expression b1.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_VERTICAL)) is a void method call, and thus it cannot be parameterized
    51Expression d1.add(values,"R1","C1") is a void method call, and thus it cannot be parameterized
    52Unmatched statement b2=null; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    53Expression (DialBackground)b1.clone() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    54Expression (DefaultMultiValueCategoryDataset)d1.clone() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    55Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    56Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    57Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    58Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    59Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    60Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    61Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    62Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    63Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    64Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    65Expression b2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    66Expression d2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    67Expression b2 cannot be unified with expression d2 , because common superclass type org.jfree.util.PublicCloneable cannot be passed as an argument to public boolean equals(java.lang.Object)
    68Expression b2 cannot be unified with expression d2 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    69Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    70Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    71Expression b1 cannot be unified with expression d1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    72Expression b1.addChangeListener(l1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    73Expression d1.add(values2,"R2","C2") cannot be parameterized, because it has dependencies to/from statements that will be extracted
    74Expression b1.addChangeListener(l1) is a void method call, and thus it cannot be parameterized
    75Expression d1.add(values2,"R2","C2") is a void method call, and thus it cannot be parameterized
    76Expression b1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    77Expression d1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    78Expression b1 cannot be unified with expression d1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public void addChangeListener(org.jfree.chart.plot.dial.DialLayerChangeListener) , public void add(List#RAW, Comparable#RAW, Comparable#RAW)
    79Expression b1.addChangeListener(l1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    80Expression d1.add(values2,"R2","C2") cannot be parameterized, because it has dependencies to/from statements that will be extracted
    81Expression b1.addChangeListener(l1) is a void method call, and thus it cannot be parameterized
    82Expression d1.add(values2,"R2","C2") is a void method call, and thus it cannot be parameterized
    83Unmatched statement assertTrue(b1.hasListener(l1)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    84Unmatched statement assertFalse(b2.hasListener(l1)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    85Unmatched statement assertTrue(d1.equals(d2)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    86Clone fragment #1 returns variables b1, b2 , while Clone fragment #2 returns variables d1, d2