void testIso2022Jp() { executeTarget("testIso2022Jp"); } /** * utf-8.xml is invalid as it contains non-UTF-8 characters, but * would pass on systems with a native iso-8859-1 (or similar) * encoding. * * Bug 11279 */ public void testUtf8() { expectBuildException("testUtf8", "invalid characters in file"); } // Tests property element, using XML schema properties as an example. public void testPropertySchemaForValidXML() { executeTarget("testProperty.validXML"); } public void testPropertySchemaForInvalidXML() { expectBuildException( "testProperty.invalidXML", "XML file does not satisfy schema.");
void test4() { executeTarget("test4"); } public void test5() { // should print "panic: Cannot find importVocab file 'JavaTokenTypes.txt'" // since it needs to run java.g first before java.tree.g expectBuildException("test5", "ANTLR returned: 1"); } public void test6() { executeTarget("test6"); } public void test7() { expectBuildException("test7", "Unable to determine generated class");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/ANTLRTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testIso2022Jp() {
1
void test4() {
2
        executeTarget("testIso2022Jp");
2
        executeTarget("test4");
3
    }
3
    }
4
    /**
4
    
5
     * utf-8.xml is invalid as it contains non-UTF-8 characters, but
6
     * would pass on systems with a native iso-8859-1 (or similar)
7
     * encoding.
5
public void test5() {
6
        // should print "panic: Cannot find importVocab file 'JavaTokenTypes.txt'"
8
     *
7
     
9
     * Bug 11279
8
   
10
     */
11
    public void testUtf8() {
12
        expectBuildException("testUtf8", "invalid characters in file");
13
    }
14
    // Tests property element, using XML schema properties as an example.
15
    public void testPropertySchemaForValidXML
9
// since it needs to run java.g first before java.tree.g
10
        expectBuildException("test5", "ANTLR returned: 1");
11
    }
16
() {
12
    public void test6() {
17
        executeTarget("testProperty.validXML");
13
        executeTarget("test6");
18
    }
14
    }
19
    public void testPropertySchemaForInvalidXML() {
15
    public void test7() {
20
        expectBuildException(
16
        expectBuildException(
21
            "testProperty.invalidXML",
22
            "XML file does not satisfy schema.");
17
"test7", "Unable to determine generated class");
23
    
18
    
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