SampleSaveConfiguration a = new SampleSaveConfiguration(false); SampleSaveConfiguration b = new SampleSaveConfiguration(false); assertTrue("Hash codes should be equal",a.hashCode() == b.hashCode()); assertTrue("Objects should be equal",a.equals(b)); assertTrue("Objects should be equal",b.equals(a));
SampleSaveConfiguration a = new SampleSaveConfiguration(false); SampleSaveConfiguration b = new SampleSaveConfiguration(true); assertFalse("Hash codes should not be equal",a.hashCode() == b.hashCode()); assertFalse("Objects should not be equal",a.equals(b)); assertFalse("Objects should not be equal",b.equals(a));
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/samplers/TestSampleSaveConfiguration.java File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/samplers/TestSampleSaveConfiguration.java
Method name: void testFalse() Method name: void testFalseTrue()
Number of AST nodes: 5 Number of AST nodes: 5
1
SampleSaveConfiguration a = new SampleSaveConfiguration(false);
1
SampleSaveConfiguration a = new SampleSaveConfiguration(false);
2
        SampleSaveConfiguration b = new SampleSaveConfiguration(false);
2
        SampleSaveConfiguration b = new SampleSaveConfiguration(true);
3
        assertTrue("Hash codes should be equal",a.hashCode() == b.hashCode());
3
        assertFalse("Hash codes should not be equal",a.hashCode() == b.hashCode());
4
        assertTrue("Objects should be equal",a.equals(b));
4
        assertFalse("Objects should not be equal",a.equals(b));
5
        assertTrue("Objects should be equal",b.equals(a));
5
        assertFalse("Objects should not be equal",b.equals(a));
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 declared in the same class
Number of node comparisons13
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    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
    SampleSaveConfiguration a = new SampleSaveConfiguration(false);
    1
    SampleSaveConfiguration a = new SampleSaveConfiguration(false);
    2
    SampleSaveConfiguration b = new SampleSaveConfiguration(false);
    2
    SampleSaveConfiguration b = new SampleSaveConfiguration(false);
    2
    SampleSaveConfiguration b = new SampleSaveConfiguration(true);
    Differences
    Expression1Expression2Difference
    falsetrueLITERAL_VALUE_MISMATCH
    2
    SampleSaveConfiguration b = new SampleSaveConfiguration(true);
    3
    assertTrue("Hash codes should be equal", a.hashCode() == b.hashCode());
    3
    assertTrue("Hash codes should be equal", a.hashCode() == b.hashCode());
    3
    assertFalse("Hash codes should not be equal", a.hashCode() == b.hashCode());
    Differences
    Expression1Expression2Difference
    "Hash codes should be equal""Hash codes should not be equal"LITERAL_VALUE_MISMATCH
    assertTrueassertFalseMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression assertTrue("Hash codes should be equal",a.hashCode() == b.hashCode()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertFalse("Hash codes should not be equal",a.hashCode() == b.hashCode()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertTrue("Hash codes should be equal",a.hashCode() == b.hashCode()) is a void method call, and thus it cannot be parameterized
    Expression assertFalse("Hash codes should not be equal",a.hashCode() == b.hashCode()) is a void method call, and thus it cannot be parameterized
    3
    assertFalse("Hash codes should not be equal", a.hashCode() == b.hashCode());
    4
    assertTrue("Objects should be equal", a.equals(b));
    4
    assertTrue("Objects should be equal", a.equals(b));
    4
    assertFalse("Objects should not be equal", a.equals(b));
    Differences
    Expression1Expression2Difference
    "Objects should be equal""Objects should not be equal"LITERAL_VALUE_MISMATCH
    assertTrueassertFalseMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression assertTrue("Objects should be equal",a.equals(b)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertFalse("Objects should not be equal",a.equals(b)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertTrue("Objects should be equal",a.equals(b)) is a void method call, and thus it cannot be parameterized
    Expression assertFalse("Objects should not be equal",a.equals(b)) is a void method call, and thus it cannot be parameterized
    4
    assertFalse("Objects should not be equal", a.equals(b));
    5
    assertTrue("Objects should be equal", b.equals(a));
    5
    assertTrue("Objects should be equal", b.equals(a));
    5
    assertFalse("Objects should not be equal", b.equals(a));
    Differences
    Expression1Expression2Difference
    "Objects should be equal""Objects should not be equal"LITERAL_VALUE_MISMATCH
    assertTrueassertFalseMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression assertTrue("Objects should be equal",b.equals(a)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertFalse("Objects should not be equal",b.equals(a)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertTrue("Objects should be equal",b.equals(a)) is a void method call, and thus it cannot be parameterized
    Expression assertFalse("Objects should not be equal",b.equals(a)) is a void method call, and thus it cannot be parameterized
    5
    assertFalse("Objects should not be equal", b.equals(a));
    Precondition Violations (12)
    Row Violation
    1Expression assertTrue("Hash codes should be equal",a.hashCode() == b.hashCode()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression assertFalse("Hash codes should not be equal",a.hashCode() == b.hashCode()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression assertTrue("Hash codes should be equal",a.hashCode() == b.hashCode()) is a void method call, and thus it cannot be parameterized
    4Expression assertFalse("Hash codes should not be equal",a.hashCode() == b.hashCode()) is a void method call, and thus it cannot be parameterized
    5Expression assertTrue("Objects should be equal",a.equals(b)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression assertFalse("Objects should not be equal",a.equals(b)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression assertTrue("Objects should be equal",a.equals(b)) is a void method call, and thus it cannot be parameterized
    8Expression assertFalse("Objects should not be equal",a.equals(b)) is a void method call, and thus it cannot be parameterized
    9Expression assertTrue("Objects should be equal",b.equals(a)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression assertFalse("Objects should not be equal",b.equals(a)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression assertTrue("Objects should be equal",b.equals(a)) is a void method call, and thus it cannot be parameterized
    12Expression assertFalse("Objects should not be equal",b.equals(a)) is a void method call, and thus it cannot be parameterized