if (!entryFeatures.isEmpty()) { return false; } entryFeatures.add(entryFeature);
if (mappings.contains(parent)) { continue LOOP; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/command/AddCommand.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/MappingEditor.java
Method name: boolean prepare() Method name: void run()
Number of AST nodes: 3 Number of AST nodes: 2
1
if (!entryFeatures.isEmpty())
1
if (mappings.contains(parent))
2
              {
2
                {
3
                return false;
3
                
4
              }
5
              entryFeatures.add(entryFeature);
4
  continue LOOP;
5
                }
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 comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)517.9
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    31
    if (!entryFeatures.isEmpty())
    31
    if (!entryFeatures.isEmpty())
    17
    if (mappings.contains(parent))
    Differences
    Expression1Expression2Difference
    !entryFeatures.isEmpty()mappings.contains(parent)TYPE_COMPATIBLE_REPLACEMENT
    17
    if (mappings.contains(parent))
                                        
    18
    continue LOOP;
    Preondition Violations
    Unmatched continue LOOP;
    18
    continue LOOP;
    32
    return false;
    32
    return false;
    Preondition Violations
    Unmatched return false;
                                      
    33
    entryFeatures.add(entryFeature);
    33
    entryFeatures.add(entryFeature);
    Preondition Violations
    Unmatched statement entryFeatures.add(entryFeature); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                            
    Precondition Violations (3)
    Row Violation
    1Unmatched continue LOOP;
    2Unmatched return false;
    3Unmatched statement entryFeatures.add(entryFeature); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted