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"); } /** * A unit test for JUnit */ public void testFailOnError() throws BuildException { expectPropertyUnset("testFailOnError","testFailOnError"); }
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"); } public void testFilesmatchOddsizes() { expectPropertyUnset("filesmatch-oddsizes","filesmatch-oddsizes"); }
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",
3
  
2
Orboth() {
3
        expectPropertySet("orboth","orboth");
4
    
4
    }
5
          "source file not defined");
5
    
6
    }
7
    /**
8
     * A unit test for JUnit
9
 
6
public void testFilesmatchIdentical() {
7
        expectPropertySet("filesmatch-identical","filesmatch-identical");
10
    */
8
    }
11
    public void testNoPropertyDefined() {
9
    public void testFilesmatchIncomplete() {
12
        expectBuildException("testNoPropertyDefined",
10
        expectSpecificBuildException("
13
                "output property not defined");
14
    }
15
    /**
16
     * A unit test for JUnit
11
filesmatch-incomplete",
12
                                     "Missing file2 attribute",
17
     */
13
     
18
    public void testNoSourcefilefound() {
14
    
19
        expectBuildExceptionContaining("testNoSourcefilefound",
20
                "File not found", " doesn't exist");
15
                            "
21
    }
22
    /**
23
     * A unit test for JUnit
24
     */
16
both file1 and file2 are required in filesmatch");
17
    }
25
    public void testFailOnError()
18
    public void testFil
26
            throws BuildException {
27
        expectPropertyUnset("testFailOnError","testFailOnError
19
esmatchOddsizes() {
28
");
20
        expectPropertyUnset("filesmatch-oddsizes","filesmatch-oddsizes");
29
    }
21
    }
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