ftp.setFileType(org.apache.commons.net.ftp.FTP.ASCII_FILE_TYPE);
if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) {
throw new BuildException("could not set transfer type: "
+ ftp.getReplyString());
}
ftp.setFileType(org.apache.commons.net.ftp.FTP.IMAGE_FILE_TYPE);
if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) {
throw new BuildException("could not set transfer type: "
+ ftp.getReplyString());
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/FTP.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/FTP.java
|
Method name: void execute()
|
|
Method name: void execute()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | ftp.setFileType(org.apache.commons.net.ftp.FTP.ASCII_FILE_TYPE);↵ | | 1 | ftp.setFileType(org.apache.commons.net.ftp.FTP.IMAGE_FILE_TYPE);↵
|
2 | if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) {↵ | | 2 | if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) {↵
|
3 | throw new BuildException("could not set transfer type: "↵ | | 3 | throw new BuildException("could not set transfer type: "↵
|
4 | + ftp.getReplyString());↵ | | 4 | + ftp.getReplyString());↵
|
5 | } | | 5 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
20 | ftp.setFileType(org.apache.commons.net.ftp.FTP.ASCII_FILE_TYPE); | | 17 | ftp.setFileType(org.apache.commons.net.ftp.FTP.IMAGE_FILE_TYPE); |
21 | if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) | | 18 | if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) |
22 | throw new BuildException("could not set transfer type: " + ftp.getReplyString()); | | 19 | throw new BuildException("could not set transfer type: " + ftp.getReplyString()); |
Precondition Violations (0)
Row |
Violation |