File path: /apache-ant-1.7.0/src/org/apache/tools/ant/DirectoryScanner.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/FTP.java | |||
Method name: void checkIncludePatterns()
|
Method name: void checkIncludePatterns()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (isIncluded(currentelement)↵ | 1 | if (isIncluded(currentelement)↵ | |
2 | && currentelement.length() > 0) {↵ | 2 | && currentelement.length() > 0) {↵ | |
3 | accountForIncludedDir(currentelement, myfile, true);↵ | 3 | accountForIncludedDir(currentelement, myfile, true);↵ | |
4 | } else {↵ | 4 | } else {↵ | |
5 | if (currentelement.length() > 0) {↵ | 5 | if (currentelement.length() > 0) {↵ | |
6 | if (currentelement.charAt(currentelement↵ | 6 | if (currentelement.charAt(currentelement↵ | |
7 | .length() - 1)↵ | 7 | .length() - 1)↵ | |
8 | != File.separatorChar) {↵ | 8 | != File.separatorChar) {↵ | |
9 | currentelement =↵ | 9 | currentelement =↵ | |
10 | currentelement + File.separatorChar;↵ | 10 | currentelement + File.separatorChar;↵ | |
11 | }↵ | 11 | ↵ | |
12 | }↵ | |||
12 | }↵ | 13 | }↵ | |
13 | scandir(myfile, currentelement, true);↵ | 14 | scandir(myfile.getAbsolutePath(), currentelement, true);↵ | |
14 | } | 15 | } | |
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.8 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 16 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 31.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
39 | if (isIncluded(currentelement) && currentelement.length() > 0) | 33 | if (isIncluded(currentelement) && currentelement.length() > 0) | ||||||||||||
40 | accountForIncludedDir(currentelement, myfile, true); |
| 34 | accountForIncludedDir(currentelement, myfile, true); | |||||||||||
else | else | ||||||||||||||
41 | if (currentelement.length() > 0) | 35 | if (currentelement.length() > 0) | ||||||||||||
42 | if (currentelement.charAt(currentelement.length() - 1) != File.separatorChar) | 36 | if (currentelement.charAt(currentelement.length() - 1) != File.separatorChar) | ||||||||||||
43 | currentelement = currentelement + File.separatorChar; | 37 | currentelement = currentelement + File.separatorChar; | ||||||||||||
|
| 38 | scandir(myfile.getAbsolutePath(), currentelement, true); | ||||||||||||
44 | scandir(myfile, currentelement, true); |
| |
Row | Violation |
---|---|
1 | Type java.io.File of variable myfile does not match with type org.apache.tools.ant.taskdefs.optional.net.FTP.FTPDirectoryScanner.AntFTPFile of variable myfile |
2 | Unmatched statement scandir(myfile.getAbsolutePath(),currentelement,true); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement scandir(myfile,currentelement,true); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |