void testNoResourceOnErrorFailAll(){ this.expectBuildExceptionContaining("noresourcefailall","the requested resource does not exist","Could not load definitions from resource "); } public void testNoResourceOnErrorFail(){ expectLogContaining("noresourcefail","Could not load definitions from resource "); } public void testNoResourceOnErrorNotFail(){ expectLogContaining("noresourcenotfail","Could not load definitions from resource ");
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/TypedefTest.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 testNoResourceOnErrorFailAll(){
1
void testJarNoFork() {
2
    		this.expectBuildExceptionContaining("noresourcefailall","the requested resource does not exist","Could not load definitions from resource
2
        expectBuildExceptionContaining("testJarNoFork",
3
            "parameter validation",
4
            "Cannot execute a jar in non-forked mode. "
3
 ");
5
                + "Please set fork='true'. ");
4
    }
6
    }
5
    
6
    public void testNoResourceOnErrorFail(){
7
    public void testJarAndClassName() {
7
		expectLogContaining("noresourcefail","Could not load definitions from resource 
8
        expectBuildException("testJarAndClassName",
8
");
9
            "Should not be able to set both classname AND jar");
9
    }
10
    }
10
    
11
    public void testNoResourceOnErrorNotFail(){
11
    public void testClassnameAndJar() {
12
    		expectLogContaining("noresourcenotfail","Could not load definitions from resource 
12
        expectBuildException("testClassnameAndJar",
13
");
13
            "Should not be able to set both classname AND jar");
14
    
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