protected void removeOtherModelEventListeners(Object oldTarget) { super.removeOtherModelEventListeners(oldTarget); Iterator i = others.iterator(); while (i.hasNext()) { Object end = i.next(); Model.getPump().removeModelEventListener(this, end, "name"); } others.clear(); }
@Override protected void removeOtherModelEventListeners(Object oldTarget) { super.removeOtherModelEventListeners(oldTarget); for (Object classifier : others) { Model.getPump().removeModelEventListener(this, classifier, "feature"); } others.clear(); }
Clone fragments detected by clone detection tool
File path: /ArgoUML-0.34-src/argouml/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationConnectionListModel.java File path: /ArgoUML-0.34-src/argouml/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/UMLAssociationRoleBaseComboBoxModel.java
Method name: void removeOtherModelEventListeners(Object) Method name: void removeOtherModelEventListeners(Object)
Number of AST nodes: 3 Number of AST nodes: 2
1
protected void removeOtherModelEventListeners(Object oldTarget) {
1
@Override
2
        super.removeOtherModelEventListeners(oldTarget);
2
    protected void removeOtherModelEventListeners(Object oldTarget) {
3
        Iterator i = others.iterator();
3
        super.removeOtherModelEventListeners(oldTarget);
4
        while (i.hasNext()) {
4
        for (Object classifier : others) {
5
            Object end = i.next();
5
            Model.getPump().removeModelEventListener(this, 
6
            Model.getPump().removeModelEventListener(this, end, "name");
6
                    classifier, "feature");
7
        }
7
        }
8
        others.clear();
8
        others.clear();
9
    }
9
    }
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Similarity Score1.000
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    while (i.hasNext())
    3
    while (i.hasNext())
    2
    for (Object classifier : others)
    Differences
    Expression1Expression2Difference
    endclassifierVARIABLE_NAME_MISMATCH
    2
    for (Object classifier : others)
    4
    Object end = i.next();
    4
    Object end = i.next();
    Differences
    Expression1Expression2Difference
    endclassifierVARIABLE_NAME_MISMATCH
                                                  
    5
    Model.getPump().removeModelEventListener(this, end, "name");
    5
    Model.getPump().removeModelEventListener(this, end, "name");
    3
    Model.getPump().removeModelEventListener(this, classifier, "feature");
    Differences
    Expression1Expression2Difference
    endclassifierVARIABLE_NAME_MISMATCH
    "name""feature"LITERAL_VALUE_MISMATCH
    3
    Model.getPump().removeModelEventListener(this, classifier, "feature");
    Precondition Violations (0)
    Row Violation