while (cpe.hasMoreElements()) { String value = (String) cpe.nextElement(); classpathAttribute.addValue(value); }
while (e.hasMoreElements()) { String value = (String) e.nextElement(); classpathAttribute.addValue(value); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Manifest.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Manifest.java
Method name: void merge(Section) Method name: String addAttributeAndCheck(Attribute)
Number of AST nodes: 3 Number of AST nodes: 3
1
while (cpe.hasMoreElements()) {
1
while (e.hasMoreElements()) {
2
                        String value = (String) cpe.nextElement();
2
                            String value = (String) e.nextElement();
3
                        classpathAttribute.addValue(value);
3
                            classpathAttribute.addValue(value);
4
                    }
4
                        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are declared in the same class
Number of node comparisons10
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    13
    while (cpe.hasMoreElements())
    13
    while (cpe.hasMoreElements())
    15
    while (e.hasMoreElements())
    Differences
    Expression1Expression2Difference
    cpeeVARIABLE_NAME_MISMATCH
    15
    while (e.hasMoreElements())
    14
    String value = (String)cpe.nextElement();
    14
    String value = (String)cpe.nextElement();
    16
    String value = (String)e.nextElement();
    Differences
    Expression1Expression2Difference
    cpeeVARIABLE_NAME_MISMATCH
    16
    String value = (String)e.nextElement();
    15
    classpathAttribute.addValue(value);
    17
    classpathAttribute.addValue(value);
    Precondition Violations (0)
    Row Violation