if (additionalUserProperties != null) { for (Enumeration e = additionalUserProperties.keys(); e.hasMoreElements();) { String key = (String) e.nextElement(); String property = additionalUserProperties.getProperty(key); definedProps.put(key, property); } }
String key = (String) i.next(); Object value = getBeans().get(key); if (value != null) { m.declareBean(key, value, value.getClass()); } else { // BSF uses a hashtable to store values // so cannot declareBean with a null value // So need to remove any bean of this name as // that bean should not be visible m.undeclareBean(key); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Main.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/optional/ScriptRunner.java
Method name: void startAnt(String[], Properties, ClassLoader) Method name: void declareBeans(BSFManager)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (additionalUserProperties != null) {
2
            for (Enumeration e = additionalUserProperties.key
1
String key = (String) i.next();
2
            Object value = getBeans().get(key);
3
            if (value != null) {
3
s();
4
                m.declareBean(key, value, value.getClass());
4
                    e.hasMoreElements();) {
5
            
5
                String key = (String) e.nextElement();
6
                String property = additionalUserProperties.getProperty(key);
7
                definedProps.put(key, property);
8
            }
6
} else {
7
                // BSF uses a hashtable to store values
8
                // so cannot declareBean with a null value
9
                // So need to remove any bean of this name as
10
                // that bean should not be visible
11
                m.undeclareBean(key);
9
        }
12
            }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons1