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); }
void testSchemaFileMustExist() throws Exception { expectBuildExceptionContaining("testSchemaFileMustExist", "expected failure", WsdlToDotnet.Schema.ERROR_FILE_NOT_FOUND); } /** * A unit test for JUnit */ public void testSchemaFileMustHaveOneOptionOnly() throws Exception { expectBuildExceptionContaining("testSchemaFileMustHaveOneOptionOnly", "expected failure", WsdlToDotnet.Schema.ERROR_BOTH_DECLARED); } /** * A unit test for JUnit */ public void testSchemaMustBeSet() throws Exception { expectBuildExceptionContaining("testSchemaMustBeSet", "expected failure", WsdlToDotnet.Schema.ERROR_NONE_DECLARED); }
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 testSchemaFileMustExist() throws Exception {
2
        expectBuildExceptionContaining("testNoEmptySchemaNamespace",
2
        expectBuildExceptionContaining("test
3
                "empty namespace URI",SchemaValidate.SchemaLocation
3
SchemaFileMustExist",
4
                "expected failure",
4
.ERROR_NO_URI);
5
                WsdlToDotnet.Schema.ERROR_
5
    }
6
    public void testNoEmptySchemaLocation
6
FILE_NOT_FOUND);
7
    }
8
    /**
9
     * A unit test for JUnit
10
     */
7
() throws Exception {
11
    public void testSchemaFileMustHaveOneOptionOnly() throws Exception {
8
        expectBuildExceptionContaining("testNoEmptySchemaLocation",
12
        expectBuildExceptionContaining("testSchemaFileMustHaveOneOptionOnly",
9
                "empty schema location",
13
                "e
10
                SchemaValidate.SchemaLocation.ERROR_NO_LOCATION);
11
    }
14
xpected failure",
15
                WsdlToDotnet.Schema.ERROR_BOTH_DECLARED);
16
    }
17
    /**
18
     * A unit test for JUnit
19
     */
12
    public void testNoFile() throws Exception {
20
    public void testSchemaMustBeSet() throws Exception {
13
        expectBuildExceptionContaining("testNoFile",
21
        expectBuildExceptionContaining("testSchemaMustBeSet",
14
                "no file at file attribute",
22
                "
15
                SchemaValidate.SchemaLocation.ERROR_NO_FILE
23
expected failure",
16
);
24
                WsdlToDotnet.Schema.ERROR_NONE_DECLARED);
17
    }
25
    }
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