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 (outputProperty != null) {↵ | 1 | if (inputEncoding != null) {↵ | |
2 | redirector.setOutputProperty(outputProperty);↵ | 2 | redirector.setInputEncoding(inputEncoding);↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (errorProperty != null) {↵ | 4 | if (outputEncoding != null) {↵ | |
5 | redirector.setErrorProperty(errorProperty);↵ | 5 | redirector.setOutputEncoding(outputEncoding);↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (inputString != null) {↵ | 7 | if (errorEncoding != null) {↵ | |
8 | redirector.setInputString(inputString);↵ | 8 | redirector.setErrorEncoding(errorEncoding);↵ | |
9 | } | 9 |
| |
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 | 27 |
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) | 19.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | if (outputProperty != null) |
| 46 | if (outputEncoding != null) | |||||||||||||||||
13 | redirector.setOutputProperty(outputProperty); |
| 47 | redirector.setOutputEncoding(outputEncoding); | |||||||||||||||||
14 | if (errorProperty != null) |
| 48 | if (errorEncoding != null) | |||||||||||||||||
15 | redirector.setErrorProperty(errorProperty); |
| 49 | redirector.setErrorEncoding(errorEncoding); | |||||||||||||||||
16 | if (inputString != null) |
| 44 | if (inputEncoding != null) | |||||||||||||||||
17 | redirector.setInputString(inputString); |
| 45 | redirector.setInputEncoding(inputEncoding); |
Row | Violation |
---|---|
1 | Expression redirector.setOutputProperty(outputProperty) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression redirector.setOutputEncoding(outputEncoding) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression redirector.setOutputProperty(outputProperty) is a void method call, and thus it cannot be parameterized |
4 | Expression redirector.setOutputEncoding(outputEncoding) is a void method call, and thus it cannot be parameterized |
5 | Expression redirector.setErrorProperty(errorProperty) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression redirector.setErrorEncoding(errorEncoding) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression redirector.setErrorProperty(errorProperty) is a void method call, and thus it cannot be parameterized |
8 | Expression redirector.setErrorEncoding(errorEncoding) is a void method call, and thus it cannot be parameterized |
9 | Expression redirector.setInputString(inputString) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression redirector.setInputEncoding(inputEncoding) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression redirector.setInputString(inputString) is a void method call, and thus it cannot be parameterized |
12 | Expression redirector.setInputEncoding(inputEncoding) is a void method call, and thus it cannot be parameterized |