File path: /apache-ant-1.7.0/src/org/apache/tools/ant/filters/ReplaceTokens.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/listener/MailLogger.java | |||
Method name: void initialize()
|
Method name: void buildFinished(BuildEvent)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for (Enumeration e = props.keys(); e.hasMoreElements();) {↵ | 1 | for (Enumeration e = fileProperties.keys(); e.hasMoreElements();) {↵ | |
2 | String key = (String) e.nextElement();↵ | 2 | String key = (String) e.nextElement();↵ | |
3 | String value = props.getProperty(key);↵ | 3 | String value = fileProperties.getProperty(key);↵ | |
4 | hash.put(key, value);↵ | 4 | properties.put(key, project.replaceProperties(value));↵ | |
5 | } | 5 |
| |
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 | 17 |
Number of mapped statements | 4 |
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) | 2.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
23 | for (Enumeration e = props.keys(); e.hasMoreElements(); ) |
| 11 | for (Enumeration e = fileProperties.keys(); e.hasMoreElements(); ) | |||||||||||||||
24 | String key = (String)e.nextElement(); | 12 | String key = (String)e.nextElement(); | ||||||||||||||||
25 | String value = props.getProperty(key); |
| 13 | String value = fileProperties.getProperty(key); | |||||||||||||||
26 | hash.put(key, value); |
| 14 | properties.put(key, project.replaceProperties(value)); |
Row | Violation |
---|---|
1 | Expression value cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression project.replaceProperties(value) cannot be parameterized, because it has dependencies to/from statements that will be extracted |