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");
void testFilesmatchIncomplete() { expectSpecificBuildException("filesmatch-incomplete", "Missing file2 attribute", "both file1 and file2 are required in filesmatch"); } public void testFilesmatchOddsizes() { expectPropertyUnset("filesmatch-oddsizes","filesmatch-oddsizes"); } public void testFilesmatchExistence() { expectPropertyUnset("filesmatch-existence", "filesmatch-existence");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/JavaTest.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 testJarNoFork() {
1
void testFilesmatchIncomplete() {
2
        expectBuildExceptionContaining("testJarNoFork",
2
        expectSpecificBuildException
3
            "parameter validation",
4
            "Cannot execute a jar in non-forked mode. "
3
("filesmatch-incomplete",
4
                                     "Missing file2 attribute",
5
                + "Please set fork='true'. ");
5
                                     "both file1 and file2 are required in filesmatch");
6
    }
6
    }
7
    public void testJarAndClassName() {
7
    public void testFilesmatchOddsizes() {
8
        expectBuildException("testJarAndClassName",
8
        expect
9
            "Should not be able to set both classname AND jar");
9
PropertyUnset("filesmatch-oddsizes","filesmatch-oddsizes");
10
    }
10
    }
11
    public void testClassnameAndJar() {
11
    public void test
12
        expectBuildException("testClassnameAndJar",
13
            "Should not be able to set both classname AND jar
12
FilesmatchExistence() {
14
");
13
        expectPropertyUnset("filesmatch-existence", "filesmatch-existence");
15
    
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