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); } public void NotestFile() throws Exception { expectBuildExceptionContaining("testFile", "error on file URL", IsReachable.ERROR_NO_HOST_IN_URL); } public void testBadURL() throws Exception { expectBuildExceptionContaining("testBadURL", "error in URL", IsReachable.ERROR_BAD_URL);
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); } public void NotestFile() throws Exception { expectBuildExceptionContaining("testFile", "error on file URL", IsReachable.ERROR_NO_HOST_IN_URL);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/condition/IsReachableTest.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 testBoth() throws Exception {
2
        expectBuildExceptionContaining("testBoth",
3
                "error on two targets",
4
                IsReachable.ERROR_BOTH_TARGETS);
5
    }
1
void testNoTargets() throws Exception {
6
    public void testNoTargets() throws Exception {
2
        expectBuildExceptionContaining("testNoTargets",
7
        expectBuildExceptionContaining("testNoTargets",
3
                "no params",
8
                "no params",
4
                IsReachable.ERROR_NO_HOSTNAME);
9
                IsReachable.ERROR_NO_HOSTNAME);
5
    }
10
    }
6
    public void testBadTimeout() throws Exception {
11
    public void testBadTimeout() throws Exception {
7
        expectBuildExceptionContaining("testBadTimeout",
12
        expectBuildExceptionContaining("testBadTimeout",
8
                "error on -ve timeout",
13
                "error on -ve timeout",
9
                IsReachable.ERROR_BAD_TIMEOUT);
14
                IsReachable.ERROR_BAD_TIMEOUT);
10
    }
15
    }
11
    public void NotestFile() throws Exception {
16
    public void NotestFile() throws Exception {
12
        expectBuildExceptionContaining("testFile",
17
        expectBuildExceptionContaining("testFile",
13
                "error on file URL",
18
                "error on file URL",
14
                IsReachable.ERROR_NO_HOST_IN_URL);
19
                IsReachable.ERROR_NO_HOST_IN_URL);
15
    }
20
    
16
    public void testBadURL() throws Exception {
17
        expectBuildExceptionContaining("testBadURL",
18
                "error in URL",
19
                IsReachable.ERROR_BAD_URL);
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