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/DirectoryScanner.java | |||
Method name: String[] getIncludedDirectories()
|
Method name: String[] getIncludedFiles()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (dirsIncluded == null) {↵ | 1 | if (filesIncluded == null) {↵ | |
2 | throw new IllegalStateException("Must call scan() first");↵ | 2 | throw new IllegalStateException("Must call scan() first");↵ | |
3 | }↵ | 3 | }↵ | |
4 | String[] directories = new String[dirsIncluded.size()];↵ | 4 | String[] files = new String[filesIncluded.size()];↵ | |
5 | dirsIncluded.copyInto(directories);↵ | 5 | filesIncluded.copyInto(files);↵ | |
6 | Arrays.sort(directories);↵ | 6 | Arrays.sort(files);↵ | |
7 | return directories; | 7 | return files; | |
See real code fragment | See real code fragment |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 20 |
Number of mapped statements | 6 |
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.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (dirsIncluded == null) |
| 1 | if (filesIncluded == null) | |||||||||||||
2 | throw new IllegalStateException("Must call scan() first"); | 2 | throw new IllegalStateException("Must call scan() first"); | ||||||||||||||
3 | String[] directories = new String[dirsIncluded.size()]; |
| 3 | String[] files = new String[filesIncluded.size()]; | |||||||||||||
4 | dirsIncluded.copyInto(directories); |
| 4 | filesIncluded.copyInto(files); | |||||||||||||
5 | Arrays.sort(directories); |
| 5 | Arrays.sort(files); | |||||||||||||
6 | return directories; |
| 6 | return files; |
Row | Violation |
---|