void testTaskThatIsntDefined() { expectPropertyUnset("testTaskThatIsntDefined", "testTaskThatIsntDefined"); } public void testTaskThatDoesntReallyExist() { expectPropertyUnset("testTaskThatDoesntReallyExist", "testTaskThatDoesntReallyExist"); } public void testType() { expectPropertySet("testType", "testType"); } public void testPreset() { expectPropertySet("testPreset", "testPreset"); }
void testDuplicateTextName() { expectBuildException( "duplicatetextname", "the name \"text\" is already used as an attribute"); } public void testDuplicateTextName2() { expectBuildException( "duplicatetextname2", "the attribute name \"text\" has already been used by the text element"); } public void testEscape() { expectLog( "escape", "a@b or a@b is avalue@bvalue"); } public void testAttributeDescription() { expectLog( "attribute.description", "description is hello world"); }
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/MacroDefTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testTaskThatIsntDefined() {
1
void test
2
        expectPropertyUnset("testTaskThatIsntDefined", "testTaskThatIsntDefined
2
DuplicateTextName() {
3
        expectBuildException(
4
            "duplicatetextname",
3
");
5
            "the name \"text\" is already used as an attribute");
4
    }
6
    }
5
    public void testTaskThatDoesntReallyExist() {
7
    public void test
6
        expectPropertyUnset("testTaskThatDoesntReallyExist", "testTaskThatDoesntReallyExis
8
DuplicateTextName2() {
9
        expectBuildException(
10
            "duplicatetextname2",
7
t");
11
            "the attribute name \"text\" has already been used by the text element");
8
    }
12
    }
9
    public void testType() {
13
    public void testEscape() {
10
        expectPropertySet("testType", "testTyp
14
        expectLog(
15
            "escape",
11
e");
16
            "a@b or a@b is avalue@bvalue");
12
    }
17
    }
13
    public void testPreset() {
18
    public void test
14
        expectPropertySet("testPreset",
19
AttributeDescription() {
20
        expectLog(
21
            "attribute.description",
15
 "testPreset");
22
            "description is hello world");
16
    }
23
    }
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