for (Object object : collection) { if (!(object instanceof Mapping)) { allMappings = false; break; } }
for (Object object : collection) { if (!(object instanceof Mapping)) { result = false; break; } }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/action/RemoveMappingAction.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/command/AddMappingCommand.java
Method name: Command createCommand() Method name: boolean prepare()
Number of AST nodes: 4 Number of AST nodes: 4
1
for (Object object : collection)
1
for (Object object : collection)
2
      {
2
    
3
  
3
{
4
      if (!(object instanceof Mapping))
4
      if (!(object instanceof Mapping))
5
        {
5
      {
6
          allMappings = false;
6
        result = false;
7
          break;
7
        break;
8
        }
8
      
9
  
9
}
10
    }
10
    }
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons10
  1. {Non-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)0.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (!(object instanceof Mapping))
    3
    if (!(object instanceof Mapping))
    4
    allMappings = false;
    4
    allMappings = false;
    4
    result = false;
    Differences
    Expression1Expression2Difference
    allMappingsresultVARIABLE_NAME_MISMATCH
    4
    result = false;
    5
    break;
    5
    break;
    5
    break;
    Preondition Violations
    Statement break; without innermost loop
    Statement break; without innermost loop
    5
    break;
    Precondition Violations (2)
    Row Violation
    1Statement break; without innermost loop
    2Statement break; without innermost loop