Program: 103561
Project: 103561
Buggy source:
/** 
 * Creates the corresponding MetaContactGroup event and notifies all <tt>MetaContactListListener</tt>s that a MetaContactGroup is added or removed from the MetaContactList.
 * @param source the MetaContactGroup instance that is added to the MetaContactList
 * @param provider the ProtocolProviderService instance where this event occurred
 * @param sourceProtoGroup the proto group associated with this event ornull if the event does not concern a particular source group.
 * @param eventID one of the METACONTACT_GROUP_XXX static fields indicating the nature of the event.
 */
private void fireMetaContactGroupEvent(MetaContactGroup source,ProtocolProviderService provider,ContactGroup sourceProtoGroup,int eventID){
  MetaContactGroupEvent evt=new MetaContactGroupEvent(source,provider,sourceProtoGroup,eventID);
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str" + evt);
  for (  MetaContactListListener listener : getMetaContactListListeners()) {
switch (eventID) {
case MetaContactGroupEvent.META_CONTACT_GROUP_ADDED:
      listener.metaContactGroupAdded(evt);
    break;
case MetaContactGroupEvent.META_CONTACT_GROUP_REMOVED:
  listener.metaContactGroupRemoved(evt);
break;
case MetaContactGroupEvent.CHILD_CONTACTS_REORDERED:
listener.childContactsReordered(evt);
break;
case MetaContactGroupEvent.META_CONTACT_GROUP_RENAMED:
case MetaContactGroupEvent.CONTACT_GROUP_RENAMED_IN_META_GROUP:
case MetaContactGroupEvent.CONTACT_GROUP_REMOVED_FROM_META_GROUP:
case MetaContactGroupEvent.CONTACT_GROUP_ADDED_TO_META_GROUP:
listener.metaContactGroupModified(evt);
break;
default :
logger.error("String_Node_Str" + eventID + "String_Node_Str"+ evt);
}
}
}

Fixed version (ground truth):
/** 
 * Creates the corresponding MetaContactGroup event and notifies all <tt>MetaContactListListener</tt>s that a MetaContactGroup is added or removed from the MetaContactList. 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 MetaContactGroup instance that is added to the MetaContactList
 * @param provider the ProtocolProviderService instance where this event occurred
 * @param sourceProtoGroup the proto group associated with this event ornull if the event does not concern a particular source group.
 * @param eventID one of the METACONTACT_GROUP_XXX static fields indicating the nature of the event.
 */
private synchronized void fireMetaContactGroupEvent(MetaContactGroup source,ProtocolProviderService provider,ContactGroup sourceProtoGroup,int eventID){
  MetaContactGroupEvent evt=new MetaContactGroupEvent(source,provider,sourceProtoGroup,eventID);
  if (logger.isTraceEnabled())   logger.trace("String_Node_Str" + evt);
  for (  MetaContactListListener listener : getMetaContactListListeners()) {
switch (eventID) {
case MetaContactGroupEvent.META_CONTACT_GROUP_ADDED:
      listener.metaContactGroupAdded(evt);
    break;
case MetaContactGroupEvent.META_CONTACT_GROUP_REMOVED:
  listener.metaContactGroupRemoved(evt);
break;
case MetaContactGroupEvent.CHILD_CONTACTS_REORDERED:
listener.childContactsReordered(evt);
break;
case MetaContactGroupEvent.META_CONTACT_GROUP_RENAMED:
case MetaContactGroupEvent.CONTACT_GROUP_RENAMED_IN_META_GROUP:
case MetaContactGroupEvent.CONTACT_GROUP_REMOVED_FROM_META_GROUP:
case MetaContactGroupEvent.CONTACT_GROUP_ADDED_TO_META_GROUP:
listener.metaContactGroupModified(evt);
break;
default :
logger.error("String_Node_Str" + eventID + "String_Node_Str"+ evt);
}
}
}