TelnetSubTask createRead() { TelnetSubTask task = (TelnetSubTask) new TelnetRead(); telnetTasks.addElement(task); return task; } /** * Add text to send to the server * A subTask <write> tag was found. Create the object, * Save it in our list, and return it. * @return a write telnet sub task */ public TelnetSubTask createWrite() { TelnetSubTask task = (TelnetSubTask) new TelnetWrite(); telnetTasks.addElement(task); return task;
RExecSubTask createRead() { RExecSubTask task = (RExecSubTask) new RExecRead(); rexecTasks.addElement(task); return task; } /** * Add text to send to the server * A subTask <write> tag was found. Create the object, * Save it in our list, and return it. * @return a write sub task */ public RExecSubTask createWrite() { RExecSubTask task = (RExecSubTask) new RExecWrite(); rexecTasks.addElement(task); return task;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/RExecTask.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
TelnetSubTask createRead() {
1
RExecSubTask createRead() {
2
        TelnetSubTask task = (TelnetSubTask) new TelnetRead();
2
        RExecSubTask task = (RExecSubTask) new RExecRead();
3
        telnetTasks.addElement(task);
3
        rexecTasks.addElement(task);
4
        return task;
4
        return task;
5
    }
5
    }
6
    /**
6
    /**
7
     *  Add text to send to the server
7
     *  Add text to send to the server
8
     *  A subTask <write> tag was found.  Create the object,
8
     *  A subTask <write> tag was found.  Create the object,
9
     *  Save it in our list, and return it.
9
     *  Save it in our list, and return it.
10
     * @return a write telnet sub task
10
     * @return a write sub task
11
     */
11
     */
12
    public TelnetSubTask createWrite() {
12
    public RExecSubTask createWrite() {
13
        TelnetSubTask task = (TelnetSubTask) new TelnetWrite();
13
        RExecSubTask task = (RExecSubTask) new RExecWrite();
14
        telnetTasks.addElement(task);
14
        rexecTasks.addElement(task);
15
        return task;
15
        return task;
16
    
16
    
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