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 testFTPURL() throws Exception { executeTarget("testFTPURL"); } public void testBoth() throws Exception { expectBuildExceptionContaining("testBoth", "error on two targets", IsReachable.ERROR_BOTH_TARGETS); } public void testNoTargets() throws Exception { expectBuildExceptionContaining("testNoTargets", "no params", IsReachable.ERROR_NO_HOSTNAME); } public void testBadTimeout() throws Exception { expectBuildExceptionContaining("testBadTimeout", "error on -ve timeout", IsReachable.ERROR_BAD_TIMEOUT);
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/condition/IsReachableTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testNSMapping() throws Exception {
1
void testFTPURL() throws Exception {
2
        executeTarget("testNSMapping");
2
        executeTarget("testFTPURL");
3
    }
3
    }
4
    public void testNoEmptySchemaNamespace() throws Exception {
4
    public void testBoth() throws Exception {
5
        expectBuildExceptionContaining("testNoEmptySchemaNamespace",
5
        expectBuildExceptionContaining("test
6
                "empty namespace URI",SchemaValidate.SchemaLocation.ERROR_NO_URI
6
Both",
7
                "error on two targets",
7
);
8
                IsReachable.ERROR_BOTH_TARGETS);
8
    }
9
    }
9
    public void testNoEmptySchemaLocation() throws Exception {
10
    public void testNoTargets() throws Exception {
10
        expectBuildExceptionContaining("testNoEmptySchemaLocation",
11
        expectBuildExceptionContaining("testNoTargets",
11
                "empty schema location",
12
                "
12
                SchemaValidate.SchemaLocation
13
no params",
13
.ERROR_NO_LOCATION);
14
                IsReachable.ERROR_NO_HOSTNAME);
14
    }
15
    }
15
    public void testNoFile() throws Exception {
16
    public void testBadTimeout() throws Exception {
16
        expectBuildExceptionContaining("testNoFile",
17
        expectBuildExceptionContaining("testBadTimeout",
17
                "no file at file attribute",
18
                "error on -ve timeout",
18
                SchemaValidate.SchemaLocation.ERROR_NO_FILE);
19
                IsReachable.ERROR_BAD_TIMEOUT);
19
    
20
    
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