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 login(AntRExecClient)
|
Method name: void login(AntTelnetClient)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (addCarriageReturn) {↵ | 1 | if (addCarriageReturn) {↵ | |
2 | rexec.sendString("\n", true);↵ | 2 | telnet.sendString("\n", true);↵ | |
3 | }↵ | 3 | }↵ | |
4 | rexec.waitForString("ogin:");↵ | 4 | telnet.waitForString("ogin:");↵ | |
5 | rexec.sendString(userid, true);↵ | 5 | telnet.sendString(userid, true);↵ | |
6 | rexec.waitForString("assword:");↵ | 6 | telnet.waitForString("assword:");↵ | |
7 | rexec.sendString(password, false); | 7 | telnet.sendString(password, false); | |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 20 |
Number of mapped statements | 6 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (addCarriageReturn) | 1 | if (addCarriageReturn) | |||||||||||||||
2 | rexec.sendString("\n", true); |
| 2 | telnet.sendString("\n", true); | ||||||||||||||
3 | rexec.waitForString("ogin:"); |
| 3 | telnet.waitForString("ogin:"); | ||||||||||||||
4 | rexec.sendString(userid, true); |
| 4 | telnet.sendString(userid, true); | ||||||||||||||
5 | rexec.waitForString("assword:"); |
| 5 | telnet.waitForString("assword:"); | ||||||||||||||
6 | rexec.sendString(password, false); |
| 6 | telnet.sendString(password, false); |
Row | Violation |
---|---|
1 | Expression rexec cannot be unified with expression telnet , because common superclass org.apache.commons.net.SocketClient does not declare member(s) public void sendString(java.lang.String, boolean) |
2 | Expression rexec cannot be unified with expression telnet , because common superclass org.apache.commons.net.SocketClient does not declare member(s) public void waitForString(java.lang.String) |
3 | Expression rexec cannot be unified with expression telnet , because common superclass org.apache.commons.net.SocketClient does not declare member(s) public void sendString(java.lang.String, boolean) |
4 | Expression rexec cannot be unified with expression telnet , because common superclass org.apache.commons.net.SocketClient does not declare member(s) public void waitForString(java.lang.String) |
5 | Expression rexec cannot be unified with expression telnet , because common superclass org.apache.commons.net.SocketClient does not declare member(s) public void sendString(java.lang.String, boolean) |