public void testNoRedirect() { executeTarget("no-redirect"); if (getProject().getProperty("test.can.run") == null) { return; } assertEquals("unexpected log content", getProject().getProperty("ant.file") + " out" + getProject().getProperty("ant.file") + " err", getLog()); } public void testRedirect1() throws IOException { executeTarget("redirect1"); if (getProject().getProperty("test.can.run") == null) { return;
public void testRedirector2() throws IOException { executeTarget("redirector2"); if (getProject().getProperty("test.can.run") == null) { return; } assertEquals("unexpected output", getProject().getProperty("ant.file") + " out\n" + getProject().getProperty("ant.file") + " err\n", getFileString("redirector.out")); } public void testRedirector3() throws IOException { executeTarget("redirector3"); if (getProject().getProperty("test.can.run") == null) { return;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/ExecTaskTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/ExecTaskTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void testNoRedirect() {
1
public void testRedirector2() throws IOException {
2
        executeTarget("no-redirect");
2
        executeTarget("redirector2");
3
        if (getProject().getProperty("test.can.run") == null) {
3
        if (getProject().getProperty("test.can.run") == null) {
4
            return;
4
            return;
5
        }
5
        }
6
        assertEquals("unexpected log content",
6
        assertEquals("unexpected output",
7
            getProject().getProperty("ant.file") + " out"
7
            getProject().getProperty("ant.file") + " out\n"
8
            + getProject().getProperty("ant.file") + " err", getLog(
8
            + getProject().getProperty("ant.file") + " err\n",
9
));
9
            getFileString("redirector.out"));
10
    }
10
    }
11
    public void testRedirect1() throws IOException {
11
    public void testRedirector3() throws IOException {
12
        executeTarget("redirect1");
12
        executeTarget("redirector3");
13
        if (getProject().getProperty("test.can.run") == null) {
13
        if (getProject().getProperty("test.can.run") == null) {
14
            return;
14
            return;
15
        
15
        
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