public class RExecRead extends RExecSubTask { private Integer timeout = null; /** * Execute the read exec task. * @param rexec the task to use * @throws BuildException on error */ public void execute(AntRExecClient rexec) throws BuildException { rexec.waitForString(taskString, timeout); } /** * a timeout value that overrides any task wide timeout. * @param i an <code>Integer</code> value */ public void setTimeout(Integer i) { this.timeout = i; } /** * Sets the default timeout if none has been set already * @param defaultTimeout an <code>Integer</code> value * @ant.attribute ignore="true" */ public void setDefaultTimeout(Integer defaultTimeout) { if (timeout == null) { timeout = defaultTimeout;
public class TelnetRead extends TelnetSubTask { private Integer timeout = null; /** * Execute the read task. * @param telnet the task to use * @throws BuildException on error */ public void execute(AntTelnetClient telnet) throws BuildException { telnet.waitForString(taskString, timeout); } /** * a timeout value that overrides any task wide timeout. * @param i an <code>Integer</code> value */ public void setTimeout(Integer i) { this.timeout = i; } /** * Sets the default timeout if none has been set already * @param defaultTimeout an <code>Integer</code> value * @ant.attribute ignore="true" */ public void setDefaultTimeout(Integer defaultTimeout) { if (timeout == null) { timeout = defaultTimeout;
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 RExecRead extends RExecSubTask {
1
public class TelnetRead extends TelnetSubTask {
2
        private Integer timeout = null;
2
        private Integer timeout = null;
3
        /**
3
        /**
4
         * Execute the read exec task.
4
         * Execute the read 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.waitForString(taskString, timeout);
10
            telnet.waitForString(taskString, timeout);
11
        }
11
        }
12
        /**
12
        /**
13
         *  a timeout value that overrides any task wide timeout.
13
         *  a timeout value that overrides any task wide timeout.
14
         * @param i an <code>Integer</code> value
14
         * @param i an <code>Integer</code> value
15
         */
15
         */
16
        public void setTimeout(Integer i) {
16
        public void setTimeout(Integer i) {
17
           this.timeout = i;
17
           this.timeout = i;
18
        }
18
        }
19
        /**
19
        /**
20
         * Sets the default timeout if none has been set already
20
         * Sets the default timeout if none has been set already
21
         * @param defaultTimeout an <code>Integer</code> value
21
         * @param defaultTimeout an <code>Integer</code> value
22
         * @ant.attribute ignore="true"
22
         * @ant.attribute ignore="true"
23
         */
23
         */
24
        public void setDefaultTimeout(Integer defaultTimeout) {
24
        public void setDefaultTimeout(Integer defaultTimeout) {
25
           if (timeout == null) {
25
           if (timeout == null) {
26
              timeout = defaultTimeout;
26
              timeout = defaultTimeout;
27
           
27
           
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