EClass eClass = (EClass)ecorePackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); EObject rootObject = ecoreFactory.create(eClass);
EClass eClass = (EClass)ecore2EcorePackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); EObject rootObject = ecore2EcoreFactory.create(eClass);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreModelWizard.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2ecore/presentation/Ecore2EcoreModelWizard.java
Method name: EObject createInitialModel() Method name: EObject createInitialModelGen()
Number of AST nodes: 2 Number of AST nodes: 2
1
EClass eClass = (EClass)ecorePackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
1
EClass eClass = (EClass)ecore2EcorePackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
2
    EObject rootObject = ecoreFactory.create(eClass);
2
    EObject rootObject = ecore2EcoreFactory.create(eClass);
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                                                                                                                                              
    1
    EClass eClass = (EClass)ecore2EcorePackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
    1
    EClass eClass = (EClass)ecorePackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
                                                                                                                                                                                                                  
    2
    EObject rootObject = ecoreFactory.create(eClass);
    2
    EObject rootObject = ecoreFactory.create(eClass);
    2
    EObject rootObject = ecore2EcoreFactory.create(eClass);
    Differences
    Expression1Expression2Difference
    ecoreFactoryecore2EcoreFactoryVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EcoreFactoryorg.eclipse.emf.mapping.ecore2ecore.Ecore2EcoreFactoryVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EcoreFactory of variable ecoreFactory does not match with type org.eclipse.emf.mapping.ecore2ecore.Ecore2EcoreFactory of variable ecore2EcoreFactory
    • Make classes org.eclipse.emf.ecore.EcoreFactory and org.eclipse.emf.mapping.ecore2ecore.Ecore2EcoreFactory extend a common superclass
    2
    EObject rootObject = ecore2EcoreFactory.create(eClass);
    Precondition Violations (1)
    Row Violation
    1Type org.eclipse.emf.ecore.EcoreFactory of variable ecoreFactory does not match with type org.eclipse.emf.mapping.ecore2ecore.Ecore2EcoreFactory of variable ecore2EcoreFactory