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: void execute()
|
Method name: void execute()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (server == null) {↵ | 1 | if (server == null) {↵ | |
2 | throw new BuildException("No Server Specified");↵ | 2 | throw new BuildException("No Server Specified");↵ | |
3 | }↵ | 3 | }↵ | |
4 | /** A userid and password must appear together↵ | 4 | /** A userid and password must appear together↵ | |
5 | * if they appear. They are not required.↵ | 5 | * if they appear. They are not required.↵ | |
6 | */↵ | 6 | */↵ | |
7 | if (userid == null && password != null) {↵ | 7 | if (userid == null && password != null) {↵ | |
8 | throw new BuildException("No Userid Specified");↵ | 8 | throw new BuildException("No Userid Specified");↵ | |
9 | }↵ | 9 | }↵ | |
10 | if (password == null && userid != null) {↵ | 10 | if (password == null && userid != null) {↵ | |
11 | throw new BuildException("No Password Specified");↵ | 11 | throw new BuildException("No Password Specified");↵ | |
12 | }↵ | 12 | }↵ | |
13 | /** Create the telnet client object */↵ | 13 | /** Create the telnet client object */↵ | |
14 | AntRExecClient rexec = null; | 14 | AntTelnetClient telnet = null; | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 22 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (server == null) | 1 | if (server == null) | |||||||||||||||||
2 | throw new BuildException("No Server Specified"); | 2 | throw new BuildException("No Server Specified"); | |||||||||||||||||
3 | if (userid == null && password != null) | 3 | if (userid == null && password != null) | |||||||||||||||||
4 | throw new BuildException("No Userid Specified"); | 4 | throw new BuildException("No Userid Specified"); | |||||||||||||||||
5 | if (password == null && userid != null) | 5 | if (password == null && userid != null) | |||||||||||||||||
6 | throw new BuildException("No Password Specified"); | 6 | throw new BuildException("No Password Specified"); | |||||||||||||||||
7 | AntRExecClient rexec = null; |
| 7 | AntTelnetClient telnet = null; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variable rexec with type org.apache.tools.ant.taskdefs.optional.net.RExecTask.AntRExecClient , while Clone fragment #2 returns variable telnet with type org.apache.tools.ant.taskdefs.optional.net.TelnetTask.AntTelnetClient |