if (pattern == null) { setPatternFacet(basicGetPatternFacet(eDataType)); } return pattern;
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 getPatternFacet() Method name: List getMemberTypes()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (pattern == null)
1
if (memberTypes == null)
2
      {
2
      {
3
        setPatternFacet(basicGetPatternFacet(eDataType));
3
        setMemberTypes(basicGetMemberTypes(eDataType));
4
      }
4
      }
5
      return pattern;
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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (pattern == null)
    1
    if (pattern == null)
    1
    if (memberTypes == null)
    Differences
    Expression1Expression2Difference
    patternmemberTypesVARIABLE_NAME_MISMATCH
    java.util.Listjava.util.ListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.List<java.lang.String> of variable pattern 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
    setPatternFacet(basicGetPatternFacet(eDataType));
    2
    setPatternFacet(basicGetPatternFacet(eDataType));
    2
    setMemberTypes(basicGetMemberTypes(eDataType));
    Differences
    Expression1Expression2Difference
    setPatternFacetsetMemberTypesMETHOD_INVOCATION_NAME_MISMATCH
    basicGetPatternFacetbasicGetMemberTypesMETHOD_INVOCATION_NAME_MISMATCH
    java.util.Listjava.util.ListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression setPatternFacet(basicGetPatternFacet(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 setPatternFacet(basicGetPatternFacet(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 basicGetPatternFacet(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 pattern;
                                        
    Precondition Violations (6)
    Row Violation
    1Type java.util.List<java.lang.String> of variable pattern does not match with type java.util.List<org.eclipse.emf.ecore.EDataType> of variable memberTypes
    2Expression setPatternFacet(basicGetPatternFacet(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 setPatternFacet(basicGetPatternFacet(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 basicGetPatternFacet(eDataType) does not match with type java.util.List<org.eclipse.emf.ecore.EDataType> of variable basicGetMemberTypes(eDataType)