code: public void referencedElementRemoved(ModelElementInstance referenceTargetElement, Object referenceIdentifier) {
      for (ModelElementInstance referenceSourceElement : findReferenceSourceElements(referenceTargetElement)) {
        if (referenceIdentifier.equals(getReferenceIdentifier(referenceSourceElement))) {
          removeReference(referenceSourceElement, referenceTargetElement);
        }
      }
    }
docs: Remove the reference if the target element is removed
  
  @param referenceTargetElement  the reference target model element instance, which is removed
  @param referenceIdentifier  the identifier of the reference to filter reference source elements