Program: 103558
Project: 103558
Buggy source:
/** 
 * Creates the corresponding <tt>ProtoContactEvent</tt> instance and notifies all <tt>MetaContactListListener</tt>s that a protocol specific <tt>Contact</tt> has been added moved or removed.
 * @param source the contact that has caused the event.
 * @param eventName One of the ProtoContactEvent.PROTO_CONTACT_XXX fieldsindicating the exact type of the event.
 * @param oldParent the <tt>MetaContact</tt> that was wrapping the source<tt>Contact</tt> before the event occurred or <tt>null</tt> if the event is caused by adding a new <tt>Contact</tt>
 * @param newParent the <tt>MetaContact</tt> that is wrapping the source<tt>Contact</tt> after the event occurred or <tt>null</tt> if the event is caused by removing a <tt>Contact</tt>
 */
private void fireProtoContactEvent(Contact source,String eventName,MetaContact oldParent,MetaContact newParent){
  ProtoContactEvent event=new ProtoContactEvent(source,eventName,oldParent,newParent);
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str" + event);
  for (  MetaContactListListener listener : getMetaContactListListeners()) {
    if (eventName.equals(ProtoContactEvent.PROTO_CONTACT_ADDED)) {
      listener.protoContactAdded(event);
    }
 else     if (eventName.equals(ProtoContactEvent.PROTO_CONTACT_MOVED)) {
      listener.protoContactMoved(event);
    }
 else     if (eventName.equals(ProtoContactEvent.PROTO_CONTACT_REMOVED)) {
      listener.protoContactRemoved(event);
    }
 else     if (eventName.equals(ProtoContactEvent.PROTO_CONTACT_MODIFIED)) {
      listener.protoContactModified(event);
    }
  }
}

Fixed version (ground truth):
/** 
 * Creates the corresponding <tt>ProtoContactEvent</tt> instance and notifies all <tt>MetaContactListListener</tt>s that a protocol specific <tt>Contact</tt> has been added moved or removed. Synchronized to avoid firing events when we are editing the account (there we temporally remove and then add again the storage manager and don't want anybody to interrupt us).
 * @param source the contact that has caused the event.
 * @param eventName One of the ProtoContactEvent.PROTO_CONTACT_XXX fieldsindicating the exact type of the event.
 * @param oldParent the <tt>MetaContact</tt> that was wrapping the source<tt>Contact</tt> before the event occurred or <tt>null</tt> if the event is caused by adding a new <tt>Contact</tt>
 * @param newParent the <tt>MetaContact</tt> that is wrapping the source<tt>Contact</tt> after the event occurred or <tt>null</tt> if the event is caused by removing a <tt>Contact</tt>
 */
private synchronized void fireProtoContactEvent(Contact source,String eventName,MetaContact oldParent,MetaContact newParent){
  ProtoContactEvent event=new ProtoContactEvent(source,eventName,oldParent,newParent);
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str" + event);
  for (  MetaContactListListener listener : getMetaContactListListeners()) {
    if (eventName.equals(ProtoContactEvent.PROTO_CONTACT_ADDED)) {
      listener.protoContactAdded(event);
    }
 else     if (eventName.equals(ProtoContactEvent.PROTO_CONTACT_MOVED)) {
      listener.protoContactMoved(event);
    }
 else     if (eventName.equals(ProtoContactEvent.PROTO_CONTACT_REMOVED)) {
      listener.protoContactRemoved(event);
    }
 else     if (eventName.equals(ProtoContactEvent.PROTO_CONTACT_MODIFIED)) {
      listener.protoContactModified(event);
    }
  }
}