File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Replace.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Replace.java | |||
Method name: void validateReplacefilters()
|
Method name: void logFilterChain(String)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | for (int i = 0; i < replacefilters.size(); i++) {↵ | 1 | for (int i = 0; i < replacefilters.size(); i++) {↵ | |
2 | Replacefilter element =↵ | 2 | Replacefilter ↵ | |
3 | (Replacefilter) replacefilters.elementAt(i);↵ | 3 | filter = (Replacefilter) replacefilters.elementAt(i);↵ | |
4 | element.validate(↵ | 4 | log("Replacing in " + filename + ": " + filter.getToken()↵ | |
5 | );↵ | 5 | + " --> " + filter.getReplaceValue(), Project.MSG_VERBOSE);↵ | |
6 | } | 6 |
| |
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 declared in the same class |
Number of node comparisons | 9 |
Number of mapped statements | 3 |
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) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | for (int i = 0; i < replacefilters.size(); i++) | 1 | for (int i = 0; i < replacefilters.size(); i++) | |||||||||||||||||||||||||
2 | Replacefilter element = (Replacefilter)replacefilters.elementAt(i); |
| 2 | Replacefilter filter = (Replacefilter)replacefilters.elementAt(i); | ||||||||||||||||||||||||
3 | element.validate(); |
| 3 | log("Replacing in " + filename + ": " + filter.getToken() + " --> " + filter.getReplaceValue(), Project.MSG_VERBOSE); |
Row | Violation |
---|---|
1 | Expression element.validate() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression log("Replacing in " + filename + ": "+ filter.getToken()+ " --> "+ filter.getReplaceValue(),Project.MSG_VERBOSE) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression element.validate() is a void method call, and thus it cannot be parameterized |
4 | Expression log("Replacing in " + filename + ": "+ filter.getToken()+ " --> "+ filter.getReplaceValue(),Project.MSG_VERBOSE) is a void method call, and thus it cannot be parameterized |
5 | Expression element.validate() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression log("Replacing in " + filename + ": "+ filter.getToken()+ " --> "+ filter.getReplaceValue(),Project.MSG_VERBOSE) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression element.validate() is a void method call, and thus it cannot be parameterized |
8 | Expression log("Replacing in " + filename + ": "+ filter.getToken()+ " --> "+ filter.getReplaceValue(),Project.MSG_VERBOSE) is a void method call, and thus it cannot be parameterized |