effectiveMax = extendedMetaData.getMaxExclusiveFacet(eDataType); if (effectiveMax == null) { effectiveMax = extendedMetaData.getMaxInclusiveFacet(eDataType); if (effectiveMax != null) { effectiveMax = EcoreUtil.createFromString(eDataType, (String)effectiveMax); effectiveMaxIsInclusive = true; } } else { effectiveMax = EcoreUtil.createFromString(eDataType, (String)effectiveMax); effectiveMaxIsInclusive = false; }
effectiveMin = extendedMetaData.getMinExclusiveFacet(eDataType); if (effectiveMin == null) { effectiveMin = extendedMetaData.getMinInclusiveFacet(eDataType); if (effectiveMin != null) { effectiveMin = EcoreUtil.createFromString(eDataType, (String)effectiveMin); effectiveMinIsInclusive = true; } } else { effectiveMin = EcoreUtil.createFromString(eDataType, (String)effectiveMin); effectiveMinIsInclusive = false; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EObjectValidator.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EObjectValidator.java
Method name: void DynamicEDataTypeValidator(EDataType) Method name: void DynamicEDataTypeValidator(EDataType)
Number of AST nodes: 8 Number of AST nodes: 8
1
effectiveMax = extendedMetaData.getMaxExclusiveFacet(eDataType);
1
effectiveMin = extendedMetaData.getMinExclusiveFacet(eDataType);
2
          if (effectiveMax == null)
2
          if (effectiveMin == null)
3
          {
3
          {
4
            effectiveMax = extendedMetaData.getMaxInclusiveFacet(eDataType);
4
            effectiveMin = extendedMetaData.getMinInclusiveFacet(eDataType);
5
            if (effectiveMax != null)
5
            if (effectiveMin != null)
6
            {
6
            {
7
              effectiveMax = EcoreUtil.createFromString(eDataType, (String)effectiveMax);
7
              effectiveMin = EcoreUtil.createFromString(eDataType, (String)effectiveMin);
8
              effectiveMaxIsInclusive = true;
8
              effectiveMinIsInclusive = true;
9
            }
9
            }
10
          }
10
          }
11
          else
11
          else
12
          {
12
          {
13
            effectiveMax = EcoreUtil.createFromString(eDataType, (String)effectiveMax);
13
            effectiveMin = EcoreUtil.createFromString(eDataType, (String)effectiveMin);
14
            effectiveMaxIsInclusive = false;
14
            effectiveMinIsInclusive = false;
15
          }
15
          }
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 the same method
Number of node comparisons28
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)195.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    46
    effectiveMax = extendedMetaData.getMaxExclusiveFacet(eDataType);
    46
    effectiveMax = extendedMetaData.getMaxExclusiveFacet(eDataType);
    37
    effectiveMin = extendedMetaData.getMinExclusiveFacet(eDataType);
    Differences
    Expression1Expression2Difference
    effectiveMaxeffectiveMinVARIABLE_NAME_MISMATCH
    getMaxExclusiveFacetgetMinExclusiveFacetMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression effectiveMax is a field being modified, and thus it cannot be parameterized
    Expression effectiveMin is a field being modified, and thus it cannot be parameterized
    37
    effectiveMin = extendedMetaData.getMinExclusiveFacet(eDataType);
    47
    if (effectiveMax == null)
    47
    if (effectiveMax == null)
    38
    if (effectiveMin == null)
    Differences
    Expression1Expression2Difference
    effectiveMaxeffectiveMinVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression effectiveMax cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression effectiveMin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    38
    if (effectiveMin == null)
    48
    effectiveMax = extendedMetaData.getMaxInclusiveFacet(eDataType);
    48
    effectiveMax = extendedMetaData.getMaxInclusiveFacet(eDataType);
    39
    effectiveMin = extendedMetaData.getMinInclusiveFacet(eDataType);
    Differences
    Expression1Expression2Difference
    effectiveMaxeffectiveMinVARIABLE_NAME_MISMATCH
    getMaxInclusiveFacetgetMinInclusiveFacetMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression effectiveMax is a field being modified, and thus it cannot be parameterized
    Expression effectiveMin is a field being modified, and thus it cannot be parameterized
    Expression extendedMetaData.getMaxInclusiveFacet(eDataType) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression extendedMetaData.getMinInclusiveFacet(eDataType) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    39
    effectiveMin = extendedMetaData.getMinInclusiveFacet(eDataType);
    49
    if (effectiveMax != null)
    49
    if (effectiveMax != null)
    40
    if (effectiveMin != null)
    Differences
    Expression1Expression2Difference
    effectiveMaxeffectiveMinVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression effectiveMax cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression effectiveMin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    40
    if (effectiveMin != null)
    50
    effectiveMax = EcoreUtil.createFromString(eDataType, (String)effectiveMax);
    50
    effectiveMax = EcoreUtil.createFromString(eDataType, (String)effectiveMax);
    41
    effectiveMin = EcoreUtil.createFromString(eDataType, (String)effectiveMin);
    Differences
    Expression1Expression2Difference
    effectiveMaxeffectiveMinVARIABLE_NAME_MISMATCH
    effectiveMaxeffectiveMinVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression effectiveMax cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression effectiveMin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression effectiveMax is a field being modified, and thus it cannot be parameterized
    Expression effectiveMin is a field being modified, and thus it cannot be parameterized
    Expression effectiveMax cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression effectiveMin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    41
    effectiveMin = EcoreUtil.createFromString(eDataType, (String)effectiveMin);
    51
    effectiveMaxIsInclusive = true;
    51
    effectiveMaxIsInclusive = true;
    42
    effectiveMinIsInclusive = true;
    Differences
    Expression1Expression2Difference
    effectiveMaxIsInclusiveeffectiveMinIsInclusiveVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression effectiveMaxIsInclusive is a field being modified, and thus it cannot be parameterized
    Expression effectiveMinIsInclusive is a field being modified, and thus it cannot be parameterized
    42
    effectiveMinIsInclusive = true;
    else
    else
    52
    effectiveMax = EcoreUtil.createFromString(eDataType, (String)effectiveMax);
    52
    effectiveMax = EcoreUtil.createFromString(eDataType, (String)effectiveMax);
    43
    effectiveMin = EcoreUtil.createFromString(eDataType, (String)effectiveMin);
    Differences
    Expression1Expression2Difference
    effectiveMaxeffectiveMinVARIABLE_NAME_MISMATCH
    effectiveMaxeffectiveMinVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression effectiveMax cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression effectiveMin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression effectiveMax is a field being modified, and thus it cannot be parameterized
    Expression effectiveMin is a field being modified, and thus it cannot be parameterized
    Expression effectiveMax cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression effectiveMin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    43
    effectiveMin = EcoreUtil.createFromString(eDataType, (String)effectiveMin);
    53
    effectiveMaxIsInclusive = false;
    53
    effectiveMaxIsInclusive = false;
    44
    effectiveMinIsInclusive = false;
    Differences
    Expression1Expression2Difference
    effectiveMaxIsInclusiveeffectiveMinIsInclusiveVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression effectiveMaxIsInclusive is a field being modified, and thus it cannot be parameterized
    Expression effectiveMinIsInclusive is a field being modified, and thus it cannot be parameterized
    44
    effectiveMinIsInclusive = false;
    Precondition Violations (26)
    Row Violation
    1Expression effectiveMax is a field being modified, and thus it cannot be parameterized
    2Expression effectiveMin is a field being modified, and thus it cannot be parameterized
    3Expression effectiveMax cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression effectiveMin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression effectiveMax is a field being modified, and thus it cannot be parameterized
    6Expression effectiveMin is a field being modified, and thus it cannot be parameterized
    7Expression extendedMetaData.getMaxInclusiveFacet(eDataType) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression extendedMetaData.getMinInclusiveFacet(eDataType) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression effectiveMax cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression effectiveMin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression effectiveMax cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression effectiveMin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression effectiveMax is a field being modified, and thus it cannot be parameterized
    14Expression effectiveMin is a field being modified, and thus it cannot be parameterized
    15Expression effectiveMax cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Expression effectiveMin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17Expression effectiveMaxIsInclusive is a field being modified, and thus it cannot be parameterized
    18Expression effectiveMinIsInclusive is a field being modified, and thus it cannot be parameterized
    19Expression effectiveMax cannot be parameterized, because it has dependencies to/from statements that will be extracted
    20Expression effectiveMin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    21Expression effectiveMax is a field being modified, and thus it cannot be parameterized
    22Expression effectiveMin is a field being modified, and thus it cannot be parameterized
    23Expression effectiveMax cannot be parameterized, because it has dependencies to/from statements that will be extracted
    24Expression effectiveMin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25Expression effectiveMaxIsInclusive is a field being modified, and thus it cannot be parameterized
    26Expression effectiveMinIsInclusive is a field being modified, and thus it cannot be parameterized