for (Iterator i = children.iterator(); i.hasNext();) { UnknownElement el = (UnknownElement) i.next(); el.maybeConfigure(); Child child = (Child) el.getRealThing(); child.injectParent(this); child.perform(); }
for (Enumeration e = vendorTools.elements(); e.hasMoreElements();) { HotDeploymentTool tool = (HotDeploymentTool) e.nextElement(); tool.validateAttributes(); tool.deploy(); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/UnknownElementTest.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/j2ee/ServerDeploy.java
Method name: void execute() Method name: void execute()
Number of AST nodes: 6 Number of AST nodes: 4
1
for (Iterator i = children.iterator(); i.hasNext();) {
1
for (
2
                UnknownElement el = (UnknownElement) i.next();
3
                el.maybeConfigure();
4
                Child child = (Child) el.getRealThing();
5
                child.injectParent(this);
6
                child.perform();
7
    
2
Enumeration e = vendorTools.elements();
3
             e.hasMoreElements();) {
4
            HotDeploymentTool tool = (HotDeploymentTool) e.nextElement();
5
            tool.validateAttributes();
6
            tool.deploy();
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons1