FeatureMap featureMap = (FeatureMap)value; for (int j = 0, size = featureMap.size(); j < size; ++j) { if (isIncludedEntry(featureMap.getEStructuralFeature(j)) && featureMap.getValue(j) != null) { ++result; } }
FeatureMap featureMap = (FeatureMap)value; for (int j = 0, size = featureMap.size(); j < size; ++j) { if (isIncludedEntry(featureMap.getEStructuralFeature(j)) && featureMap.getValue(j) != null) { return false; } }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EContentsEList.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EContentsEList.java
Method name: int size() Method name: boolean isEmpty()
Number of AST nodes: 4 Number of AST nodes: 4
1
FeatureMap featureMap = (FeatureMap)value;
1
FeatureMap featureMap = (FeatureMap)value;
2
            for (int j = 0, size = featureMap.size(); j < size; ++j)
2
            for (int j = 0, size = featureMap.size(); j < size; ++j)
3
            {
3
            {
4
              if (isIncludedEntry(featureMap.getEStructuralFeature(j)) && featureMap.getValue(j) != null)
4
              if (isIncludedEntry(featureMap.getEStructuralFeature(j)) && featureMap.getValue(j) != null)
5
              {
5
              {
6
                ++result;
6
                return false;
7
              }
7
              }
8
            }
8
            }
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.6
Clones locationClones are declared in the same class
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    8
    FeatureMap featureMap = (FeatureMap)value;
    7
    FeatureMap featureMap = (FeatureMap)value;
    9
    for (int j = 0, size = featureMap.size(); j < size; ++j)
    8
    for (int j = 0, size = featureMap.size(); j < size; ++j)
    10
    if (isIncludedEntry(featureMap.getEStructuralFeature(j)) && featureMap.getValue(j) != null)
    9
    if (isIncludedEntry(featureMap.getEStructuralFeature(j)) && featureMap.getValue(j) != null)
                                      
    10
    return false;
    Preondition Violations
    Unmatched return false;
    10
    return false;
    11
    ++result;
    11
    ++result;
    Preondition Violations
    Unmatched statement ++result; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                              
    Precondition Violations (2)
    Row Violation
    1Unmatched return false;
    2Unmatched statement ++result; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted