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: 5 | Number of AST nodes: 5 | |||
1 | String[] inputTargets = null;↵ | 1 | String[] errorTargets = null;↵ | |
2 | try {↵ | 2 | try {↵ | |
3 | inputTargets =↵ | 3 | errorTargets =↵ | |
4 | inputMapper.getImplementation().mapFileName(sourcefile);↵ | 4 | errorMapper.getImplementation().mapFileName(sourcefile);↵ | |
5 | } catch (NullPointerException enPeaEx) {↵ | 5 | } catch (NullPointerException enPeaEx) {↵ | |
6 | if (sourcefile != null) {↵ | 6 | if (sourcefile != null) {↵ | |
7 | throw enPeaEx;↵ | 7 | throw enPeaEx;↵ | |
8 | }↵ | 8 | }↵ | |
9 | }↵ | 9 | }↵ | |
10 | if (inputTargets != null && inputTargets.length > 0) {↵ | 10 | if (errorTargets != null && errorTargets.length > 0) {↵ | |
11 | redirector.setInput(toFileArray(inputTargets));↵ | 11 | redirector.setError(toFileArray(errorTargets));↵ | |
12 | } | 12 |
| |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 15 |
Number of mapped statements | 5 |
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.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21 | String[] inputTargets = null; |
| 33 | String[] errorTargets = null; | |||||||||||||||||
22 | try | 34 | try | ||||||||||||||||||
23 | inputTargets = inputMapper.getImplementation().mapFileName(sourcefile); |
| 35 | errorTargets = errorMapper.getImplementation().mapFileName(sourcefile); | |||||||||||||||||
24 | if (inputTargets != null && inputTargets.length > 0) |
| 36 | if (errorTargets != null && errorTargets.length > 0) | |||||||||||||||||
25 | redirector.setInput(toFileArray(inputTargets)); |
| 37 | redirector.setError(toFileArray(errorTargets)); |
Row | Violation |
---|---|
1 | Expression redirector.setInput(toFileArray(inputTargets)) 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.setInput(toFileArray(inputTargets)) 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 |