DateTitle t1 = new DateTitle(); DateTitle t2 = new DateTitle(); assertTrue(t1.equals(t2)); int h1 = t1.hashCode(); int h2 = t2.hashCode(); assertEquals(h1, h2);
TextTitle t1 = new TextTitle(); TextTitle t2 = new TextTitle(); assertTrue(t1.equals(t2)); int h1 = t1.hashCode(); int h2 = t2.hashCode(); assertEquals(h1, h2);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/chart/title/junit/DateTitleTests.java File path: /jfreechart-1.0.10/tests/org/jfree/chart/title/junit/TextTitleTests.java
Method name: void testHashcode() Method name: void testHashcode()
Number of AST nodes: 6 Number of AST nodes: 6
1
DateTitle t1 = new DateTitle();
1
TextTitle t1 = new TextTitle();
2
        DateTitle t2 = new DateTitle();
2
        TextTitle t2 = new TextTitle();
3
        assertTrue(t1.equals(t2));
3
        assertTrue(t1.equals(t2));
4
        int h1 = t1.hashCode();
4
        int h1 = t1.hashCode();
5
        int h2 = t2.hashCode();
5
        int h2 = t2.hashCode();
6
        assertEquals(h1, h2);
6
        assertEquals(h1, h2);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
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 comparisons16
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    DateTitle t1 = new DateTitle();
    1
    DateTitle t1 = new DateTitle();
    1
    TextTitle t1 = new TextTitle();
    Differences
    Expression1Expression2Difference
    org.jfree.chart.title.DateTitleorg.jfree.chart.title.TextTitleSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.title.DateTitleorg.jfree.chart.title.TextTitleSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.title.DateTitleorg.jfree.chart.title.TextTitleSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression new TextTitle() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    1
    TextTitle t1 = new TextTitle();
    2
    DateTitle t2 = new DateTitle();
    2
    DateTitle t2 = new DateTitle();
    2
    TextTitle t2 = new TextTitle();
    Differences
    Expression1Expression2Difference
    org.jfree.chart.title.DateTitleorg.jfree.chart.title.TextTitleSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.title.DateTitleorg.jfree.chart.title.TextTitleSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.title.DateTitleorg.jfree.chart.title.TextTitleSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression new TextTitle() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    TextTitle t2 = new TextTitle();
    3
    assertTrue(t1.equals(t2));
    3
    assertTrue(t1.equals(t2));
    3
    assertTrue(t1.equals(t2));
    Differences
    Expression1Expression2Difference
    org.jfree.chart.title.DateTitleorg.jfree.chart.title.TextTitleSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.title.DateTitleorg.jfree.chart.title.TextTitleSUBCLASS_TYPE_MISMATCH
    3
    assertTrue(t1.equals(t2));
    4
    int h1 = t1.hashCode();
    4
    int h1 = t1.hashCode();
    4
    int h1 = t1.hashCode();
    Differences
    Expression1Expression2Difference
    org.jfree.chart.title.DateTitleorg.jfree.chart.title.TextTitleSUBCLASS_TYPE_MISMATCH
    4
    int h1 = t1.hashCode();
    5
    int h2 = t2.hashCode();
    5
    int h2 = t2.hashCode();
    5
    int h2 = t2.hashCode();
    Differences
    Expression1Expression2Difference
    org.jfree.chart.title.DateTitleorg.jfree.chart.title.TextTitleSUBCLASS_TYPE_MISMATCH
    5
    int h2 = t2.hashCode();
    6
    assertEquals(h1, h2);
    6
    assertEquals(h1, h2);
    Precondition Violations (2)
    Row Violation
    1Expression new TextTitle() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression new TextTitle() cannot be parameterized, because it has dependencies to/from statements that will be extracted