void testDelay() { expectLogContaining("delay", "MyTask called"); } public void testOnErrorReport() { expectLogContaining("onerror.report", "MyTaskNotPresent cannot be found"); } public void testOnErrorIgnore() { expectLog("onerror.ignore","");
void testDuplicateAttribute() { expectBuildException( "duplicate.attribute", "the attribute text has already been specified"); } public void testDuplicateElement() { expectBuildException( "duplicate.element", "the element text has already been specified"); } public void testUri() { expectLog("uri", "Hello World");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/TypeAdapterTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/MacroDefTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testDelay() {
1
void testDuplicateAttribute() {
2
        expectLogContaining("delay", "MyTask call
2
        expectBuildException(
3
            "duplicate.attribute",
3
ed");
4
            "the attribute text has already been specified");
4
    }
5
    }
5
    public void testOnErrorReport() {
6
    public void testDuplicateElement() {
6
        expectLogContaining("onerror.report",
7
        expect
7
                            "MyTaskNotPresent cannot be foun
8
BuildException(
9
            "duplicate.element",
8
d");
10
            "the element text has already been specified");
9
    }
11
    }
10
    public void testOnErrorIgnore() {
12
    public void testUri() {
11
        expectLog("onerror.ignore","");
13
        expectLog("uri", "Hello World");
12
    
14
    
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