InputSource result = catalog1.resolveEntity(publicId, "nap:chemical+brothers"); assertNotNull(result); assertEquals(toURLString(dtdFile), result.getSystemId());
Source result = catalog.resolve(uri, null); assertNotNull(result); assertEquals(toURLString(xmlFile), result.getSystemId());
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java
Method name: void testNestedCatalog() Method name: void testNestedCatalog()
Number of AST nodes: 3 Number of AST nodes: 3
1
InputSource result = catalog1.resolveEntity(publicId,
1
Source result = catalog.resolve
2
                                                        "nap:chemical+brothers");
2
(uri, null);
3
            assertNotNull(result);
3
            assertNotNull(result);
4
            assertEquals(toURLString(dtdFile),
4
            assertEquals(toURLString(xmlFile),
5
                         result.getSystemId());
5
                         result.getSystemId());
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 the same method
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    19
    assertNotNull(result);
    19
    assertNotNull(result);
    23
    assertNotNull(result);
    Differences
    Expression1Expression2Difference
    org.xml.sax.InputSourcejavax.xml.transform.SourceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.xml.sax.InputSource of variable result does not match with type javax.xml.transform.Source of variable result
    • Make classes org.xml.sax.InputSource and javax.xml.transform.Source extend a common superclass
    23
    assertNotNull(result);
    20
    assertEquals(toURLString(dtdFile), result.getSystemId());
    20
    assertEquals(toURLString(dtdFile), result.getSystemId());
    24
    assertEquals(toURLString(xmlFile), result.getSystemId());
    Differences
    Expression1Expression2Difference
    dtdFilexmlFileVARIABLE_NAME_MISMATCH
    org.xml.sax.InputSourcejavax.xml.transform.SourceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.xml.sax.InputSource of variable result does not match with type javax.xml.transform.Source of variable result
    • Make classes org.xml.sax.InputSource and javax.xml.transform.Source extend a common superclass
    24
    assertEquals(toURLString(xmlFile), result.getSystemId());
    Precondition Violations (2)
    Row Violation
    1Type org.xml.sax.InputSource of variable result does not match with type javax.xml.transform.Source of variable result
    2Type org.xml.sax.InputSource of variable result does not match with type javax.xml.transform.Source of variable result