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: int transferFiles(FTPClient, FileSet)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | RetryHandler h = new RetryHandler(this.retriesAllowed, this);↵ | 1 | for (int i = dsfiles.length - 1; i >= 0; i--) {↵ | |
2 | final FTPClient lftp = ftp;↵ | 2 | final String dsfile = dsfiles[i];↵ | |
3 | executeRetryable(h, new Retryable() {↵ | 3 | executeRetryable(h, new Retryable() {↵ | |
4 | public void execute() throws IOException {↵ | 4 | public void execute() throws IOException {↵ | |
5 | doSiteCommand(lftp, FTP.this.siteCommand);↵ | 5 | rmDir(ftp, dsfile);↵ | |
6 | }↵ | 6 | }↵ | |
7 | }, "Site Command: " + this.siteCommand); | 7 | }, dsfile);↵ | |
8 |
| |||
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 6 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 29 | final String dsfile = dsfiles[i]; | |||||||||||||||||||||||
41 | RetryHandler h = new RetryHandler(this.retriesAllowed, this); | | ||||||||||||||||||||||||
42 | final FTPClient lftp = ftp; | | ||||||||||||||||||||||||
43 | executeRetryable(h, new Retryable() {...}, "Site Command: " + this.siteCommand); |
| 30 | executeRetryable(h, new Retryable() {...}, dsfile); |
Row | Violation |
---|---|
1 | Unmatched statement final String dsfile=dsfiles[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression rmDir(ftp,dsfile) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression doSiteCommand(lftp,FTP.this.siteCommand) is a void method call, and thus it cannot be parameterized |
4 | Expression rmDir(ftp,dsfile) is a void method call, and thus it cannot be parameterized |