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());
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 16 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | assertEquals("The parent and the cloned object are not equal", xml1, xml2); | | 9 | 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); | | 10 | 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()); | | 11 | 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()); | | 12 | assertNotSame("The parent and the cloned Sub Element objects are the same object.", xml1.getElements(), xml2.getElements()); |
Precondition Violations (0)
Row |
Violation |