Program: 103074
Project: 103074
Buggy source:
public void contactPresenceStatusChanged(ContactPresenceStatusChangeEvent evt){
  if (evt.getOldStatus() == evt.getNewStatus())   return;
  final Contact sourceContact=evt.getSourceContact();
  final MetaContact metaContact=GuiActivator.getContactListService().findMetaContactByContact(sourceContact);
  if (metaContact == null)   return;
  boolean uiContactCreated=false;
  UIContactImpl uiContact;
synchronized (metaContact) {
    uiContact=getUIContact(metaContact);
    if (uiContact == null) {
      uiContact=createUIContact(metaContact);
      uiContactCreated=true;
    }
  }
  ContactListFilter currentFilter=GuiActivator.getContactList().getCurrentFilter();
  if (uiContactCreated) {
    if (currentFilter != null && currentFilter.isMatching(uiContact)) {
      MetaContactGroup parentGroup=metaContact.getParentMetaContactGroup();
      UIGroup uiGroup=null;
      if (!MetaContactListSource.isRootGroup(parentGroup)) {
synchronized (parentGroup) {
          uiGroup=MetaContactListSource.getUIGroup(parentGroup);
          if (uiGroup == null)           uiGroup=MetaContactListSource.createUIGroup(parentGroup);
        }
      }
      if (logger.isDebugEnabled())       logger.debug("String_Node_Str" + uiContact.getDisplayName());
      GuiActivator.getContactList().addContact(uiContact,uiGroup,true,true);
    }
 else     removeUIContact(metaContact);
  }
 else {
    if (currentFilter != null && !currentFilter.isMatching(uiContact)) {
      if (logger.isDebugEnabled())       logger.debug("String_Node_Str" + uiContact.getDisplayName());
      GuiActivator.getContactList().removeContact(uiContact);
    }
 else     GuiActivator.getContactList().nodeChanged(uiContact.getContactNode());
  }
}

Fixed version (ground truth):
public void contactPresenceStatusChanged(ContactPresenceStatusChangeEvent evt){
  if (evt.getOldStatus() == evt.getNewStatus() && !evt.isResourceChanged()) {
    return;
  }
  final Contact sourceContact=evt.getSourceContact();
  final MetaContact metaContact=GuiActivator.getContactListService().findMetaContactByContact(sourceContact);
  if (metaContact == null)   return;
  boolean uiContactCreated=false;
  UIContactImpl uiContact;
synchronized (metaContact) {
    uiContact=getUIContact(metaContact);
    if (uiContact == null) {
      uiContact=createUIContact(metaContact);
      uiContactCreated=true;
    }
  }
  ContactListFilter currentFilter=GuiActivator.getContactList().getCurrentFilter();
  if (uiContactCreated) {
    if (currentFilter != null && currentFilter.isMatching(uiContact)) {
      MetaContactGroup parentGroup=metaContact.getParentMetaContactGroup();
      UIGroup uiGroup=null;
      if (!MetaContactListSource.isRootGroup(parentGroup)) {
synchronized (parentGroup) {
          uiGroup=MetaContactListSource.getUIGroup(parentGroup);
          if (uiGroup == null)           uiGroup=MetaContactListSource.createUIGroup(parentGroup);
        }
      }
      if (logger.isDebugEnabled())       logger.debug("String_Node_Str" + uiContact.getDisplayName());
      GuiActivator.getContactList().addContact(uiContact,uiGroup,true,true);
    }
 else     removeUIContact(metaContact);
  }
 else {
    if (currentFilter != null && !currentFilter.isMatching(uiContact)) {
      if (logger.isDebugEnabled())       logger.debug("String_Node_Str" + uiContact.getDisplayName());
      GuiActivator.getContactList().removeContact(uiContact);
    }
 else     GuiActivator.getContactList().nodeChanged(uiContact.getContactNode());
  }
}