void testShortcut() { expectPropertySet("shortcut","shortcut","set"); } public void testUnset() { expectPropertyUnset("dontset","dontset"); } public void testSetValue() { expectPropertySet("setvalue","setvalue","woowoo"); }
void testImplicitNotOptional() { expectSpecificBuildException( "implicit.notoptional", "Missing nested elements for implicit element implicit", "Missing nested elements for implicit element implicit"); } public void testImplicitOptional() { expectLog( "implicit.optional", "Before implicitAfter implicit"); } public void testImplicitExplicit() { expectSpecificBuildException( "implicit.explicit", "Only one element allowed when using implicit elements", "Only one element allowed when using implicit elements"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/ConditionTest.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 testShortcut() {
1
void test
2
        expectPropertySet("shortcut","shortcut","se
2
ImplicitNotOptional() {
3
        expectSpecificBuildException(
4
            "implicit.notoptional",
5
            "Missing nested elements for implicit element implicit",
3
t");
6
            "Missing nested elements for implicit element implicit");
4
    }
7
    }
5
    public void testUnset() {
8
    public void testImplicitOptional() {
6
        expectPropertyUnset("dontset","dontse
9
        expectLog(
7
t");
10
            "implicit.optional", "Before implicitAfter implicit");
8
    }
11
    }
9
    public void testSetValue() {
12
    public void testImplicitExplicit() {
10
        expectPropertySet("setvalue","setvalue","woowoo
13
        expectSpecificBuildException(
14
            "implicit.explicit",
15
            "Only one element allowed when using implicit elements",
11
");
16
            "Only one element allowed when using implicit elements");
12
    }
17
    }
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