void testVerifyJar() { executeTarget("testVerifyJar"); } public void testVerifyNoArgs() { expectBuildExceptionContaining("testVerifyNoArgs", "no args", AbstractJarSignerTask.ERROR_NO_SOURCE); } public void testVerifyJarUnsigned() { expectBuildExceptionContaining("testVerifyJarUnsigned", "unsigned JAR file", VerifyJar.ERROR_NO_VERIFY);
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);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/SignJarTest.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 testVerifyJar() {
1
void testFTPURL() throws Exception {
2
        executeTarget("testVerifyJar");
2
        executeTarget("testFTPURL");
3
    }
3
    }
4
    public void testVerifyNoArgs() {
4
    public void testBoth() throws Exception {
5
        expectBuildExceptionContaining("testVerifyNoArgs",
5
        expectBuildExceptionContaining("testBoth",
6
                "no args",
6
                "error on two targets",
7
                AbstractJarSignerTask.ERROR_NO_SOURCE);
7
                IsReachable.ERROR_BOTH_TARGETS);
8
    }
8
    }
9
    public void testVerifyJarUnsigned() {
9
    public void testNoTargets() throws Exception {
10
        expectBuildExceptionContaining("testVerifyJarUnsigned",
10
        expectBuildExceptionContaining("testNoTargets",
11
                "unsigned JAR file",
11
                "no params",
12
                VerifyJar.ERROR_NO_VERIFY);
12
                IsReachable.ERROR_NO_HOSTNAME);
13
    
13
    
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