File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/optional/depend/ClassFileSetTest.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/optional/depend/DependScanner.java | |||
Method name: void testBasicSet()
|
Method name: void scan()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | String[] scannedFiles = scanner.getIncludedFiles();↵ | 1 | String[] parentFiles = parentScanner.getIncludedFiles();↵ | |
2 | Hashtable files = new Hashtable();↵ | 2 | Hashtable parentSet = new Hashtable();↵ | |
3 | for (int i = 0; i < scannedFiles.length; ++i) {↵ | 3 | for (int i = 0; i < parentFiles.length; ++i) {↵ | |
4 | files.put(scannedFiles[i], scannedFiles[i]);↵ | 4 | parentSet.put(parentFiles[i], parentFiles[i]);↵ | |
5 | } | 5 |
| |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
Number of mapped statements | 4 |
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) | 19.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | String[] scannedFiles = scanner.getIncludedFiles(); |
| 12 | String[] parentFiles = parentScanner.getIncludedFiles(); | ||||||||||||||||
6 | Hashtable files = new Hashtable(); |
| 13 | Hashtable parentSet = new Hashtable(); | ||||||||||||||||
7 | for (int i = 0; i < scannedFiles.length; ++i) |
| 14 | for (int i = 0; i < parentFiles.length; ++i) | ||||||||||||||||
8 | files.put(scannedFiles[i], scannedFiles[i]); |
| 15 | parentSet.put(parentFiles[i], parentFiles[i]); |
Row | Violation |
---|---|
1 | The refactoring of the clones is infeasible, because classes org.apache.tools.ant.types.optional.depend.ClassFileSetTest and org.apache.tools.ant.types.optional.depend.DependScanner do not have a common superclass |