Program: 101975
Project: 101975
Buggy source:
/** 
 * Delete the emf object the targetResource that matches the supplied RelationalReference
 * @param targetResource the target model
 * @param ref the relational reference
 * @throws ModelerCoreException
 */
private void deleteMatchingChild(ModelResource targetResource,RelationalReference ref) throws ModelerCoreException {
  int refType=ref.getType();
  Collection<EObject> existingChildren=targetResource.getEmfResource().getContents();
  EObject childToDelete=null;
  for (  EObject child : existingChildren) {
    String eObjName=this.modelEditor.getName(child);
    if (refType == RelationalConstants.TYPES.TABLE && child instanceof BaseTable) {
      if (CoreStringUtil.equals(eObjName,ref.getName())) {
        childToDelete=child;
        break;
      }
    }
 else     if (refType == RelationalConstants.TYPES.VIEW && child instanceof View) {
      if (CoreStringUtil.equals(eObjName,ref.getName())) {
        childToDelete=child;
        break;
      }
    }
 else     if (refType == RelationalConstants.TYPES.PROCEDURE && child instanceof Procedure) {
      if (CoreStringUtil.equals(eObjName,ref.getName())) {
        childToDelete=child;
        break;
      }
    }
 else     if (refType == RelationalConstants.TYPES.INDEX && child instanceof Index) {
      if (CoreStringUtil.equals(eObjName,ref.getName())) {
        childToDelete=child;
        break;
      }
    }
 else     if (refType == RelationalConstants.TYPES.SCHEMA && child instanceof Schema) {
      if (CoreStringUtil.equals(eObjName,ref.getName())) {
        childToDelete=child;
        break;
      }
    }
 else     if (refType == RelationalConstants.TYPES.CATALOG && child instanceof Catalog) {
      if (CoreStringUtil.equals(eObjName,ref.getName())) {
        childToDelete=child;
        break;
      }
    }
  }
  if (childToDelete != null) {
    this.modelEditor.delete(childToDelete);
  }
}

Fixed version (ground truth):
/** 
 * Delete the emf object the targetResource that matches the supplied RelationalReference
 * @param targetResource the target model
 * @param ref the relational reference
 * @throws ModelerCoreException
 */
private void deleteMatchingChild(ModelResource targetResource,RelationalReference ref) throws ModelerCoreException {
  int refType=ref.getType();
  Collection<EObject> existingChildren=targetResource.getEmfResource().getContents();
  EObject childToDelete=null;
  for (  EObject child : existingChildren) {
    String eObjName=this.getModelEditor().getName(child);
    if (refType == RelationalConstants.TYPES.TABLE && child instanceof BaseTable) {
      if (CoreStringUtil.equals(eObjName,ref.getName())) {
        childToDelete=child;
        break;
      }
    }
 else     if (refType == RelationalConstants.TYPES.VIEW && child instanceof View) {
      if (CoreStringUtil.equals(eObjName,ref.getName())) {
        childToDelete=child;
        break;
      }
    }
 else     if (refType == RelationalConstants.TYPES.PROCEDURE && child instanceof Procedure) {
      if (CoreStringUtil.equals(eObjName,ref.getName())) {
        childToDelete=child;
        break;
      }
    }
 else     if (refType == RelationalConstants.TYPES.INDEX && child instanceof Index) {
      if (CoreStringUtil.equals(eObjName,ref.getName())) {
        childToDelete=child;
        break;
      }
    }
 else     if (refType == RelationalConstants.TYPES.SCHEMA && child instanceof Schema) {
      if (CoreStringUtil.equals(eObjName,ref.getName())) {
        childToDelete=child;
        break;
      }
    }
 else     if (refType == RelationalConstants.TYPES.CATALOG && child instanceof Catalog) {
      if (CoreStringUtil.equals(eObjName,ref.getName())) {
        childToDelete=child;
        break;
      }
    }
  }
  if (childToDelete != null) {
    this.getModelEditor().delete(childToDelete);
  }
}