File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/CompositeMapper.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/PropertySet.java | |||
Method name: String[] mapFileName(String)
|
Method name: Properties getProperties()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (mapper != null) {↵ | 1 | if (m != null) {↵ | |
2 | String[] mapped = mapper↵ | 2 | //map the names↵ | |
3 | .mapFileName(sourceFileName);↵ | 3 | String[] newname = m.mapFileName(name);↵ | |
4 | if (mapped != null) {↵ | 4 | if (newname != null) {↵ | |
5 | results.addAll(Arrays.asList(mapped));↵ | 5 | ↵ | |
6 | name = newname[0];↵ | |||
6 | }↵ | 7 | }↵ | |
7 | } | 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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 10 |
Number of mapped statements | 3 |
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) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | if (mapper != null) |
| 31 | if (m != null) | ||||||||||||||||
6 | String[] mapped = mapper.mapFileName(sourceFileName); |
| 32 | String[] newname = m.mapFileName(name); | ||||||||||||||||
7 | if (mapped != null) |
| 33 | if (newname != null) | ||||||||||||||||
8 | results.addAll(Arrays.asList(mapped)); |
| | |||||||||||||||||
|
| 34 | name = newname[0]; |
Row | Violation |
---|---|
1 | Unmatched statement results.addAll(Arrays.asList(mapped)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement name=newname[0]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |