void testNegationFalse() { expectPropertyUnset("negationfalse","negationfalse"); } public void testNegationIncomplete() { expectSpecificBuildException("negationincomplete", "no conditions in <not>", "You must nest a condition into <not>"); } public void testAnd() { expectPropertySet("and","and");
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 testNegationFalse() {
1
void testNoPropertyDefined() {
2
        expectPropertyUnset("negationfalse","negationfalse");
2
        expect
3
    }
3
BuildException("testNoPropertyDefined",
4
                "output property not defined");
5
    }
6
    /**
7
     * A unit test for JUnit
8
     */
4
    public void testNegationIncomplete() {
9
    public void testNoSourcefilefound() {
5
        expectSpecificBuildException("negationincomplete",
10
        expectBuildException
6
             
11
Containing("testNoSourcefilefound",
7
                        "no conditions in <not>",
12
                "File not found", " doesn't exist");
8
    
13
    }
9
    
14
    /**
10
                   
15
     * A unit test for JUnit
11
     
16
     */
12
     "You must nest a condition into <not>");
17
    public void testFailOnError()
13
    }
18
    
14
    public void testAnd() {
19
        throws BuildException {
15
        expectPropertySet("and","and");
20
        expectPropertyUnset("testFailOnError","testFailOnError");
16
    
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