void testNoSourcefileDefined() { expectBuildException("testNoSourcefileDefined", "source file not defined"); } /** * A unit test for JUnit */ public void testNoPropertyDefined() { expectBuildException("testNoPropertyDefined", "output property not defined"); } /** * A unit test for JUnit */ public void testNoSourcefilefound() { expectBuildExceptionContaining("testNoSourcefilefound", "File not found", " doesn't exist");
void testOrboth() { expectPropertySet("orboth","orboth"); } public void testFilesmatchIdentical() { expectPropertySet("filesmatch-identical","filesmatch-identical"); } public void testFilesmatchIncomplete() { expectSpecificBuildException("filesmatch-incomplete", "Missing file2 attribute", "both file1 and file2 are required in filesmatch");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/LoadFileTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/ConditionTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testNoSourcefileDefined() {
1
void test
2
        expectBuildException("testNoSourcefileDefined",
2
Orboth() {
3
        expectPropertySet("orboth","orboth");
3
    
4
    }
4
            "source file not defined");
5
    
5
    }
6
    /**
7
     * A unit test for JUnit
6
public void testFilesmatchIdentical() {
7
        expectPropertySet("filesmatch-identical","filesmatch-identical");
8
     */
8
    }
9
    public void testNoPropertyDefined() {
9
    public void testFilesmatchIncomplete() {
10
        expectBuildException("testNoPropertyDefined",
10
        expectSpecificBuildException("
11
                "output property not defined");
12
    }
13
    /**
14
     * A unit test for JUnit
11
filesmatch-incomplete",
12
                                     "Missing file2 attribute",
15
     */
13
     
16
    public void testNoSourcefilefound() {
14
    
17
        expectBuildExceptionContaining("testNoSourcefilefound",
18
                "File not found", " doesn't exist");
15
                            "both file1 and file2 are required in filesmatch");
19
    
16
    
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