for (Enumeration e = fileProperties.keys(); e.hasMoreElements();) {
String key = (String) e.nextElement();
String value = fileProperties.getProperty(key);
properties.put(key, project.replaceProperties(value));
}
for (Iterator i = dictionary.keySet().iterator(); i.hasNext();) {
String key = (String) i.next();
try {
Object val = dictionary.get(key);
addBean(key, val);
} catch (BuildException ex) {
// The key is in the dictionary but cannot be retrieved
// This is usually due references that refer to tasks
// that have not been taskdefed in the current run.
// Ignore
}
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/listener/MailLogger.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/ScriptRunnerBase.java
|
Method name: void buildFinished(BuildEvent)
|
|
Method name: void addBeans(Map)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 5
|
|
1 | for (Enumeration e = fileProperties.keys(); e.hasMoreElements();) {↵ | | 1 | for (Iterator i = dictionary.keySet().iterator(); i.hasNext();) {↵
|
2 | String key = (String) e.nextElement();↵ | | 2 | String key = (String) i.next();↵
|
3 | String↵ | | 3 | try {↵
|
4 | value = fileProperties.getProperty(key);↵ | | 4 | Object val = ↵
|
5 | properties.put(key, project.replaceProperties(value));↵ | | 5 | dictionary.get(key);↵
|
| | | 6 | addBean(key, val);↵
|
| | | 7 | } catch (BuildException ex) {↵
|
| | | 8 | // The key is in the dictionary but cannot be retrieved↵
|
| | | 9 | // This is usually due references that refer to tasks↵
|
| | | 10 | // that have not been taskdefed in the current run.↵
|
| | | 11 | // Ignore↵
|
| | | 12 | }↵
|
6 | } | | 13 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |