void testTaskThatIsntDefined() { expectPropertyUnset("testTaskThatIsntDefined", "testTaskThatIsntDefined"); } public void testTaskThatDoesntReallyExist() { expectPropertyUnset("testTaskThatDoesntReallyExist", "testTaskThatDoesntReallyExist"); } public void testType() { expectPropertySet("testType", "testType"); }
void testDelay() { expectLogContaining("delay", "MyTask called"); } public void testOnErrorReport() { expectLogContaining("onerror.report", "MyTaskNotPresent cannot be found"); } public void testOnErrorIgnore() { expectLog("onerror.ignore",""); }
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/TypeAdapterTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testTaskThatIsntDefined() {
1
void test
2
        expectPropertyUnset("testTaskThatIsntDefined", "testTaskThatIsntDefin
2
Delay() {
3
ed");
3
        expectLogContaining("delay", "MyTask called");
4
    }
4
    }
5
    public void testTaskThatDoesntReallyExist() {
5
    public void test
6
        expectPropertyUnset("testTaskThatDoesntReallyExist", "testTaskThatDo
6
OnErrorReport() {
7
        expectLogContaining("onerror.report",
7
esntReallyExist");
8
                            "MyTaskNotPresent cannot be found");
8
    }
9
    }
9
    public void testType() {
10
    public void testOnErrorIgnore() {
10
        expectPropertySet("testType", "testType");
11
        expectLog("onerror.ignore","");
11
    }
12
    }
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