String s = "could not delete file: " + ftp.getReplyString();
if (skipFailedTransfers) {
log(s, Project.MSG_WARN);
skipped++;
} else {
throw new BuildException(s);
}
String s = "could not get file: " + ftp.getReplyString();
if (skipFailedTransfers) {
log(s, Project.MSG_WARN);
skipped++;
} else {
throw new BuildException(s);
}
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 delFile(FTPClient, String)
|
|
Method name: void getFile(FTPClient, String, String)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | String s = "could not delete file: " + ftp.getReplyString();↵ | | 1 | String s = "could not get file: " + ftp.getReplyString();↵
|
|
2 | if (skipFailedTransfers) {↵ | | 2 | if (skipFailedTransfers) {↵
|
3 | log(s, Project.MSG_WARN);↵ | | 3 | log(s, Project.MSG_WARN);↵
|
4 | skipped++;↵ | | 4 | skipped++;↵
|
5 | } else {↵ | | 5 | } else {↵
|
6 | throw new BuildException(s);↵ | | 6 | throw new BuildException(s);↵
|
7 | } | | 7 | }
|
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 18 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | String s = "could not delete file: " + ftp.getReplyString(); | | 14 | String s = "could not get file: " + ftp.getReplyString(); |
5 | if (skipFailedTransfers) | | 15 | if (skipFailedTransfers) |
6 | log(s, Project.MSG_WARN); | | 16 | log(s, Project.MSG_WARN); |
7 | | | 17 | |
| | | | |
8 | throw new BuildException(s); | | 18 | throw new BuildException(s); |
Precondition Violations (0)
Row |
Violation |