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