void testEntityNoCatalog() { configureProject("src/etc/testcases/types/xmlcatalog.xml"); expectPropertySet("testentitynocatalog", "val1", "A stitch in time saves nine"); } // // Ensure that an external entity resolves as expected Using an // XMLCatalog: // // Transform an XML file that refers to the entity into a text // file, entity is listed in the XMLCatalog pointing to a // different file. Stuff result into property: val2 // public void testEntityWithCatalog() { configureProject("src/etc/testcases/types/xmlcatalog.xml"); expectPropertySet("testentitywithcatalog", "val2", "No news is good news"); } // // Ensure that an external entity resolves as expected with NO // XMLCatalog involvement: // // Transform an XML file that contains a reference to a _second_ XML file // via the document() function. The _second_ XML file refers to an entity. // Stuff result into the property: val3 // public void testDocumentNoCatalog() { configureProject("src/etc/testcases/types/xmlcatalog.xml"); expectPropertySet("testdocumentnocatalog", "val3", "A stitch in time saves nine");
void testEntityWithCatalog() { configureProject("src/etc/testcases/types/xmlcatalog.xml"); expectPropertySet("testentitywithcatalog", "val2", "No news is good news"); } // // Ensure that an external entity resolves as expected with NO // XMLCatalog involvement: // // Transform an XML file that contains a reference to a _second_ XML file // via the document() function. The _second_ XML file refers to an entity. // Stuff result into the property: val3 // public void testDocumentNoCatalog() { configureProject("src/etc/testcases/types/xmlcatalog.xml"); expectPropertySet("testdocumentnocatalog", "val3", "A stitch in time saves nine"); } // // Ensure that an external entity resolves as expected Using an // XMLCatalog: // // Transform an XML file that contains a reference to a _second_ XML file // via the document() function. The _second_ XML file refers to an entity. // The entity is listed in the XMLCatalog pointing to a different file. // Stuff result into the property: val4 // public void testDocumentWithCatalog() { configureProject("src/etc/testcases/types/xmlcatalog.xml"); expectPropertySet("testdocumentwithcatalog", "val4", "No news is good news");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/XMLCatalogBuildFileTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/XMLCatalogBuildFileTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testEntityNoCatalog() {
2
        configureProject("src/etc/testcases/types/xmlcatalog.xml");
3
        expectPropertySet("testentitynocatalog", "val1",
4
                          "A stitch in time saves nine");
5
    }
6
    //
7
    // Ensure that an external entity resolves as expected Using an
8
    // XMLCatalog:
9
    //
10
    // Transform an XML file that refers to the entity into a text
11
    // file, entity is listed in the XMLCatalog pointing to a
12
    // different file.  Stuff result into property: val2
13
    //
14
    public void testEntityWithCatalog() {
1
void testEntityWithCatalog() {
15
        configureProject("src/etc/testcases/types/xmlcatalog.xml");
2
        configureProject("src/etc/testcases/types/xmlcatalog.xml");
16
        expectPropertySet("testentitywithcatalog", "val2",
3
        expectPropertySet("testentitywithcatalog", "val2",
17
                          "No news is good news");
4
                          "No news is good news");
18
    }
5
    }
19
    //
6
    //
20
    // Ensure that an external entity resolves as expected with NO
7
    // Ensure that an external entity resolves as expected with NO
21
    // XMLCatalog involvement:
8
    // XMLCatalog involvement:
22
    //
9
    //
23
    // Transform an XML file that contains a reference to a _second_ XML file
10
    // Transform an XML file that contains a reference to a _second_ XML file
24
    // via the document() function.  The _second_ XML file refers to an entity.
11
    // via the document() function.  The _second_ XML file refers to an entity.
25
    // Stuff result into the property: val3
12
    // Stuff result into the property: val3
26
    //
13
    //
27
    public void testDocumentNoCatalog() {
14
    public void testDocumentNoCatalog() {
28
        configureProject("src/etc/testcases/types/xmlcatalog.xml");
15
        configureProject("src/etc/testcases/types/xmlcatalog.xml");
29
        expectPropertySet("testdocumentnocatalog", "val3",
16
        expectPropertySet("testdocumentnocatalog", "val3",
30
                          "A stitch in time saves nine");
17
                          "A stitch in time saves nine");
31
    
18
    }
19
    //
20
    // Ensure that an external entity resolves as expected Using an
21
    // XMLCatalog:
22
    //
23
    // Transform an XML file that contains a reference to a _second_ XML file
24
    // via the document() function.  The _second_ XML file refers to an entity.
25
    // The entity is listed in the XMLCatalog pointing to a different file.
26
    // Stuff result into the property: val4
27
    //
28
    public void testDocumentWithCatalog() {
29
        configureProject("src/etc/testcases/types/xmlcatalog.xml");
30
        expectPropertySet("testdocumentwithcatalog", "val4",
31
                          "No news is good news");
32
    
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0