File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/KeySubst.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/ResourceUtils.java | |||
Method name: void execute()
|
Method name: void copyResource(Resource, Resource, FilterSetCollection, Vector, boolean, boolean, String, String, Project)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 6 | |||
1 | while (line != null) {↵ | 1 | while (line != null) {↵ | |
2 | if (line.length() == 0) {↵ | 2 | if (line.length() == 0) {↵ | |
3 | bw↵ | 3 | // this should not happen, because the lines are↵ | |
4 | // returned with the end of line delimiter↵ | |||
4 | .newLine();↵ | 5 | out.newLine();↵ | |
5 | } else {↵ | 6 | } else {↵ | |
6 | newline = KeySubst.replace(line, replacements);↵ | 7 | newline = filters.replaceTokens(line);↵ | |
7 | bw.write(newline);↵ | 8 | out.write(newline);↵ | |
8 | bw.newLine();↵ | 9 | ↵ | |
9 | }↵ | |||
10 | }↵ | |||
10 | line = br.readLine();↵ | 11 | line = ↵ | |
12 | lineTokenizer.getToken(in);↵ | |||
11 | } | 13 | } | |
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 |
Number of node comparisons | 25 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 2.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15 | while (line != null) | 33 | while (line != null) | |||||||||||
16 | if (line.length() == 0) | 34 | if (line.length() == 0) | |||||||||||
17 | bw.newLine(); |
| 35 | out.newLine(); | ||||||||||
else | else | |||||||||||||
18 | newline = KeySubst.replace(line, replacements); |
| | |||||||||||
|
| 36 | newline = filters.replaceTokens(line); | |||||||||||
19 | bw.write(newline); |
| 37 | out.write(newline); | ||||||||||
20 | bw.newLine(); |
| | |||||||||||
21 | line = br.readLine(); |
| | |||||||||||
|
| 38 | line = lineTokenizer.getToken(in); |
Row | Violation |
---|---|
1 | Unmatched statement newline=KeySubst.replace(line,replacements); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement newline=filters.replaceTokens(line); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement bw.newLine(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement line=br.readLine(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement line=lineTokenizer.getToken(in); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |