public class RExecWrite extends RExecSubTask { private boolean echoString = true; /** * Execute the write exec task. * @param rexec the task to use * @throws BuildException on error */ public void execute(AntRExecClient rexec) throws BuildException { rexec.sendString(taskString, echoString); } /** * Whether or not the message should be echoed to the log. * Defaults to <code>true</code>. * @param b a <code>boolean</code> value */ public void setEcho(boolean b) { echoString = b;
public class TelnetWrite extends TelnetSubTask { private boolean echoString = true; /** * Execute the write task. * @param telnet the task to use * @throws BuildException on error */ public void execute(AntTelnetClient telnet) throws BuildException { telnet.sendString(taskString, echoString); } /** * Whether or not the message should be echoed to the log. * Defaults to <code>true</code>. * @param b a <code>boolean</code> value */ public void setEcho(boolean b) { echoString = b;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/RExecTask.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class RExecWrite extends RExecSubTask {
1
public class TelnetWrite extends TelnetSubTask {
2
        private boolean echoString = true;
2
        private boolean echoString = true;
3
        /**
3
        /**
4
         * Execute the write exec task.
4
         * Execute the write task.
5
         * @param rexec the task to use
5
         * @param telnet the task to use
6
         * @throws BuildException on error
6
         * @throws BuildException on error
7
         */
7
         */
8
        public void execute(AntRExecClient rexec)
8
        public void execute(AntTelnetClient telnet)
9
               throws BuildException {
9
               throws BuildException {
10
           rexec.sendString(taskString, echoString);
10
           telnet.sendString(taskString, echoString);
11
        }
11
        }
12
        /**
12
        /**
13
         * Whether or not the message should be echoed to the log.
13
         * Whether or not the message should be echoed to the log.
14
         * Defaults to <code>true</code>.
14
         * Defaults to <code>true</code>.
15
         * @param b a <code>boolean</code> value
15
         * @param b a <code>boolean</code> value
16
         */
16
         */
17
        public void setEcho(boolean b) {
17
        public void setEcho(boolean b) {
18
           echoString = b;
18
           echoString = b;
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