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);
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);
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 testBoth() throws Exception {
1
void testMapperNoDest() {
2
        expectBuildExceptionContaining("testBoth",
2
        expectBuildExceptionContaining("testMapperNoDest",
3
                "error on two targets",
3
                "two mappers",
4
                IsReachable.ERROR_BOTH_TARGETS);
4
                SignJar.ERROR_MAPPER_WITHOUT_DEST);
5
    }
5
    }
6
    public void testNoTargets() throws Exception {
6
    public void testTwoMappers() {
7
        expectBuildExceptionContaining("testNoTargets",
7
        expectBuildExceptionContaining("testTwoMappers",
8
                "no params",
8
                "two mappers",
9
                IsReachable.ERROR_NO_HOSTNAME);
9
                
10
    }
11
    public void testBadTimeout() throws Exception
10
SignJar.ERROR_TOO_MANY_MAPPERS);
11
    }
12
 {
12
    public void testNoAlias() {
13
        expectBuildExceptionContaining("testBadTimeout",
13
        expectBuildExceptionContaining("testNoAlias",
14
                "error on -ve timeout",
14
                "no alias",
15
                IsReachable.ERROR_BAD_TIMEOUT);
15
                SignJar.ERROR_NO_ALIAS);
16
    }
16
    }
17
    public void NotestFile() throws Exception {
17
    public void testNoFiles() {
18
        expectBuildExceptionContaining("testFile",
18
        expectBuildExceptionContaining("testNoFiles",
19
                "error on file URL",
19
                "no files",
20
                IsReachable.ERROR_NO_HOST_IN_URL);
20
                SignJar.ERROR_NO_SOURCE);
21
    
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