File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/PatternSet.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/PatternSet.java | |||
Method name: void setIncludes(String)
|
Method name: void setExcludes(String)
|
|||
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 (includes != null && includes.length() > 0) {↵ | 4 | if (excludes != null && excludes.length() > 0) {↵ | |
5 | StringTokenizer tok = new StringTokenizer(includes, ", ", false);↵ | 5 | StringTokenizer tok = new StringTokenizer(excludes, ", ", false);↵ | |
6 | while (tok.hasMoreTokens()) {↵ | 6 | while (tok.hasMoreTokens()) {↵ | |
7 | createInclude().setName(tok.nextToken());↵ | 7 | createExclude().setName(tok.nextToken());↵ | |
8 | }↵ | 8 | }↵ | |
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 declared in the same class |
Number of node comparisons | 12 |
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) | 9.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (isReference()) | 1 | if (isReference()) | ||||||||||||||
2 | throw tooManyAttributes(); | 2 | throw tooManyAttributes(); | ||||||||||||||
3 | if (includes != null && includes.length() > 0) |
| 3 | if (excludes != null && excludes.length() > 0) | |||||||||||||
4 | StringTokenizer tok = new StringTokenizer(includes, ", ", false); |
| 4 | StringTokenizer tok = new StringTokenizer(excludes, ", ", false); | |||||||||||||
5 | while (tok.hasMoreTokens()) | 5 | while (tok.hasMoreTokens()) | ||||||||||||||
6 | createInclude().setName(tok.nextToken()); |
| 6 | createExclude().setName(tok.nextToken()); |
Row | Violation |
---|