void testUndefined() { expectBuildExceptionContaining("testUndefined","left out the name attribute", "No type specified"); } public void testTaskThatIsntDefined() { expectPropertyUnset("testTaskThatIsntDefined", "testTaskThatIsntDefined"); } public void testTaskThatDoesntReallyExist() { expectPropertyUnset("testTaskThatDoesntReallyExist", "testTaskThatDoesntReallyExist");
void testJarNoFork() { expectBuildExceptionContaining("testJarNoFork", "parameter validation", "Cannot execute a jar in non-forked mode. " + "Please set fork='true'. "); } public void testJarAndClassName() { expectBuildException("testJarAndClassName", "Should not be able to set both classname AND jar"); } public void testClassnameAndJar() { expectBuildException("testClassnameAndJar", "Should not be able to set both classname AND jar");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/condition/TypeFoundTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/JavaTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testUndefined() {
1
void testJarNoFork() {
2
        expectBuildExceptionContaining("testUndefined","left out the name attribute", "No type specified
2
        expectBuildExceptionContaining("testJarNoFork",
3
            "parameter validation",
4
            "Cannot execute a jar in non-forked mode. "
3
");
5
                + "Please set fork='true'. ");
4
    }
6
    }
5
    public void testTaskThatIsntDefined() {
7
    public void testJarAndClassName() {
6
        expectPropertyUnset("testTaskThatIsntDefined", "testTaskThatIsntDefined
8
        expectBuildException("testJarAndClassName",
7
");
9
            "Should not be able to set both classname AND jar");
8
    }
10
    }
9
    public void testTaskThatDoesntReallyExist() {
11
    public void testClassnameAndJar() {
10
        expectPropertyUnset("testTaskThatDoesntReallyExist", "testTaskThatDoesntReallyExist
12
        expectBuildException("testClassnameAndJar",
11
");
13
            "Should not be able to set both classname AND jar");
12
    
14
    
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