void testNSMapping() throws Exception { executeTarget("testNSMapping"); } public 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 testMapperPath() { executeTarget("testMapperPath"); } public void testMapperNoDest() { expectBuildExceptionContaining("testMapperNoDest", "two mappers", SignJar.ERROR_MAPPER_WITHOUT_DEST); } public void testTwoMappers() { expectBuildExceptionContaining("testTwoMappers", "two mappers", SignJar.ERROR_TOO_MANY_MAPPERS); } public void testNoAlias() { expectBuildExceptionContaining("testNoAlias", "no alias", SignJar.ERROR_NO_ALIAS);
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/SignJarTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testNSMapping() throws Exception {
1
void testMapperPath() {
2
        executeTarget("testNSMapping");
2
        executeTarget("testMapperPath");
3
    }
3
    }
4
    public void testNoEmptySchemaNamespace() throws Exception {
4
    public void testMapperNoDest() {
5
        expectBuildExceptionContaining("testNoEmptySchemaNamespace",
5
        expectBuildExceptionContaining("test
6
                "empty namespace URI",SchemaValidate.SchemaLocation.ERROR_NO_URI);
7
    }
8
    public void testNoEmptySchemaLocation() throws Exception
6
MapperNoDest",
7
                "two mappers",
8
                SignJar.ERROR_MAPPER_WITHOUT_DEST);
9
    }
9
 {
10
    public void testTwoMappers() {
10
        expectBuildExceptionContaining("testNoEmptySchemaLocation",
11
        expectBuildExceptionContaining("test
11
                "empty schema location",
12
                SchemaValidate.SchemaLocation.ERROR_NO_LOCATION
12
TwoMappers",
13
                "two mappers",
13
);
14
                SignJar.ERROR_TOO_MANY_MAPPERS);
14
    }
15
    }
15
    public void testNoFile() throws Exception {
16
    public void testNoAlias() {
16
        expectBuildExceptionContaining("testNoFile",
17
        expectBuildExceptionContaining("testNoAlias",
17
                "no file at file attribute",
18
                "no 
18
                SchemaValidate.SchemaLocation
19
alias",
19
.ERROR_NO_FILE);
20
                SignJar.ERROR_NO_ALIAS);
20
    
21
    
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