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); }
void testSchemaFileMustExist() throws Exception { expectBuildExceptionContaining("testSchemaFileMustExist", "expected failure", WsdlToDotnet.Schema.ERROR_FILE_NOT_FOUND); } /** * A unit test for JUnit */ public void testSchemaFileMustHaveOneOptionOnly() throws Exception { expectBuildExceptionContaining("testSchemaFileMustHaveOneOptionOnly", "expected failure", WsdlToDotnet.Schema.ERROR_BOTH_DECLARED); } /** * A unit test for JUnit */ public void testSchemaMustBeSet() throws Exception { expectBuildExceptionContaining("testSchemaMustBeSet", "expected failure", WsdlToDotnet.Schema.ERROR_NONE_DECLARED); }
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/optional/WsdlToDotnetTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testBoth() throws Exception {
1
void testSchemaFileMustExist() throws Exception {
2
        expectBuildExceptionContaining("testBoth",
2
        expectBuildExceptionContaining("testSchemaFileMustExist",
3
                "error on two targets",
3
                "e
4
                IsReachable
4
xpected failure",
5
.ERROR_BOTH_TARGETS);
5
                WsdlToDotnet.Schema.ERROR_
6
    }
7
    public void testNoTargets
6
FILE_NOT_FOUND);
7
    }
8
    /**
9
     * A unit test for JUnit
10
     */
8
() throws Exception {
11
    public void testSchemaFileMustHaveOneOptionOnly() throws Exception {
9
        expectBuildExceptionContaining("testNoTargets",
12
        expectBuildExceptionContaining("testSchemaFileMustHaveOneOptionOnly",
10
                "no params",
13
                "expected failure",
11
                IsReachable.ERROR_NO_HOSTNAME);
14
                
12
    }
15
WsdlToDotnet.Schema.ERROR_BOTH_DECLARED);
16
    }
17
    /**
18
     * A unit test for JUnit
19
     */
13
    public void testBadTimeout() throws Exception {
20
    public void testSchemaMustBeSet() throws Exception {
14
        expectBuildExceptionContaining("testBadTimeout",
21
        expectBuildExceptionContaining("testSchemaMustBeSet",
15
                "error on -ve timeout",
22
                "e
16
                IsReachable.ERROR_BAD_TIMEOUT
23
xpected failure",
17
);
24
                WsdlToDotnet.Schema.ERROR_NONE_DECLARED);
18
    }
25
    }
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