Program: 93687
Project: 93687
Buggy source:
/** 
 * {@inheritDoc}
 * @see org.eclipse.emf.compare.diff.metamodel.util.DiffSwitch#caseModelElementChangeRightTarget(org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget)
 */
@Override public Object caseModelElementChangeRightTarget(ModelElementChangeRightTarget object){
  if (!object.isRemote()) {
    EObject rightElement=object.getRightElement();
    View rightElementNotation=rightSemantic2notationMap.get(rightElement);
    if (rightElementNotation == null) {
      return null;
    }
    if (elementCopier == null) {
      elementCopier=MergeService.getCopier(object);
      elementCopier.putAll(right2leftSemanticMap);
    }
    if (object.eContainer() != null)     MergeService.merge(object,false);
    View newLeftElementNotation=notationElementRightToLeft(rightElementNotation);
    newLeftElementNotation.setElement(elementCopier.get(rightElement));
    annotateNotation(newLeftElementNotation,Constants.STYLE_STATE_VALUE_DELETED);
    annotateNotation(rightElementNotation,Constants.STYLE_STATE_VALUE_DELETED);
    for (TreeIterator<EObject> iter=rightElement.eAllContents(); iter.hasNext(); ) {
      EObject element=iter.next();
      View notationElement=rightSemantic2notationMap.get(element);
      if (notationElement == null) {
        continue;
      }
      View leftNotationElement=notationElementRightToLeft(notationElement);
      annotateNotation(leftNotationElement,Constants.STYLE_STATE_VALUE_DELETED);
      leftNotationElement.setElement(elementCopier.get(element));
      annotateNotation(notationElement,Constants.STYLE_STATE_VALUE_DELETED);
    }
    return object;
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see org.eclipse.emf.compare.diff.metamodel.util.DiffSwitch#caseModelElementChangeRightTarget(org.eclipse.emf.compare.diff.metamodel.ModelElementChangeRightTarget)
 */
@Override public Object caseModelElementChangeRightTarget(ModelElementChangeRightTarget object){
  Object result=null;
  if (!object.isRemote()) {
    EObject rightElement=object.getRightElement();
    View rightElementNotation=rightSemantic2notationMap.get(rightElement);
    if (rightElementNotation == null) {
      return null;
    }
    if (elementCopier == null) {
      elementCopier=MergeService.getCopier(object);
      elementCopier.putAll(right2leftSemanticMap);
    }
    if (object.eContainer() != null)     MergeService.merge(object,false);
    View newLeftElementNotation=notationElementRightToLeft(rightElementNotation);
    newLeftElementNotation.setElement(elementCopier.get(rightElement));
    annotateNotation(newLeftElementNotation,Constants.STYLE_STATE_VALUE_DELETED);
    annotateNotation(rightElementNotation,Constants.STYLE_STATE_VALUE_DELETED);
    for (TreeIterator<EObject> iter=rightElement.eAllContents(); iter.hasNext(); ) {
      EObject element=iter.next();
      View notationElement=rightSemantic2notationMap.get(element);
      if (notationElement == null) {
        continue;
      }
      View leftNotationElement=notationElementRightToLeft(notationElement);
      annotateNotation(leftNotationElement,Constants.STYLE_STATE_VALUE_DELETED);
      leftNotationElement.setElement(elementCopier.get(element));
      annotateNotation(notationElement,Constants.STYLE_STATE_VALUE_DELETED);
    }
    result=object;
  }
  return result;
}