void testUndefined() { expectBuildExceptionContaining("testUndefined","left out the name attribute", "No type specified"); } public void testTaskThatIsntDefined() { expectPropertyUnset("testTaskThatIsntDefined", "testTaskThatIsntDefined"); } public void testTaskThatDoesntReallyExist() { expectPropertyUnset("testTaskThatDoesntReallyExist", "testTaskThatDoesntReallyExist"); }
void testRunFailFoeFork() { expectBuildExceptionContaining("testRunFailFoeFork", "java failures being propagated", "Java returned:"); } public void testExcepting() { expectLogContaining("testExcepting", "Exception raised inside called program"); } public void testExceptingFork() { expectLogContaining("testExceptingFork", "Java Result:"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/condition/TypeFoundTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/JavaTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testUndefined() {
1
void testRunFailFoeFork() {
2
        expectBuildExceptionContaining("testUndefined","left out the name attribu
2
        expectBuildExceptionContaining("testRunFailFoeFork",
3
te", "No type specifi
3
            "java failures being propagated",
4
ed");
4
            "Java returned:");
5
    }
5
    }
6
    public void testTaskThatIsntDefined() {
6
    public void test
7
        expectPropertyUnset("testTaskThatIsntDefined", "testTaskThatIsntDefined
7
Excepting() {
8
        expectLogContaining("testExcepting",
8
");
9
                            "Exception raised inside called program");
9
    }
10
    }
10
    public void testTaskThatDoesntReallyExist() {
11
    public void test
11
        expectPropertyUnset("testTaskThatDoesntReallyExist", "testTaskThatDoesntReallyExist
12
ExceptingFork() {
13
        expectLogContaining("testExceptingFork",
12
");
14
                            "Java Result:");
13
    }
15
    }
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