public class RExecSubTask { // CheckStyle:VisibilityModifier OFF - bc protected String taskString = ""; // CheckStyle:VisibilityModifier ON /** * Execute the subtask. * @param rexec the client * @throws BuildException always as it is not allowed to instantiate this object */ public void execute(AntRExecClient rexec) throws BuildException { throw new BuildException("Shouldn't be able instantiate a SubTask directly"); } /** * the message as nested text * @param s the nested text */ public void addText(String s) { setString(getProject().replaceProperties(s)); } /** * the message as an attribute * @param s a <code>String</code> value */ public void setString(String s) { taskString += s;
public class TelnetSubTask { // CheckStyle:VisibilityModifier OFF - bc protected String taskString = ""; // CheckStyle:VisibilityModifier ON /** * Execute the subtask. * @param telnet the client * @throws BuildException always as it is not allowed to instantiate this object */ public void execute(AntTelnetClient telnet) throws BuildException { throw new BuildException("Shouldn't be able instantiate a SubTask directly"); } /** * the message as nested text * @param s the nested text */ public void addText(String s) { setString(getProject().replaceProperties(s)); } /** * the message as an attribute * @param s a <code>String</code> value */ public void setString(String s) { taskString += s;
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 RExecSubTask {
1
public class TelnetSubTask {
2
        // CheckStyle:VisibilityModifier OFF - bc
2
        // CheckStyle:VisibilityModifier OFF - bc
3
        protected String taskString = "";
3
        protected String taskString = "";
4
        // CheckStyle:VisibilityModifier ON
4
        // CheckStyle:VisibilityModifier ON
5
        /**
5
        /**
6
         * Execute the subtask.
6
         * Execute the subtask.
7
         * @param rexec the client
7
         * @param telnet the client
8
         * @throws BuildException always as it is not allowed to instantiate this object
8
         * @throws BuildException always as it is not allowed to instantiate this object
9
         */
9
         */
10
        public void execute(AntRExecClient rexec)
10
        public void execute(AntTelnetClient telnet)
11
                throws BuildException {
11
                throws BuildException {
12
            throw new BuildException("Shouldn't be able instantiate a SubTask directly");
12
            throw new BuildException("Shouldn't be able instantiate a SubTask directly");
13
        }
13
        }
14
        /**
14
        /**
15
         *  the message as nested text
15
         *  the message as nested text
16
         * @param s the nested text
16
         * @param s the nested text
17
         */
17
         */
18
        public void addText(String s) {
18
        public void addText(String s) {
19
            setString(getProject().replaceProperties(s));
19
            setString(getProject().replaceProperties(s));
20
        }
20
        }
21
        /**
21
        /**
22
         * the message as an attribute
22
         * the message as an attribute
23
         * @param s a <code>String</code> value
23
         * @param s a <code>String</code> value
24
         */
24
         */
25
        public void setString(String s) {
25
        public void setString(String s) {
26
           taskString += s;
26
           taskString += s;
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