void testEchoToBadFile() { expectBuildExceptionContaining( "testEchoToBadFile", "destfile is a directory", "destfile is a directory!" ); } public void testEchoToBadFileFail() { expectBuildExceptionContaining( "testEchoToBadFileFail", "destfile is a directory", "destfile is a directory!" ); } public void testEchoToBadFileNoFail() { expectLog( "testEchoToBadFileNoFail", "destfile is a directory!");
void testNoJarNoClassname(){ expectBuildExceptionContaining("testNoJarNoClassname", "parameter validation", "Classname must not be null."); } public 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");
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/EchoPropertiesTest.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 testEchoToBadFile() {
1
void testNoJarNoClassname(){
2
        expectBuildExceptionContaining( "testEchoToBadFile",
2
        expectBuildExceptionContaining("testNoJarNoClassname",
3
            "destfile is a directory", "destfile is a directory!" 
3
            "parameter validation",
4
);
4
            "Classname must not be null.");
5
    }
5
    }
6
    public void testEchoToBadFileFail() {
6
    public void testJarNoFork() {
7
        expectBuildExceptionContaining( "testEchoToBadFileFail",
7
        expectBuildExceptionContaining("test
8
            "destfile is a directory", "destfile is a directory!" 
8
JarNoFork",
9
            "parameter validation",
10
            "Cannot execute a jar in non-forked mode. "
9
);
11
                + "Please set fork='true'. ");
10
    }
12
    }
11
    public void testEchoToBadFileNoFail() {
13
    public void test
12
        expectLog( "testEchoToBadFileNoFail", "destfile is a directory!
14
JarAndClassName() {
15
        expectBuildException("testJarAndClassName",
13
");
16
            "Should not be able to set both classname AND jar");
14
    
17
    
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