File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Sync.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/extension/LibraryDisplayer.java | |||
Method name: int[] removeOrphanFiles(Set, File)
|
Method name: void displayLibrary(File, Manifest)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (s.length > 0) {↵ | 1 | if (0 != specifications.length) {↵ | |
2 | NoneSelector ns = new NoneSelector();↵ | 2 | ↵ | |
3 | ↵ | 3 | System.out.println("Specifications Supported By Library:");↵ | |
4 | for (int i = 0; i < s.length; i++) {↵ | 4 | for (int i = 0; i < specifications.length; i++) {↵ | |
5 | ns.appendSelector(s[i]);↵ | 5 | ↵ | |
6 | }↵ | |||
7 | fs.appendSelector(ns);↵ | |||
8 | ↵ | 6 | final Specification specification = specifications[ i ];↵ | |
7 | displaySpecification(specification);↵ | |||
8 | }↵ | |||
9 | } | 9 |
| |
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 | 8 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.5 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16 | NoneSelector ns = new NoneSelector(); | | ||||||||||||||||
| 28 | System.out.println("Specifications Supported By Library:"); | ||||||||||||||||
17 | for (int i = 0; i < s.length; i++) |
| 29 | for (int i = 0; i < specifications.length; i++) | ||||||||||||||
18 | ns.appendSelector(s[i]); |
| | |||||||||||||||
|
| 30 | final Specification specification = specifications[i]; | |||||||||||||||
| 31 | displaySpecification(specification); |
Row | Violation |
---|---|
1 | Type org.apache.tools.ant.types.selectors.FileSelector[] of variable s does not match with type org.apache.tools.ant.taskdefs.optional.extension.Specification[] of variable specifications |
2 | Unmatched statement ns.appendSelector(s[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement final Specification specification=specifications[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |