int rc = ftp.getReplyCode();
if (!(ignoreNoncriticalErrors
&& (rc == FTPReply.CODE_550 || rc == FTPReply.CODE_553
|| rc == CODE_521))) {
throw new BuildException("could not create directory: "
+ ftp.getReplyString());
}
int rc = ftp.getReplyCode();
if (!(ignoreNoncriticalErrors
&& (rc == FTPReply.CODE_550 || rc == FTPReply.CODE_553 || rc == CODE_521))) {
throw new BuildException("could not create directory: "
+ 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 makeRemoteDir(FTPClient, String)
|
|
Method name: void handleMkDirFailure(FTPClient)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | int rc = ftp.getReplyCode();↵ | | 1 | int rc = ftp.getReplyCode();↵
|
2 | if (!(ignoreNoncriticalErrors↵ | | 2 | if (!(ignoreNoncriticalErrors↵
|
3 | && (rc == FTPReply.CODE_550 || rc == FTPReply.CODE_553↵ | | 3 | && (rc == FTPReply.CODE_550 || rc == FTPReply.CODE_553↵
|
4 | || rc == CODE_521))) {↵ | | 4 | || rc == CODE_521))) {↵
|
5 | throw new BuildException("could not create directory: "↵ | | 5 | throw new BuildException("could not create directory: "↵
|
6 | + ftp.getReplyString());↵ | | 6 | + ftp.getReplyString());↵
|
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.6 |
Clones location | Clones are declared in the same class |
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) | 0.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
13 | int rc = ftp.getReplyCode(); | | 1 | int rc = ftp.getReplyCode(); |
14 | if (!(ignoreNoncriticalErrors && (rc == FTPReply.CODE_550 || rc == FTPReply.CODE_553 || rc == CODE_521))) | | 2 | if (!(ignoreNoncriticalErrors && (rc == FTPReply.CODE_550 || rc == FTPReply.CODE_553 || rc == CODE_521))) |
15 | throw new BuildException("could not create directory: " + ftp.getReplyString()); | | 3 | throw new BuildException("could not create directory: " + ftp.getReplyString()); |
Precondition Violations (0)
Row |
Violation |