File path: /apache-ant-1.7.0/src/org/apache/tools/ant/DirectoryScanner.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/DirectoryScanner.java | |||
Method name: void setExcludes(String[])
|
Method name: void setIncludes(String[])
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (excludes == null) {↵ | 1 | if (includes == null) {↵ | |
2 | this.excludes = null;↵ | 2 | this.includes = null;↵ | |
3 | } else {↵ | 3 | } else {↵ | |
4 | this.excludes = new String[excludes.length];↵ | 4 | this.includes = new String[includes.length];↵ | |
5 | for (int i = 0; i < excludes.length; i++) {↵ | 5 | for (int i = 0; i < includes.length; i++) {↵ | |
6 | this.excludes[i] = normalizePattern(excludes[i]);↵ | 6 | this.includes[i] = normalizePattern(includes[i]);↵ | |
7 | }↵ | 7 | }↵ | |
8 | } | 8 |
| |
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 | 13 |
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.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (excludes == null) |
| 1 | if (includes == null) | |||||||||||||||
2 | this.excludes = null; |
| 2 | this.includes = null; | |||||||||||||||
else | else | ||||||||||||||||||
3 | this.excludes = new String[excludes.length]; |
| 3 | this.includes = new String[includes.length]; | |||||||||||||||
4 | for (int i = 0; i < excludes.length; i++) |
| 4 | for (int i = 0; i < includes.length; i++) | |||||||||||||||
5 | this.excludes[i] = normalizePattern(excludes[i]); |
| 5 | this.includes[i] = normalizePattern(includes[i]); |
Row | Violation |
---|---|
1 | Expression this.excludes is a field being modified, and thus it cannot be parameterized |
2 | Expression this.includes is a field being modified, and thus it cannot be parameterized |
3 | Expression this.excludes is a field being modified, and thus it cannot be parameterized |
4 | Expression this.includes is a field being modified, and thus it cannot be parameterized |
5 | Expression this.excludes cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression this.includes cannot be parameterized, because it has dependencies to/from statements that will be extracted |