Program: 121859
Project: 121859
Buggy source:
@Override public void notifyChanged(Notification notification){
  super.notifyChanged(notification);
  int type=notification.getEventType();
  int featureId=notification.getFeatureID(XmlmapPackage.class);
switch (type) {
case Notification.SET:
switch (featureId) {
case XmlmapPackage.TREE_NODE__TYPE:
      if (XmlMapUtil.DOCUMENT.equals(notification.getOldValue()) || !XmlMapUtil.DOCUMENT.equals(notification.getOldValue()) && XmlMapUtil.DOCUMENT.equals(notification.getNewValue())) {
        AbstractInOutTreeEditPart inOutTreeEditPart=getInOutTreeEditPart(this);
        if (inOutTreeEditPart.getFigure() instanceof OutputXmlTreeFigure) {
          ((OutputXmlTreeFigure)inOutTreeEditPart.getFigure()).update(XmlmapPackage.TREE_NODE__TYPE);
        }
      }
    break;
case XmlmapPackage.TREE_NODE__LOOP:
  ((TreeNodeFigure)getFigure()).getElement().getBranchContent().updateLoopButtonFigure();
AbstractInOutTree abstractInOutTree=XmlMapUtil.getAbstractInOutTree((OutputTreeNode)getModel());
if (abstractInOutTree != null) {
((XmlMapGraphicViewer)getViewer()).getMapperManager().getProblemsAnalyser().checkProblems(abstractInOutTree);
((XmlMapGraphicViewer)getViewer()).getMapperManager().getMapperUI().updateStatusBar();
}
}
break;
case Notification.REMOVE:
case Notification.REMOVE_MANY:
switch (featureId) {
case XmlmapPackage.ABSTRACT_NODE__INCOMING_CONNECTIONS:
Object oldObject=notification.getOldValue();
if (getViewer() instanceof XmlMapGraphicViewer) {
InputXmlTree mainInputTree=((XmlMapGraphicViewer)getViewer()).getMapperManager().getMainInputTree();
if (oldObject instanceof Connection) {
List list=new ArrayList();
list.add(oldObject);
InputLoopTableUtil.removeSourceLoopFromInputLoopTable(list,(OutputTreeNode)getModel(),mainInputTree);
}
 else if (oldObject instanceof List) {
InputLoopTableUtil.removeSourceLoopFromInputLoopTable((List)oldObject,(OutputTreeNode)getModel(),mainInputTree);
}
}
}
case Notification.ADD:
case Notification.ADD_MANY:
switch (featureId) {
case XmlmapPackage.INPUT_LOOP_NODES_TABLE__INPUTLOOPNODES:
case XmlmapPackage.OUTPUT_TREE_NODE__INPUT_LOOP_NODES_TABLE:
if (getFigure() instanceof TreeNodeFigure) {
TreeNodeFigure outputFigure=(TreeNodeFigure)getFigure();
if (outputFigure.getElement() != null) {
outputFigure.getElement().getBranchContent().updateLoopButtonFigure();
}
}
break;
default :
break;
}
}
}

Fixed version (ground truth):
@Override public void notifyChanged(Notification notification){
  super.notifyChanged(notification);
  int type=notification.getEventType();
  int featureId=notification.getFeatureID(XmlmapPackage.class);
switch (type) {
case Notification.SET:
switch (featureId) {
case XmlmapPackage.TREE_NODE__TYPE:
      if (XmlMapUtil.DOCUMENT.equals(notification.getOldValue()) || !XmlMapUtil.DOCUMENT.equals(notification.getOldValue()) && XmlMapUtil.DOCUMENT.equals(notification.getNewValue())) {
        AbstractInOutTreeEditPart inOutTreeEditPart=getInOutTreeEditPart(this);
        if (inOutTreeEditPart.getFigure() instanceof OutputXmlTreeFigure) {
          ((OutputXmlTreeFigure)inOutTreeEditPart.getFigure()).update(XmlmapPackage.TREE_NODE__TYPE);
        }
      }
    break;
case XmlmapPackage.TREE_NODE__LOOP:
  ((TreeNodeFigure)getFigure()).getElement().getBranchContent().updateLoopButtonFigure();
AbstractInOutTree abstractInOutTree=XmlMapUtil.getAbstractInOutTree((OutputTreeNode)getModel());
if (abstractInOutTree != null) {
((XmlMapGraphicViewer)getViewer()).getMapperManager().getProblemsAnalyser().checkProblems(abstractInOutTree);
((XmlMapGraphicViewer)getViewer()).getMapperManager().getMapperUI().updateStatusBar();
}
}
break;
case Notification.REMOVE:
case Notification.REMOVE_MANY:
switch (featureId) {
}
case Notification.ADD:
case Notification.ADD_MANY:
switch (featureId) {
case XmlmapPackage.INPUT_LOOP_NODES_TABLE__INPUTLOOPNODES:
case XmlmapPackage.OUTPUT_TREE_NODE__INPUT_LOOP_NODES_TABLE:
if (getFigure() instanceof TreeNodeFigure) {
TreeNodeFigure outputFigure=(TreeNodeFigure)getFigure();
if (outputFigure.getElement() != null) {
outputFigure.getElement().getBranchContent().updateLoopButtonFigure();
}
}
break;
default :
break;
}
}
}