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"); } public void testNested() { expectLog("nested", "A nested element");
void testTaskThatIsntDefined() { expectPropertyUnset("testTaskThatIsntDefined", "testTaskThatIsntDefined"); } public void testTaskThatDoesntReallyExist() { expectPropertyUnset("testTaskThatDoesntReallyExist", "testTaskThatDoesntReallyExist"); } public void testType() { expectPropertySet("testType", "testType"); } public void testPreset() { expectPropertySet("testPreset", "testPreset");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/MacroDefTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/condition/TypeFoundTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testDuplicateAttribute() {
1
void test
2
        expectBuildException(
3
            "duplicate.attribute",
4
            "the attribute text has already been speci
2
TaskThatIsntDefined() {
5
fied");
3
        expectPropertyUnset("testTaskThatIsntDefined", "testTaskThatIsntDefined");
6
    }
4
    }
7
    public void testDuplicateElement() {
5
    public void test
8
        expectBuildException(
9
            "duplicate.element",
10
            "the element text has already been specified
6
TaskThatDoesntReallyExist() {
11
");
7
        expectPropertyUnset("testTaskThatDoesntReallyExist", "testTaskThatDoesntReallyExist");
12
    }
8
    }
13
    public void testUri() {
9
    public void testType() {
14
        expectLog("uri", "Hello World");
10
        expectPropertySet("testType", "testType");
15
    }
11
    }
16
    public void testNested() {
12
    public void testPreset() {
17
        expectLog("nested", "A nested element");
13
        expectPropertySet("testPreset", "testPreset");
18
    
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