Program: 94675
Project: 94675
Buggy source:
public boolean addContainer(IContainer container){
  if (container == null)   return false;
  IPresenceContainerAdapter containerAdapter=(IPresenceContainerAdapter)container.getAdapter(IPresenceContainerAdapter.class);
  if (containerAdapter == null)   return false;
  MultiRosterAccount account=new MultiRosterAccount(this,container,containerAdapter);
  if (!addRosterAccount(account)) {
    return false;
  }
  IRosterManager manager=containerAdapter.getRosterManager();
  try {
    if (setAvailableAction.isChecked() || setOfflineAction.isChecked()) {
      manager.getPresenceSender().sendPresenceUpdate(null,new Presence(null,null,IPresence.Mode.AVAILABLE));
      setOfflineAction.setChecked(false);
      setAvailableAction.setChecked(true);
    }
 else     if (setAwayAction.isChecked()) {
      manager.getPresenceSender().sendPresenceUpdate(null,new Presence(null,null,IPresence.Mode.AWAY));
    }
 else     if (setDNDAction.isChecked()) {
      manager.getPresenceSender().sendPresenceUpdate(null,new Presence(null,null,IPresence.Mode.DND));
    }
 else     if (setInvisibleAction.isChecked()) {
      manager.getPresenceSender().sendPresenceUpdate(null,new Presence(null,null,IPresence.Mode.INVISIBLE));
    }
  }
 catch (  ECFException e) {
    Activator.getDefault().getLog().log(e.getStatus());
  }
  containerAdapter.getRosterManager().addPresenceListener(presenceListener);
  setStatusMenu.setVisible(true);
  getViewSite().getActionBars().getMenuManager().update(true);
  treeViewer.add(treeViewer.getInput(),account.getRoster());
  pageBook.showPage(treeViewer.getControl());
  return true;
}

Fixed version (ground truth):
public boolean addContainer(IContainer container){
  if (container == null)   return false;
  IPresenceContainerAdapter containerAdapter=(IPresenceContainerAdapter)container.getAdapter(IPresenceContainerAdapter.class);
  if (containerAdapter == null)   return false;
  if (containerPresent(container))   return false;
  MultiRosterAccount account=new MultiRosterAccount(this,container,containerAdapter);
  if (!addRosterAccount(account))   return false;
  IRosterManager manager=containerAdapter.getRosterManager();
  try {
    if (setAvailableAction.isChecked() || setOfflineAction.isChecked()) {
      manager.getPresenceSender().sendPresenceUpdate(null,new Presence(null,null,IPresence.Mode.AVAILABLE));
      setOfflineAction.setChecked(false);
      setAvailableAction.setChecked(true);
    }
 else     if (setAwayAction.isChecked()) {
      manager.getPresenceSender().sendPresenceUpdate(null,new Presence(null,null,IPresence.Mode.AWAY));
    }
 else     if (setDNDAction.isChecked()) {
      manager.getPresenceSender().sendPresenceUpdate(null,new Presence(null,null,IPresence.Mode.DND));
    }
 else     if (setInvisibleAction.isChecked()) {
      manager.getPresenceSender().sendPresenceUpdate(null,new Presence(null,null,IPresence.Mode.INVISIBLE));
    }
  }
 catch (  ECFException e) {
    Activator.getDefault().getLog().log(e.getStatus());
  }
  containerAdapter.getRosterManager().addPresenceListener(presenceListener);
  setStatusMenu.setVisible(true);
  getViewSite().getActionBars().getMenuManager().update(true);
  treeViewer.add(treeViewer.getInput(),account.getRoster());
  pageBook.showPage(treeViewer.getControl());
  return true;
}