File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/RedirectorElement.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/RedirectorElement.java | |||
Method name: void configure(Redirector, String)
|
Method name: void configure(Redirector, String)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (errorMapper != null) {↵ | 1 | if (inputMapper != null) {↵ | |
2 | String[] errorTargets = null;↵ | 2 | String[] inputTargets = null;↵ | |
3 | try {↵ | 3 | try {↵ | |
4 | errorTargets =↵ | 4 | inputTargets =↵ | |
5 | errorMapper.getImplementation().mapFileName(sourcefile);↵ | 5 | inputMapper.getImplementation().mapFileName(sourcefile);↵ | |
6 | } catch (NullPointerException enPeaEx) {↵ | 6 | } catch (NullPointerException enPeaEx) {↵ | |
7 | if (sourcefile != null) {↵ | 7 | if (sourcefile != null) {↵ | |
8 | throw enPeaEx;↵ | 8 | throw enPeaEx;↵ | |
9 | }↵ | 9 | }↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (errorTargets != null && errorTargets.length > 0) {↵ | 11 | if (inputTargets != null && inputTargets.length > 0) {↵ | |
12 | redirector.setError(toFileArray(errorTargets));↵ | 12 | redirector.setInput(toFileArray(inputTargets));↵ | |
13 | }↵ | 13 | }↵ | |
14 | } | 14 |
| |
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 14 |
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) | 18.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
32 | if (errorMapper != null) |
| 20 | if (inputMapper != null) | |||||||||||||||||
33 | String[] errorTargets = null; |
| 21 | String[] inputTargets = null; | |||||||||||||||||
34 | try | 22 | try | ||||||||||||||||||
35 | errorTargets = errorMapper.getImplementation().mapFileName(sourcefile); |
| 23 | inputTargets = inputMapper.getImplementation().mapFileName(sourcefile); | |||||||||||||||||
36 | if (errorTargets != null && errorTargets.length > 0) |
| 24 | if (inputTargets != null && inputTargets.length > 0) | |||||||||||||||||
37 | redirector.setError(toFileArray(errorTargets)); |
| 25 | redirector.setInput(toFileArray(inputTargets)); |
Row | Violation |
---|---|
1 | Expression redirector.setError(toFileArray(errorTargets)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression redirector.setInput(toFileArray(inputTargets)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression redirector.setError(toFileArray(errorTargets)) is a void method call, and thus it cannot be parameterized |
4 | Expression redirector.setInput(toFileArray(inputTargets)) is a void method call, and thus it cannot be parameterized |