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 (outputMapper != null) {↵ | 1 | if (errorMapper != null) {↵ | |
2 | String[] outputTargets = null;↵ | 2 | String[] errorTargets = null;↵ | |
3 | try {↵ | 3 | try {↵ | |
4 | outputTargets =↵ | 4 | errorTargets =↵ | |
5 | outputMapper.getImplementation().mapFileName(sourcefile);↵ | 5 | errorMapper.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 (outputTargets != null && outputTargets.length > 0) {↵ | 11 | if (errorTargets != null && errorTargets.length > 0) {↵ | |
12 | redirector.setOutput(toFileArray(outputTargets));↵ | 12 | redirector.setError(toFileArray(errorTargets));↵ | |
13 | }↵ | 13 | }↵ | |
14 | } | 14 |
| |
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 17 |
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 | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
26 | if (outputMapper != null) |
| 32 | if (errorMapper != null) | |||||||||||||||||
27 | String[] outputTargets = null; |
| 33 | String[] errorTargets = null; | |||||||||||||||||
28 | try | 34 | try | ||||||||||||||||||
29 | outputTargets = outputMapper.getImplementation().mapFileName(sourcefile); |
| 35 | errorTargets = errorMapper.getImplementation().mapFileName(sourcefile); | |||||||||||||||||
30 | if (outputTargets != null && outputTargets.length > 0) |
| 36 | if (errorTargets != null && errorTargets.length > 0) | |||||||||||||||||
31 | redirector.setOutput(toFileArray(outputTargets)); |
| 37 | redirector.setError(toFileArray(errorTargets)); |
Row | Violation |
---|---|
1 | Expression redirector.setOutput(toFileArray(outputTargets)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression redirector.setError(toFileArray(errorTargets)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression redirector.setOutput(toFileArray(outputTargets)) is a void method call, and thus it cannot be parameterized |
4 | Expression redirector.setError(toFileArray(errorTargets)) is a void method call, and thus it cannot be parameterized |