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