File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/FileList.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/PatternSet.java | |||
Method name: void setFiles(String)
|
Method name: void setExcludes(String)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (filenames != null && filenames.length() > 0) {↵ | 1 | if (excludes != null && excludes.length() > 0) {↵ | |
2 | StringTokenizer tok = new StringTokenizer(↵ | 2 | StringTokenizer tok = new StringTokenizer(↵ | |
3 | filenames, ", \t\n\r\f", false);↵ | 3 | excludes, ", ", false);↵ | |
4 | while (tok.hasMoreTokens()) {↵ | 4 | while (tok.hasMoreTokens()) {↵ | |
5 | this.filenames.addElement(tok.nextToken());↵ | 5 | createExclude().setName(tok.nextToken());↵ | |
6 | }↵ | 6 | }↵ | |
7 | } | 7 |
| |
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 in different classes having the same super class |
Number of node comparisons | 8 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (filenames != null && filenames.length() > 0) |
| 3 | if (excludes != null && excludes.length() > 0) | |||||||||||||
3 | StringTokenizer tok = new StringTokenizer(filenames, ", \t\n\r\f", false); |
| 4 | StringTokenizer tok = new StringTokenizer(excludes, ", ", false); | |||||||||||||
4 | while (tok.hasMoreTokens()) | 5 | while (tok.hasMoreTokens()) | ||||||||||||||
5 | this.filenames.addElement(tok.nextToken()); |
| | ||||||||||||||
|
| 6 | createExclude().setName(tok.nextToken()); |
Row | Violation |
---|---|
1 | Unmatched statement this.filenames.addElement(tok.nextToken()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement createExclude().setName(tok.nextToken()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |