for (Iterator i = unknownElements.iterator(); i.hasNext();) { UnknownElement child = copy((UnknownElement) i.next()); rc.addChild(child.getWrapper()); ret.addChild(child); }
for (Enumeration e = System.getProperties().propertyNames(); e.hasMoreElements();) { String name = (String) e.nextElement(); ret.put(name, System.getProperties().getProperty(name)); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/MacroInstance.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/PropertySet.java
Method name: UnknownElement copy(UnknownElement) Method name: Hashtable getAllSystemProperties()
Number of AST nodes: 4 Number of AST nodes: 3
1
for (Iterator i = unknownElements.iterator();
1
for (
2
        
2
Enumeration e = System.getProperties().propertyNames();
3
             i.hasNext();) {
3
             e.hasMoreElements();) {
4
                    UnknownElement child = copy((UnknownElement) i.next());
4
            String name = (String) e.nextElement();
5
                    rc.addChild(child.getWrapper());
5
            
6
                    ret.addChild(child);
7
        
6
ret.put(name, System.getProperties().getProperty(name));
8
        }
7
        }
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons1