if (enumerationLiterals == null) { setEnumerationFacet(basicGetEnumerationFacet(eDataType)); } return enumerationLiterals;
if (memberTypes == null) { setMemberTypes(basicGetMemberTypes(eDataType)); } return memberTypes;
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 getEnumerationFacet() Method name: List getMemberTypes()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (enumerationLiterals == null)
1
if (memberTypes == null)
2
      {
2
      {
3
        setEnumerationFacet(basicGetEnumerationFacet(eDataType));
3
        setMemberTypes(basicGetMemberTypes(eDataType));
4
      }
4
      }
5
      return enumerationLiterals;
5
      return memberTypes;
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 statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)16.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (enumerationLiterals == null)
    1
    if (enumerationLiterals == null)
    1
    if (memberTypes == null)
    Differences
    Expression1Expression2Difference
    enumerationLiteralsmemberTypesVARIABLE_NAME_MISMATCH
    java.util.Listjava.util.ListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.List<java.lang.String> of variable enumerationLiterals does not match with type java.util.List<org.eclipse.emf.ecore.EDataType> of variable memberTypes
    • Make classes java.util.List and java.util.List extend a common superclass
    1
    if (memberTypes == null)
    2
    setEnumerationFacet(basicGetEnumerationFacet(eDataType));
    2
    setEnumerationFacet(basicGetEnumerationFacet(eDataType));
    2
    setMemberTypes(basicGetMemberTypes(eDataType));
    Differences
    Expression1Expression2Difference
    setEnumerationFacetsetMemberTypesMETHOD_INVOCATION_NAME_MISMATCH
    basicGetEnumerationFacetbasicGetMemberTypesMETHOD_INVOCATION_NAME_MISMATCH
    java.util.Listjava.util.ListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setMemberTypes(basicGetMemberTypes(eDataType)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) is a void method call, and thus it cannot be parameterized
    Expression setMemberTypes(basicGetMemberTypes(eDataType)) is a void method call, and thus it cannot be parameterized
    Type java.util.List<java.lang.String> of variable basicGetEnumerationFacet(eDataType) does not match with type java.util.List<org.eclipse.emf.ecore.EDataType> of variable basicGetMemberTypes(eDataType)
    • Make classes java.util.List and java.util.List extend a common superclass
    2
    setMemberTypes(basicGetMemberTypes(eDataType));
                                                
    3
    return memberTypes;
    3
    return enumerationLiterals;
                                                                
    Precondition Violations (6)
    Row Violation
    1Type java.util.List<java.lang.String> of variable enumerationLiterals does not match with type java.util.List<org.eclipse.emf.ecore.EDataType> of variable memberTypes
    2Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression setMemberTypes(basicGetMemberTypes(eDataType)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression setEnumerationFacet(basicGetEnumerationFacet(eDataType)) is a void method call, and thus it cannot be parameterized
    5Expression setMemberTypes(basicGetMemberTypes(eDataType)) is a void method call, and thus it cannot be parameterized
    6Type java.util.List<java.lang.String> of variable basicGetEnumerationFacet(eDataType) does not match with type java.util.List<org.eclipse.emf.ecore.EDataType> of variable basicGetMemberTypes(eDataType)