File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java | |||
Method name: void execute()
|
Method name: void doSingleTransfer()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | try {↵ | 1 | try {↵ | |
2 | // get I/O streams for remote scp↵ | |||
3 | OutputStream out = channel.getOutputStream();↵ | 2 | OutputStream out = channel.getOutputStream();↵ | |
4 | InputStream in = channel.getInputStream();↵ | 3 | InputStream in = channel.getInputStream();↵ | |
5 | channel.connect();↵ | 4 | channel.connect();↵ | |
6 | sendAck(out);↵ | 5 | waitForAck(in);↵ | |
7 | startRemoteCpProtocol(in, out, localFile);↵ | 6 | sendFileToRemote(localFile, in, out);↵ | |
8 | } finally {↵ | 7 | } finally {↵ | |
9 | if (channel != null) {↵ | 8 | if (channel != null) {↵ | |
10 | channel.disconnect();↵ | 9 | channel.disconnect();↵ | |
11 | }↵ | 10 | }↵ | |
12 | } | 11 |
| |
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 36 |
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) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | try | 3 | try | ||||||||||||||||||||||
7 | OutputStream out = channel.getOutputStream(); | 4 | OutputStream out = channel.getOutputStream(); | ||||||||||||||||||||||
8 | InputStream in = channel.getInputStream(); | 5 | InputStream in = channel.getInputStream(); | ||||||||||||||||||||||
9 | channel.connect(); | 6 | channel.connect(); | ||||||||||||||||||||||
10 | sendAck(out); |
| 8 | sendFileToRemote(localFile, in, out); | |||||||||||||||||||||
11 | startRemoteCpProtocol(in, out, localFile); |
| 7 | waitForAck(in); |
Row | Violation |
---|---|
1 | Expression sendAck(out) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression sendFileToRemote(localFile,in,out) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression sendAck(out) is a void method call, and thus it cannot be parameterized |
4 | Expression sendFileToRemote(localFile,in,out) is a void method call, and thus it cannot be parameterized |
5 | Expression sendAck(out) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression sendFileToRemote(localFile,in,out) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression sendAck(out) is a void method call, and thus it cannot be parameterized |
8 | Expression sendFileToRemote(localFile,in,out) is a void method call, and thus it cannot be parameterized |
9 | Expression startRemoteCpProtocol(in,out,localFile) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression waitForAck(in) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression startRemoteCpProtocol(in,out,localFile) is a void method call, and thus it cannot be parameterized |
12 | Expression waitForAck(in) is a void method call, and thus it cannot be parameterized |
13 | Expression startRemoteCpProtocol(in,out,localFile) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression waitForAck(in) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression startRemoteCpProtocol(in,out,localFile) is a void method call, and thus it cannot be parameterized |
16 | Expression waitForAck(in) is a void method call, and thus it cannot be parameterized |