PiePlot3D p1 = new PiePlot3D(); PiePlot3D p2 = new PiePlot3D(); assertTrue(p1.equals(p2)); assertTrue(p2.equals(p1)); p1.setDepthFactor(1.23); assertFalse(p1.equals(p2)); p2.setDepthFactor(1.23); assertTrue(p1.equals(p2)); p1.setDarkerSides(true); assertFalse(p1.equals(p2)); p2.setDarkerSides(true); assertTrue(p1.equals(p2));
StatisticalBarRenderer r1 = new StatisticalBarRenderer(); StatisticalBarRenderer r2 = new StatisticalBarRenderer(); assertEquals(r1, r2); r1.setErrorIndicatorPaint(Color.red); assertFalse(r1.equals(r2)); r2.setErrorIndicatorPaint(Color.red); assertTrue(r2.equals(r1)); r1.setErrorIndicatorStroke(new BasicStroke(1.5f)); assertFalse(r1.equals(r2)); r2.setErrorIndicatorStroke(new BasicStroke(1.5f)); assertTrue(r2.equals(r1));
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/chart/plot/junit/PiePlot3DTests.java File path: /jfreechart-1.0.10/tests/org/jfree/chart/renderer/category/junit/StatisticalBarRendererTests.java
Method name: void testEquals() Method name: void testEquals()
Number of AST nodes: 12 Number of AST nodes: 11
1
PiePlot3D p1 = new PiePlot3D();
2
        PiePlot3D p2 = new PiePlot3D();
3
        assertTrue(p1.equals(p2)
1
StatisticalBarRenderer r1 = new StatisticalBarRenderer();
4
);
2
        StatisticalBarRenderer r2 = new StatisticalBarRenderer();
5
        assertTrue(p2.equals(p1));
3
        assert
6
        
4
Equals(r1, r2);
7
        p1.setDepthFactor(1.23);
5
        r1.setErrorIndicatorPaint(Color.red);
8
        assertFalse(p1.equals(p2));
6
        assertFalse(r1.equals(r2));
9
        p2.setDepthFactor(1.23);
7
        r2.setErrorIndicatorPaint(Color.red);
10
        assertTrue(p1.equals(p2));
8
        assertTrue(r2.equals(r1));
11
        
12
        p1.setDarkerSides(true);
9
        r1.setErrorIndicatorStroke(new BasicStroke(1.5f));
13
        assertFalse(p1.equals(p2));
10
        assertFalse(r1.equals(r2));
14
        p2.setDarkerSides(true);
11
        r2.setErrorIndicatorStroke(new BasicStroke(1.5f));
15
        assertTrue(p1.equals(p2));
12
        assertTrue(r2.equals(r1));
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 comparisons75
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment5
    Number of unmapped statements in the second code fragment4
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    PiePlot3D p1 = new PiePlot3D();
    1
    PiePlot3D p1 = new PiePlot3D();
    1
    StatisticalBarRenderer r1 = new StatisticalBarRenderer();
    Differences
    Expression1Expression2Difference
    org.jfree.chart.plot.PiePlot3Dorg.jfree.chart.renderer.category.StatisticalBarRendererSUBCLASS_TYPE_MISMATCH
    p1r1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.PiePlot3Dorg.jfree.chart.renderer.category.StatisticalBarRendererSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.plot.PiePlot3Dorg.jfree.chart.renderer.category.StatisticalBarRendererSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression new StatisticalBarRenderer() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    1
    StatisticalBarRenderer r1 = new StatisticalBarRenderer();
    2
    PiePlot3D p2 = new PiePlot3D();
    2
    PiePlot3D p2 = new PiePlot3D();
    2
    StatisticalBarRenderer r2 = new StatisticalBarRenderer();
    Differences
    Expression1Expression2Difference
    org.jfree.chart.plot.PiePlot3Dorg.jfree.chart.renderer.category.StatisticalBarRendererSUBCLASS_TYPE_MISMATCH
    p2r2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.PiePlot3Dorg.jfree.chart.renderer.category.StatisticalBarRendererSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.plot.PiePlot3Dorg.jfree.chart.renderer.category.StatisticalBarRendererSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression new StatisticalBarRenderer() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    StatisticalBarRenderer r2 = new StatisticalBarRenderer();
    3
    assertTrue(p1.equals(p2));
    3
    assertTrue(p1.equals(p2));
    3
    assertEquals(r1, r2);
    Differences
    Expression1Expression2Difference
    assertTrueassertEqualsMETHOD_INVOCATION_NAME_MISMATCH
    assertTrue(p1.equals(p2))assertEquals(r1,r2)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression assertTrue(p1.equals(p2)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertEquals(r1,r2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertTrue(p1.equals(p2)) is a void method call, and thus it cannot be parameterized
    Expression assertEquals(r1,r2) is a void method call, and thus it cannot be parameterized
    Expression assertTrue(p1.equals(p2)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertEquals(r1,r2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertTrue(p1.equals(p2)) is a void method call, and thus it cannot be parameterized
    Expression assertEquals(r1,r2) is a void method call, and thus it cannot be parameterized
    3
    assertEquals(r1, r2);
                                                                                    
    4
    r1.setErrorIndicatorPaint(Color.red);
    Preondition Violations
    Unmatched statement r1.setErrorIndicatorPaint(Color.red); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4
    r1.setErrorIndicatorPaint(Color.red);
    4
    assertTrue(p2.equals(p1));
    4
    assertTrue(p2.equals(p1));
    7
    assertTrue(r2.equals(r1));
    Differences
    Expression1Expression2Difference
    p1r1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.PiePlot3Dorg.jfree.chart.renderer.category.StatisticalBarRendererSUBCLASS_TYPE_MISMATCH
    p2r2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.PiePlot3Dorg.jfree.chart.renderer.category.StatisticalBarRendererSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression p1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression r1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression p1 cannot be unified with expression r1 , because common superclass type org.jfree.util.PublicCloneable cannot be passed as an argument to public boolean equals(java.lang.Object)
    Expression p1 cannot be unified with expression r1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    Expression p2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression r2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression p2 cannot be unified with expression r2 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    7
    assertTrue(r2.equals(r1));
    5
    p1.setDepthFactor(1.23);
    5
    p1.setDepthFactor(1.23);
    Preondition Violations
    Unmatched statement p1.setDepthFactor(1.23); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                          
    6
    assertFalse(p1.equals(p2));
    6
    assertFalse(p1.equals(p2));
    5
    assertFalse(r1.equals(r2));
    Differences
    Expression1Expression2Difference
    p2r2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.PiePlot3Dorg.jfree.chart.renderer.category.StatisticalBarRendererSUBCLASS_TYPE_MISMATCH
    p1r1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.PiePlot3Dorg.jfree.chart.renderer.category.StatisticalBarRendererSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression p2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression r2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression p2 cannot be unified with expression r2 , because common superclass type org.jfree.util.PublicCloneable cannot be passed as an argument to public boolean equals(java.lang.Object)
    Expression p2 cannot be unified with expression r2 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    Expression p1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression r1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression p1 cannot be unified with expression r1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    5
    assertFalse(r1.equals(r2));
                                                                                    
    6
    r2.setErrorIndicatorPaint(Color.red);
    Preondition Violations
    Unmatched statement r2.setErrorIndicatorPaint(Color.red); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6
    r2.setErrorIndicatorPaint(Color.red);
    7
    p2.setDepthFactor(1.23);
    7
    p2.setDepthFactor(1.23);
    Preondition Violations
    Unmatched statement p2.setDepthFactor(1.23); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                          
                                                                                                              
    8
    r1.setErrorIndicatorStroke(new BasicStroke(1.5f));
    Preondition Violations
    Unmatched statement r1.setErrorIndicatorStroke(new BasicStroke(1.5f)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8
    r1.setErrorIndicatorStroke(new BasicStroke(1.5f));
    8
    assertTrue(p1.equals(p2));
    8
    assertTrue(p1.equals(p2));
    Preondition Violations
    Unmatched statement assertTrue(p1.equals(p2)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                              
    9
    p1.setDarkerSides(true);
    9
    p1.setDarkerSides(true);
    Preondition Violations
    Unmatched statement p1.setDarkerSides(true); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                          
    10
    assertFalse(p1.equals(p2));
    10
    assertFalse(p1.equals(p2));
    9
    assertFalse(r1.equals(r2));
    Differences
    Expression1Expression2Difference
    p2r2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.PiePlot3Dorg.jfree.chart.renderer.category.StatisticalBarRendererSUBCLASS_TYPE_MISMATCH
    p1r1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.PiePlot3Dorg.jfree.chart.renderer.category.StatisticalBarRendererSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression p2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression r2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression p2 cannot be unified with expression r2 , because common superclass type org.jfree.util.PublicCloneable cannot be passed as an argument to public boolean equals(java.lang.Object)
    Expression p2 cannot be unified with expression r2 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    Expression p1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression r1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression p1 cannot be unified with expression r1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    9
    assertFalse(r1.equals(r2));
                                                                                                                
    10
    r2.setErrorIndicatorStroke(new BasicStroke(1.5f));
    Preondition Violations
    Unmatched statement r2.setErrorIndicatorStroke(new BasicStroke(1.5f)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    10
    r2.setErrorIndicatorStroke(new BasicStroke(1.5f));
    11
    p2.setDarkerSides(true);
    11
    p2.setDarkerSides(true);
    Preondition Violations
    Unmatched statement p2.setDarkerSides(true); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                            
    12
    assertTrue(p1.equals(p2));
    12
    assertTrue(p1.equals(p2));
    11
    assertTrue(r2.equals(r1));
    Differences
    Expression1Expression2Difference
    p2r1VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.PiePlot3Dorg.jfree.chart.renderer.category.StatisticalBarRendererSUBCLASS_TYPE_MISMATCH
    p1r2VARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.PiePlot3Dorg.jfree.chart.renderer.category.StatisticalBarRendererSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression p2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression r1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression p2 cannot be unified with expression r1 , because common superclass type org.jfree.util.PublicCloneable cannot be passed as an argument to public boolean equals(java.lang.Object)
    Expression p2 cannot be unified with expression r1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    Expression p1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression r2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression p1 cannot be unified with expression r2 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    11
    assertTrue(r2.equals(r1));
    Precondition Violations (48)
    Row Violation
    1Expression new StatisticalBarRenderer() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression new StatisticalBarRenderer() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression assertTrue(p1.equals(p2)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression assertEquals(r1,r2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression assertTrue(p1.equals(p2)) is a void method call, and thus it cannot be parameterized
    6Expression assertEquals(r1,r2) is a void method call, and thus it cannot be parameterized
    7Expression assertTrue(p1.equals(p2)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression assertEquals(r1,r2) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression assertTrue(p1.equals(p2)) is a void method call, and thus it cannot be parameterized
    10Expression assertEquals(r1,r2) is a void method call, and thus it cannot be parameterized
    11Unmatched statement r1.setErrorIndicatorPaint(Color.red); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    12Expression p1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression r1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression p1 cannot be unified with expression r1 , because common superclass type org.jfree.util.PublicCloneable cannot be passed as an argument to public boolean equals(java.lang.Object)
    15Expression p1 cannot be unified with expression r1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    16Expression p2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17Expression r2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    18Expression p2 cannot be unified with expression r2 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    19Unmatched statement p1.setDepthFactor(1.23); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    20Expression p2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    21Expression r2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    22Expression p2 cannot be unified with expression r2 , because common superclass type org.jfree.util.PublicCloneable cannot be passed as an argument to public boolean equals(java.lang.Object)
    23Expression p2 cannot be unified with expression r2 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    24Expression p1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25Expression r1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    26Expression p1 cannot be unified with expression r1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    27Unmatched statement r2.setErrorIndicatorPaint(Color.red); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    28Unmatched statement p2.setDepthFactor(1.23); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    29Unmatched statement r1.setErrorIndicatorStroke(new BasicStroke(1.5f)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    30Unmatched statement assertTrue(p1.equals(p2)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    31Unmatched statement p1.setDarkerSides(true); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    32Expression p2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    33Expression r2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    34Expression p2 cannot be unified with expression r2 , because common superclass type org.jfree.util.PublicCloneable cannot be passed as an argument to public boolean equals(java.lang.Object)
    35Expression p2 cannot be unified with expression r2 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    36Expression p1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    37Expression r1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    38Expression p1 cannot be unified with expression r1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    39Unmatched statement r2.setErrorIndicatorStroke(new BasicStroke(1.5f)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    40Unmatched statement p2.setDarkerSides(true); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    41Expression p2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    42Expression r1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    43Expression p2 cannot be unified with expression r1 , because common superclass type org.jfree.util.PublicCloneable cannot be passed as an argument to public boolean equals(java.lang.Object)
    44Expression p2 cannot be unified with expression r1 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    45Expression p1 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    46Expression r2 cannot be parameterized, because it has dependencies to/from statements that will be extracted
    47Expression p1 cannot be unified with expression r2 , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public boolean equals(java.lang.Object)
    48Clone fragment #1 returns variables p1, p2 , while Clone fragment #2 returns variables r1, r2