if (enumerationLiterals == null) { setEnumerationFacet(basicGetEnumerationFacet(eDataType)); } return enumerationLiterals;
if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); initialObjectNames.add(ecore2XMLPackage.getXMLMap().getName()); } return initialObjectNames;
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/mapping/ecore2xml/presentation/Ecore2XMLModelWizard.java
Method name: List getEnumerationFacet() Method name: Collection getInitialObjectNames()
Number of AST nodes: 3 Number of AST nodes: 4
1
if (enumerationLiterals == null)
1
if (initialObjectNames == null)
2
      {
2
    {
3
        setEnumerationFacet(basicGetEnumerationFacet(eDataType
3
      initialObjectNames = new ArrayList<String>();
4
));
4
      initialObjectNames.add(ecore2XMLPackage.getXMLMap().getName());
5
      }
5
    }
6
      return enumerationLiterals;
6
    return initialObjectNames;
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 in different classes
Number of node comparisons7
  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 fragment2
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (enumerationLiterals == null)
    1
    if (enumerationLiterals == null)
    1
    if (initialObjectNames == null)
    Differences
    Expression1Expression2Difference
    enumerationLiteralsinitialObjectNamesVARIABLE_NAME_MISMATCH
    1
    if (initialObjectNames == null)
                                                                                                
    2
    initialObjectNames = new ArrayList<String>();
    Preondition Violations
    Unmatched statement initialObjectNames=new ArrayList<String>(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2
    initialObjectNames = new ArrayList<String>();
    2
    setEnumerationFacet(basicGetEnumerationFacet(eDataType));
    2
    setEnumerationFacet(basicGetEnumerationFacet(eDataType));
    Preondition Violations
    Unmatched statement setEnumerationFacet(basicGetEnumerationFacet(eDataType)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                            
                                                                                                                                        
    3
    initialObjectNames.add(ecore2XMLPackage.getXMLMap().getName());
    3
    return enumerationLiterals;
    3
    return enumerationLiterals;
    4
    return initialObjectNames;
    Differences
    Expression1Expression2Difference
    enumerationLiteralsinitialObjectNamesVARIABLE_NAME_MISMATCH
    4
    return initialObjectNames;
    Precondition Violations (2)
    Row Violation
    1Unmatched statement initialObjectNames=new ArrayList<String>(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement setEnumerationFacet(basicGetEnumerationFacet(eDataType)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted