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 addConfiguredErrorMapper(Mapper)
|
Method name: void addConfiguredInputMapper(Mapper)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (isReference()) {↵ | 1 | if (isReference()) {↵ | |
2 | throw noChildrenAllowed();↵ | 2 | throw noChildrenAllowed();↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (this.errorMapper != null) {↵ | 4 | if (this.inputMapper != null) {↵ | |
5 | if (usingError) {↵ | 5 | if (usingInput) {↵ | |
6 | throw new BuildException("attribute \"error\""↵ | 6 | throw new BuildException("attribute \"input\""↵ | |
7 | + " cannot coexist with a nested <errormapper>");↵ | 7 | + " cannot coexist with a nested <inputmapper>");↵ | |
8 | } else {↵ | 8 | } else {↵ | |
9 | throw new BuildException("Cannot have > 1 <errormapper>");↵ | 9 | throw new BuildException("Cannot have > 1 <inputmapper>");↵ | |
10 | }↵ | 10 | }↵ | |
11 | }↵ | 11 | }↵ | |
12 | this.errorMapper = errorMapper; | 12 | this.inputMapper = inputMapper; | |
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 declared in the same class |
Number of node comparisons | 15 |
Number of mapped statements | 7 |
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) | 9.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (isReference()) | 1 | if (isReference()) | ||||||||||||||||
2 | throw noChildrenAllowed(); | 2 | throw noChildrenAllowed(); | ||||||||||||||||
3 | if (this.errorMapper != null) |
| 3 | if (this.inputMapper != null) | |||||||||||||||
4 | if (usingError) |
| 4 | if (usingInput) | |||||||||||||||
5 | throw new BuildException("attribute \"error\"" + " cannot coexist with a nested <errormapper>"); |
| 5 | throw new BuildException("attribute \"input\"" + " cannot coexist with a nested <inputmapper>"); | |||||||||||||||
else | else | ||||||||||||||||||
6 | throw new BuildException("Cannot have > 1 <errormapper>"); |
| 6 | throw new BuildException("Cannot have > 1 <inputmapper>"); | |||||||||||||||
7 | this.errorMapper = errorMapper; |
| 7 | this.inputMapper = inputMapper; |
Row | Violation |
---|---|
1 | Expression this.errorMapper is a field being modified, and thus it cannot be parameterized |
2 | Expression this.inputMapper is a field being modified, and thus it cannot be parameterized |