void testLocalhost() throws Exception { executeTarget("testLocalhost"); } public void testLocalhostURL() throws Exception { executeTarget("testLocalhostURL"); } public void testIpv4localhost() throws Exception { executeTarget("testIpv4localhost"); } public 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); } 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 testDestDirFileset() { executeTarget("testDestDirFileset"); } public void testMapperFileset() { executeTarget("testMapperFileset"); } public void testDestDirPath() { executeTarget("testDestDirPath"); } public 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); } public void testNoFiles() { expectBuildExceptionContaining("testNoFiles", "no files", SignJar.ERROR_NO_SOURCE); } public void testNoStorePass() { expectBuildExceptionContaining("testNoStorePass", "no password", SignJar.ERROR_NO_STOREPASS); }
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/SignJarTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testLocalhost() throws Exception {
1
void testDestDirFileset() {
2
        executeTarget("testLocalhost");
2
        executeTarget("testDestDirFileset");
3
    }
3
    }
4
    public void testLocalhostURL() throws Exception {
4
    public void testMapperFileset() {
5
        executeTarget("testLocalhostURL");
5
        executeTarget("testMapperFileset");
6
    }
6
    }
7
    public void testIpv4localhost() throws Exception {
7
    public void testDestDirPath() {
8
        executeTarget("testIpv4localhost");
8
        executeTarget("testDestDirPath");
9
    }
9
    }
10
    public void testFTPURL() throws Exception {
10
    public void testMapperPath() {
11
        executeTarget("testFTPURL");
11
        executeTarget("testMapperPath");
12
    }
12
    }
13
    public void testBoth() throws Exception {
13
    public void testMapperNoDest() {
14
        expectBuildExceptionContaining("testBoth",
14
        expectBuildExceptionContaining("testMapperNoDest",
15
                "error on two targets",
15
                "two mappers",
16
                IsReachable.ERROR_BOTH_TARGETS);
16
                SignJar.ERROR_MAPPER_WITHOUT_DEST);
17
    }
17
    }
18
    public void testNoTargets() throws Exception {
18
    public void testTwoMappers() {
19
        expectBuildExceptionContaining("testNoTargets",
19
        expectBuildExceptionContaining("testTwoMappers",
20
                "no params",
20
                "two mappers",
21
                IsReachable.ERROR_NO_HOSTNAME);
21
                
22
    }
23
    public void testBadTimeout() throws Exception
22
SignJar.ERROR_TOO_MANY_MAPPERS);
23
    }
24
 {
24
    public void testNoAlias() {
25
        expectBuildExceptionContaining("testBadTimeout",
25
        expectBuildExceptionContaining("testNoAlias",
26
                "error on -ve timeout",
26
                "no alias",
27
                IsReachable.ERROR_BAD_TIMEOUT);
27
                SignJar.ERROR_NO_ALIAS);
28
    }
28
    }
29
    public void NotestFile() throws Exception {
29
    public void testNoFiles() {
30
        expectBuildExceptionContaining("testFile",
30
        expectBuildExceptionContaining("testNoFiles",
31
                "error on file URL",
31
                "no files",
32
                IsReachable.ERROR_NO_HOST_IN_URL);
32
                SignJar.ERROR_NO_SOURCE);
33
    }
33
    }
34
    public void testBadURL() throws Exception {
34
    public void testNoStorePass() {
35
        expectBuildExceptionContaining("testBadURL",
35
        expectBuildExceptionContaining("testNoStorePass",
36
                "error in URL",
36
                "no password",
37
                IsReachable.ERROR_BAD_URL);
37
                SignJar.ERROR_NO_STOREPASS);
38
    }
38
    }
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