void testNoFile() throws Exception { expectBuildExceptionContaining("testNoFile", "no file at file attribute", SchemaValidate.SchemaLocation.ERROR_NO_FILE); } public void testNoDoubleSchemaLocation() throws Exception { expectBuildExceptionContaining("testNoDoubleSchemaLocation", "two locations for schemas", SchemaValidate.SchemaLocation.ERROR_TWO_LOCATIONS); } public void testNoDuplicateSchema() throws Exception { expectBuildExceptionContaining("testNoDuplicateSchema", "duplicate schemas with different values", SchemaValidate.ERROR_DUPLICATE_SCHEMA);
void testBothSrc() throws Exception { expectBuildExceptionContaining("testBothSrc", "expected failure", WsdlToDotnet.Schema.ERROR_BOTH_DECLARED); } /** * A unit test for JUnit */ public void testSrcIsDir() throws Exception { expectBuildExceptionContaining("testSrcIsDir", "expected failure", WsdlToDotnet.Schema.ERROR_FILE_IS_DIR); } /** * A unit test for JUnit */ public void testSrcIsMissing() throws Exception { expectBuildExceptionContaining("testSrcIsMissing", "expected failure", WsdlToDotnet.Schema.ERROR_FILE_NOT_FOUND);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/SchemaValidateTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/WsdlToDotnetTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testNoFile() throws Exception {
1
void testBothSrc() throws Exception {
2
        expectBuildExceptionContaining("testNoFile",
2
        expectBuildExceptionContaining("testBothSrc",
3
                "no file at file attribute",
3
                "expected failure",
4
                SchemaValidate.SchemaLocation.ERROR_NO_FILE);
4
                
5
    }
6
    public void testNoDoubleSchemaLocation
5
WsdlToDotnet.Schema.ERROR_BOTH_DECLARED);
6
    }
7
     /**
8
     * A unit test for JUnit
9
     */
7
() throws Exception {
10
    public void testSrcIsDir() throws Exception {
8
        expectBuildExceptionContaining("testNoDoubleSchemaLocation",
11
        expectBuildExceptionContaining("test
9
                "two locations for schemas",
10
                SchemaValidate.SchemaLocation.ERROR_TWO_LOCATIONS);
11
    }
12
SrcIsDir",
13
                "expected failure",
14
                WsdlToDotnet.Schema.ERROR_FILE_IS_DIR);
15
    }
16
    /**
17
     * A unit test for JUnit
18
     */
12
    public void testNoDuplicateSchema() throws Exception {
19
    public void testSrcIsMissing() throws Exception {
13
        expectBuildExceptionContaining("testNoDuplicateSchema",
20
        expectBuildExceptionContaining("testSrcIsMissing",
14
                "duplicate schemas with different values",
21
                "
15
                SchemaValidate.ERROR_DUPLICATE_SCHEMA
22
expected failure",
16
);
23
                WsdlToDotnet.Schema.ERROR_FILE_NOT_FOUND);
17
    
24
    
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