log(Commandline.describeCommand(command), Project.MSG_VERBOSE); exe.setCommandline(command); if (redirectorElement != null) { setupRedirector(); redirectorElement.configure(redirector, s[j]); } if (redirectorElement != null || haveExecuted) { // need to reset the stream handler to restart // reading of pipes; // go ahead and do it always w/ nested redirectors exe.setStreamHandler(redirector.createHandler()); } runExecute(exe); haveExecuted = true;
log(Commandline.describeCommand(command), Project.MSG_VERBOSE); exe.setCommandline(command); if (redirectorElement != null) { setupRedirector(); redirectorElement.configure(redirector, name); } if (redirectorElement != null || haveExecuted) { // need to reset the stream handler to restart // reading of pipes; // go ahead and do it always w/ nested redirectors exe.setStreamHandler(redirector.createHandler()); } runExecute(exe); haveExecuted = true;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/ExecuteOn.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/ExecuteOn.java
Method name: void runExec(Execute) Method name: void runExec(Execute)
Number of AST nodes: 9 Number of AST nodes: 9
1
log(Commandline.describeCommand(command),
1
log(Commandline.describeCommand(command),
2
                            Project.MSG_VERBOSE);
2
                            Project.MSG_VERBOSE);
3
                        exe.setCommandline(command);
3
                        exe.setCommandline(command);
4
                        if (redirectorElement != null) {
4
                        if (redirectorElement != null) {
5
                            setupRedirector();
5
                            setupRedirector();
6
                            redirectorElement.configure(redirector, s[j]);
6
                            redirectorElement.configure(redirector, name);
7
                        }
7
                        }
8
                        if (redirectorElement != null || haveExecuted) {
8
                        if (redirectorElement != null || haveExecuted) {
9
                            // need to reset the stream handler to restart
9
                            // need to reset the stream handler to restart
10
                            // reading of pipes;
10
                            // reading of pipes;
11
                            // go ahead and do it always w/ nested redirectors
11
                            // go ahead and do it always w/ nested redirectors
12
                            exe.setStreamHandler(redirector.createHandler());
12
                            exe.setStreamHandler(redirector.createHandler());
13
                        }
13
                        }
14
                        runExecute(exe);
14
                        runExecute(exe);
15
                        haveExecuted = true;
15
                        haveExecuted = true;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.7
Clones locationClones are in the same method
Number of node comparisons36
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)122.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    37
    log(Commandline.describeCommand(command), Project.MSG_VERBOSE);
    72
    log(Commandline.describeCommand(command), Project.MSG_VERBOSE);
    38
    exe.setCommandline(command);
    73
    exe.setCommandline(command);
    39
    if (redirectorElement != null)
    74
    if (redirectorElement != null)
    40
    setupRedirector();
    75
    setupRedirector();
    41
    redirectorElement.configure(redirector, s[j]);
    41
    redirectorElement.configure(redirector, s[j]);
    76
    redirectorElement.configure(redirector, name);
    Differences
    Expression1Expression2Difference
    s[j]nameTYPE_COMPATIBLE_REPLACEMENT
    76
    redirectorElement.configure(redirector, name);
    42
    if (redirectorElement != null || haveExecuted)
    77
    if (redirectorElement != null || haveExecuted)
    43
    exe.setStreamHandler(redirector.createHandler());
    78
    exe.setStreamHandler(redirector.createHandler());
    44
    runExecute(exe);
    79
    runExecute(exe);
    45
    haveExecuted = true;
    80
    haveExecuted = true;
    Precondition Violations (0)
    Row Violation