void testNoEmptySchemaNamespace() throws Exception { expectBuildExceptionContaining("testNoEmptySchemaNamespace", "empty namespace URI",SchemaValidate.SchemaLocation.ERROR_NO_URI); } public void testNoEmptySchemaLocation() throws Exception { expectBuildExceptionContaining("testNoEmptySchemaLocation", "empty schema location", SchemaValidate.SchemaLocation.ERROR_NO_LOCATION); } public 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);
void testDestIsDir() throws Exception { expectBuildExceptionContaining("testDestIsDir", "expected failure", WsdlToDotnet.ERROR_DEST_FILE_IS_DIR); } /** * A unit test for JUnit */ public 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 testNoEmptySchemaNamespace() throws Exception {
1
void testDestIsDir() throws Exception {
2
        expectBuildExceptionContaining("testNoEmptySchemaNamespace",
2
        expectBuildExceptionContaining("test
3
                "empty namespace URI",SchemaValidate.SchemaLocation.ERROR_NO_URI);
4
    }
5
    public void testNoEmptySchemaLocation
3
DestIsDir",
4
                "expected failure",
5
                WsdlToDotnet.ERROR_DEST_FILE_IS_DIR);
6
    }
7
    /**
8
     * A unit test for JUnit
9
     */
6
() throws Exception {
10
    public void testBothSrc() throws Exception {
7
        expectBuildExceptionContaining("testNoEmptySchemaLocation",
11
        expectBuildExceptionContaining("testBothSrc",
8
                "empty schema location",
12
                "e
9
                SchemaValidate.SchemaLocation.ERROR_NO_LOCATION);
10
    }
13
xpected failure",
14
                WsdlToDotnet.Schema.ERROR_BOTH_DECLARED);
15
    }
16
     /**
17
     * A unit test for JUnit
18
     */
11
    public void testNoFile() throws Exception {
19
    public void testSrcIsDir() throws Exception {
12
        expectBuildExceptionContaining("testNoFile",
20
        expectBuildExceptionContaining("testSrcIsDir",
13
                "no file at file attribute",
21
                "
14
                SchemaValidate.SchemaLocation
22
expected failure",
15
.ERROR_NO_FILE);
23
                WsdlToDotnet.Schema.ERROR_FILE_IS_DIR);
16
    }
24
    }
17
    public void testNoDoubleSchemaLocation
25
    /**
26
     * A unit test for JUnit
27
     */
18
() throws Exception {
28
    public void testSrcIsMissing() throws Exception {
19
        expectBuildExceptionContaining("testNoDoubleSchemaLocation",
29
        expectBuildExceptionContaining("test
20
                "two locations for schemas",
21
                SchemaValidate.SchemaLocation.ERROR_TWO_LOCATIONS
30
SrcIsMissing",
31
                "expected failure",
22
);
32
                WsdlToDotnet.Schema.ERROR_FILE_NOT_FOUND);
23
    
33
    
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