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 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);
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/SchemaValidateTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testNoFile() throws Exception {
1
void testNoEmptySchemaNamespace() throws Exception {
2
        expectBuildExceptionContaining("testNoFile",
2
        expectBuildExceptionContaining("testNoEmptySchemaNamespace",
3
                "no file at file attribute",
3
                "
4
                SchemaValidate.SchemaLocation.ERROR_NO_FILE);
4
empty namespace URI",SchemaValidate.SchemaLocation.ERROR_NO_URI);
5
    }
5
    }
6
    public void testNoDoubleSchemaLocation() throws Exception {
6
    public void testNoEmptySchemaLocation() throws Exception {
7
        expectBuildExceptionContaining("testNoDoubleSchemaLocation",
7
        expectBuildExceptionContaining("testNoEmptySchemaLocation",
8
                "two locations for schemas",
8
                "empty schema location",
9
                SchemaValidate.SchemaLocation.ERROR_TWO_LOCATIONS);
9
                SchemaValidate.SchemaLocation.ERROR_NO_LOCATION);
10
    }
10
    }
11
    public void testNoDuplicateSchema() throws Exception {
11
    public void testNoFile() throws Exception {
12
        expectBuildExceptionContaining("testNoDuplicateSchema",
12
        expectBuildExceptionContaining("testNoFile",
13
                "duplicate schemas with different values",
13
                "no file at file attribute",
14
                SchemaValidate.ERROR_DUPLICATE_SCHEMA);
14
                SchemaValidate.SchemaLocation.ERROR_NO_FILE);
15
    
15
    
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