assertEquals("The parent and the cloned object are not equal", xml1, xml2); assertNotSame("The parent and the cloned object are the same", xml1, xml2); assertNotSame("The parent and the cloned Attributes objects are the same object.", xml1.getAttributes(), xml2.getAttributes()); assertNotSame("The parent and the cloned Sub Element objects are the same object.", xml1.getElements(), xml2.getElements());
assertEquals("The parent and the cloned object are not equal", xml1, xml2); assertNotSame("The parent and the cloned object are the same", xml1, xml2); assertNotSame("The parent and the cloned Attributes objects are the same object.", xml1.getAttributes(), xml2.getAttributes()); assertNotSame("The parent and the cloned Sub Element objects are the same object.", xml1.getElements(), xml2.getElements());
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/test/java/org/columba/core/xml/XmlElementTest.java File path: /columba-1.4-src/core/src/test/java/org/columba/core/xml/XmlElementTest.java
Method name: void testClone() Method name: void testClone()
Number of AST nodes: 4 Number of AST nodes: 4
1
assertEquals("The parent and the cloned object are not equal", xml1,
1
assertEquals("The parent and the cloned object are not equal", xml1,
2
            xml2);
2
            xml2);
3
        assertNotSame("The parent and the cloned object are the same", xml1,
3
        assertNotSame("The parent and the cloned object are the same", xml1,
4
            xml2);
4
            xml2);
5
        assertNotSame("The parent and the cloned Attributes objects are the same object.",
5
        assertNotSame("The parent and the cloned Attributes objects are the same object.",
6
            xml1.getAttributes(), xml2.getAttributes());
6
            xml1.getAttributes(), xml2.getAttributes());
7
        assertNotSame("The parent and the cloned Sub Element objects are the same object.",
7
        assertNotSame("The parent and the cloned Sub Element objects are the same object.",
8
            xml1.getElements(), xml2.getElements());
8
            xml1.getElements(), xml2.getElements());
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 the same method
Number of node comparisons16
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    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 1
    Mapped Statements
    ID Statement ID Statement
    3
    assertEquals("The parent and the cloned object are not equal", xml1, xml2);
    20
    assertEquals("The parent and the cloned object are not equal", xml1, xml2);
    4
    assertNotSame("The parent and the cloned object are the same", xml1, xml2);
    21
    assertNotSame("The parent and the cloned object are the same", xml1, xml2);
    5
    assertNotSame("The parent and the cloned Attributes objects are the same object.", xml1.getAttributes(), xml2.getAttributes());
    22
    assertNotSame("The parent and the cloned Attributes objects are the same object.", xml1.getAttributes(), xml2.getAttributes());
    6
    assertNotSame("The parent and the cloned Sub Element objects are the same object.", xml1.getElements(), xml2.getElements());
    23
    assertNotSame("The parent and the cloned Sub Element objects are the same object.", xml1.getElements(), xml2.getElements());
    Precondition Violations (0)
    Row Violation