{
    try
    {
      Ecore2EcoreFactory theEcore2EcoreFactory = (Ecore2EcoreFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/2004/Ecore2Ecore"); 
      if (theEcore2EcoreFactory != null)
      {
        return theEcore2EcoreFactory;
      }
    }
    catch (Exception exception)
    {
      EcorePlugin.INSTANCE.log(exception);
    }
    return new Ecore2EcoreFactoryImpl();
  }