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 setError(File)
|
Method name: void setOutput(File)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (isReference()) {↵ | 1 | if (isReference()) {↵ | |
2 | throw tooManyAttributes();↵ | 2 | throw tooManyAttributes();↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (error == null) {↵ | 4 | if (out == null) {↵ | |
5 | throw new IllegalArgumentException("error file specified as null");↵ | 5 | throw new IllegalArgumentException("output file specified as null");↵ | |
6 | }↵ | 6 | }↵ | |
7 | usingError = true;↵ | 7 | usingOutput = true;↵ | |
8 | errorMapper = createMergeMapper(error); | 8 | outputMapper = createMergeMapper(out); | |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (isReference()) | 1 | if (isReference()) | ||||||||||||||||
2 | throw tooManyAttributes(); | 2 | throw tooManyAttributes(); | ||||||||||||||||
3 | if (error == null) |
| 3 | if (out == null) | |||||||||||||||
4 | throw new IllegalArgumentException("error file specified as null"); |
| 4 | throw new IllegalArgumentException("output file specified as null"); | |||||||||||||||
5 | usingError = true; |
| 5 | usingOutput = true; | |||||||||||||||
6 | errorMapper = createMergeMapper(error); |
| 6 | outputMapper = createMergeMapper(out); |
Row | Violation |
---|---|
1 | Expression usingError is a field being modified, and thus it cannot be parameterized |
2 | Expression usingOutput is a field being modified, and thus it cannot be parameterized |
3 | Expression errorMapper is a field being modified, and thus it cannot be parameterized |
4 | Expression outputMapper is a field being modified, and thus it cannot be parameterized |