if (targets != null) { targets.remove(target); }
if (n != null) { nodes.remove(n); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/notify/impl/SingletonAdapterImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/importer/rose/parser/RoseNode.java
Method name: void unsetTarget(Notifier) Method name: void deleteNode(RoseNode)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (targets != null)
1
if (n != null)
2
    {
2
    {
3
      targets.remove(target);
3
      nodes.remove(n);
4
    }
4
    }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (targets != null)
    1
    if (targets != null)
    1
    if (n != null)
    Differences
    Expression1Expression2Difference
    targetsnVARIABLE_NAME_MISMATCH
    java.util.Listorg.eclipse.emf.importer.rose.parser.RoseNodeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.List<org.eclipse.emf.common.notify.Notifier> of variable targets does not match with type org.eclipse.emf.importer.rose.parser.RoseNode of variable n
    • Make classes java.util.List and org.eclipse.emf.importer.rose.parser.RoseNode extend a common superclass
    1
    if (n != null)
    2
    targets.remove(target);
    2
    targets.remove(target);
    2
    nodes.remove(n);
    Differences
    Expression1Expression2Difference
    targetnVARIABLE_NAME_MISMATCH
    org.eclipse.emf.common.notify.Notifierorg.eclipse.emf.importer.rose.parser.RoseNodeVARIABLE_TYPE_MISMATCH
    targetsnodesVARIABLE_NAME_MISMATCH
    java.util.Listjava.util.ListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.common.notify.Notifier of variable target does not match with type org.eclipse.emf.importer.rose.parser.RoseNode of variable n
    • Make classes org.eclipse.emf.common.notify.Notifier and org.eclipse.emf.importer.rose.parser.RoseNode extend a common superclass
    Type java.util.List<org.eclipse.emf.common.notify.Notifier> of variable targets does not match with type java.util.List<org.eclipse.emf.importer.rose.parser.RoseNode> of variable nodes
    • Make classes java.util.List and java.util.List extend a common superclass
    2
    nodes.remove(n);
    Precondition Violations (3)
    Row Violation
    1Type java.util.List<org.eclipse.emf.common.notify.Notifier> of variable targets does not match with type org.eclipse.emf.importer.rose.parser.RoseNode of variable n
    2Type org.eclipse.emf.common.notify.Notifier of variable target does not match with type org.eclipse.emf.importer.rose.parser.RoseNode of variable n
    3Type java.util.List<org.eclipse.emf.common.notify.Notifier> of variable targets does not match with type java.util.List<org.eclipse.emf.importer.rose.parser.RoseNode> of variable nodes