if (pattern == null) { setPatternFacet(basicGetPatternFacet(eDataType)); } return pattern;
if (enumerationLiterals == null) { setEnumerationFacet(basicGetEnumerationFacet(eDataType)); } return enumerationLiterals;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java
Method name: List getPatternFacet() Method name: List getEnumerationFacet()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (pattern == null)
1
if (enumerationLiterals == null)
2
      {
2
      {
3
        setPatternFacet(basicGetPatternFacet(eDataType));
3
        setEnumerationFacet(basicGetEnumerationFacet(eDataType));
4
      }
4
      }
5
      return pattern;
5
      return enumerationLiterals;
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 declared in the same class
Number of node comparisons5
  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)4.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (pattern == null)
    1
    if (pattern == null)
    1
    if (enumerationLiterals == null)
    Differences
    Expression1Expression2Difference
    patternenumerationLiteralsVARIABLE_NAME_MISMATCH
    1
    if (enumerationLiterals == null)
    2
    setPatternFacet(basicGetPatternFacet(eDataType));
    2
    setPatternFacet(basicGetPatternFacet(eDataType));
    2
    setEnumerationFacet(basicGetEnumerationFacet(eDataType));
    Differences
    Expression1Expression2Difference
    setPatternFacetsetEnumerationFacetMETHOD_INVOCATION_NAME_MISMATCH
    basicGetPatternFacetbasicGetEnumerationFacetMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression setPatternFacet(basicGetPatternFacet(eDataType)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setPatternFacet(basicGetPatternFacet(eDataType)) is a void method call, and thus it cannot be parameterized
    Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) is a void method call, and thus it cannot be parameterized
    2
    setEnumerationFacet(basicGetEnumerationFacet(eDataType));
    3
    return pattern;
    3
    return pattern;
    3
    return enumerationLiterals;
    Differences
    Expression1Expression2Difference
    patternenumerationLiteralsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression pattern cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression enumerationLiterals cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    return enumerationLiterals;
    Precondition Violations (6)
    Row Violation
    1Expression setPatternFacet(basicGetPatternFacet(eDataType)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression setPatternFacet(basicGetPatternFacet(eDataType)) is a void method call, and thus it cannot be parameterized
    4Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) is a void method call, and thus it cannot be parameterized
    5Expression pattern cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression enumerationLiterals cannot be parameterized, because it has dependencies to/from statements that will be extracted