void testContainsDoesnt() { expectPropertyUnset("contains-doesnt","contains-doesnt"); } public void testContainsAnycase() { expectPropertySet("contains-anycase","contains-anycase"); } public void testContainsIncomplete1() { expectSpecificBuildException("contains-incomplete1", "Missing contains attribute", "both string and substring are required in contains");
void testNegation() { expectPropertySet("negation","negation"); } public void testNegationFalse() { expectPropertyUnset("negationfalse","negationfalse"); } public void testNegationIncomplete() { expectSpecificBuildException("negationincomplete", "no conditions in <not>", "You must nest a condition into <not>");
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/ConditionTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testContainsDoesnt() {
1
void testNegation() {
2
        expectPropertyUnset("contains-doesnt","contains-doesnt");
2
        expectPropertySet("negation","negation");
3
    }
3
    }
4
    public void testContainsAnycase() {
4
    public void testNegationFalse() {
5
        expectPropertySet("contains-anycase","contains-anycase");
5
        expectPropertyUnset("negationfalse","negationfalse");
6
    }
6
    }
7
    public void testContainsIncomplete1() {
7
    public void testNegationIncomplete() {
8
        expectSpecificBuildException("contains-incomplete1",
8
        expectSpecificBuildException("negationincomplete",
9
                    "Missing contains attribute",
9
                     
10
                    "both string and substring are required in contains
10
                "no conditions in <not>",
11
");
11
                                     "You must nest a condition into <not>");
12
    
12
    
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