Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (count == index) { if (FeatureMapUtil.isFeatureMap(feature)) { return entry; } else { Object value = entry.getValue(); if (value != null && resolve && isResolveProxies(feature)) { value = resolveProxy(feature, i, count, value); } return value; } } ++count; }
Entry entry = delegateGet(i); if (validator.isValid(entry.getEStructuralFeature())) { if (count == index) { if (FeatureMapUtil.isFeatureMap(feature)) { return entry; } else { Object value = entry.getValue(); if (value != null && resolve && isResolveProxies(feature)) { value = resolveProxy(feature, i, count, entry.getValue()); } return value; } } ++count; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java
Method name: Object get(EStructuralFeature, int, boolean) Method name: Object get(EStructuralFeature, int, boolean)
Number of AST nodes: 10 Number of AST nodes: 10
1
Entry entry = entries[i];
1
Entry entry = delegateGet(i);
2
        if (validator.isValid(entry.getEStructuralFeature()))
2
        if (validator.isValid(entry.getEStructuralFeature()))
3
        {
3
        {
4
          if (count == index)
4
          if (count == index)
5
          {
5
          {
6
            if (FeatureMapUtil.isFeatureMap(feature))
6
            if (FeatureMapUtil.isFeatureMap(feature))
7
            {
7
            {
8
              return entry;
8
              return entry;
9
            }
9
            }
10
            else
10
            else
11
            {
11
            {
12
              Object value = entry.getValue();
12
              Object value = entry.getValue();
13
              if (value != null && resolve && isResolveProxies(feature))
13
              if (value != null && resolve && isResolveProxies(feature))
14
              {
14
              {
15
                value = resolveProxy(feature, i, count, value);
15
                value = resolveProxy(feature, i, count, entry.getValue());
16
              }
16
              }
17
              return value;
17
              return value;
18
            }
18
            }
19
          }
19
          }
20
          ++count;
20
          ++count;
21
        }
21
        }
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.7
Clones locationClones are in different classes having the same super class
Number of node comparisons27
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements10
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    Entry entry = entries[i];
    6
    Entry entry = entries[i];
    5
    Entry entry = delegateGet(i);
    Differences
    Expression1Expression2Difference
    entries[i]delegateGet(i)TYPE_COMPATIBLE_REPLACEMENT
    5
    Entry entry = delegateGet(i);
    7
    if (validator.isValid(entry.getEStructuralFeature()))
    6
    if (validator.isValid(entry.getEStructuralFeature()))
    8
    if (count == index)
    7
    if (count == index)
    9
    if (FeatureMapUtil.isFeatureMap(feature))
    8
    if (FeatureMapUtil.isFeatureMap(feature))
    10
    return entry;
    9
    return entry;
    else
    else
    11
    Object value = entry.getValue();
    10
    Object value = entry.getValue();
    12
    if (value != null && resolve && isResolveProxies(feature))
    11
    if (value != null && resolve && isResolveProxies(feature))
    13
    value = resolveProxy(feature, i, count, value);
    13
    value = resolveProxy(feature, i, count, value);
    12
    value = resolveProxy(feature, i, count, entry.getValue());
    Differences
    Expression1Expression2Difference
    valueentry.getValue()TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression value cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entry.getValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12
    value = resolveProxy(feature, i, count, entry.getValue());
    14
    return value;
    13
    return value;
    15
    ++count;
    14
    ++count;
    Precondition Violations (2)
    Row Violation
    1Expression value cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression entry.getValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted