Program: 103012
Project: 103012
Buggy source:
/** 
 * Loads the tooltip with the data for current metacontact.
 * @param tip the tooltip to fill.
 */
private void loadTooltip(final ExtendedTooltip tip){
  Iterator<Contact> i=metaContact.getContacts();
  MetaContactPhoneUtil contactPhoneUtil=MetaContactPhoneUtil.getPhoneUtil(metaContact);
  String statusMessage=null;
  Contact protocolContact;
  boolean isLoading=false;
  while (i.hasNext()) {
    protocolContact=i.next();
    if (statusMessage == null && protocolContact.getStatusMessage() != null && protocolContact.getStatusMessage().length() > 0)     statusMessage=protocolContact.getStatusMessage();
    if (ConfigurationUtils.isHideAccountStatusSelectorsEnabled())     break;
    ImageIcon protocolStatusIcon=ImageLoader.getIndexedProtocolIcon(ImageUtils.getBytesInImage(protocolContact.getPresenceStatus().getStatusIcon()),protocolContact.getProtocolProvider());
    String contactAddress=protocolContact.getAddress();
    tip.addLine(protocolStatusIcon,contactAddress);
    addContactResourceTooltipLines(tip,protocolContact);
    if (!protocolContact.getProtocolProvider().isRegistered())     continue;
    List<String> phones=contactPhoneUtil.getPhones(protocolContact,new OperationSetServerStoredContactInfo.DetailsResponseListener(){
      public void detailsRetrieved(      final Iterator<GenericDetail> details){
        if (!SwingUtilities.isEventDispatchThread()) {
          SwingUtilities.invokeLater(new Runnable(){
            public void run(){
              detailsRetrieved(details);
            }
          }
);
          return;
        }
        tip.removeAllLines();
        loadTooltip(tip);
      }
    }
,true);
    if (phones != null) {
      addPhoneTooltipLines(tip,phones.iterator());
    }
 else     isLoading=true;
  }
  if (isLoading)   tip.addLine(null,GuiActivator.getResources().getI18NString("String_Node_Str"));
  if (statusMessage != null)   tip.setBottomText(statusMessage);
}

Fixed version (ground truth):
/** 
 * Loads the tooltip with the data for current metacontact.
 * @param tip the tooltip to fill.
 */
private void loadTooltip(final ExtendedTooltip tip){
  Iterator<Contact> i=metaContact.getContacts();
  MetaContactPhoneUtil contactPhoneUtil=MetaContactPhoneUtil.getPhoneUtil(metaContact);
  String statusMessage=null;
  Contact protocolContact;
  boolean isLoading=false;
  while (i.hasNext()) {
    protocolContact=i.next();
    if (statusMessage == null) {
      statusMessage=protocolContact.getStatusMessage();
      if ((statusMessage != null) && (statusMessage.length() == 0))       statusMessage=null;
    }
    if (ConfigurationUtils.isHideAccountStatusSelectorsEnabled())     break;
    ImageIcon protocolStatusIcon=getContactPresenceStatusIcon(protocolContact);
    if (protocolStatusIcon != null) {
      protocolStatusIcon=ImageLoader.getIndexedProtocolIcon(protocolStatusIcon.getImage(),protocolContact.getProtocolProvider());
    }
    String contactAddress=protocolContact.getAddress();
    tip.addLine(protocolStatusIcon,contactAddress);
    addContactResourceTooltipLines(tip,protocolContact);
    if (!protocolContact.getProtocolProvider().isRegistered())     continue;
    List<String> phones=contactPhoneUtil.getPhones(protocolContact,new OperationSetServerStoredContactInfo.DetailsResponseListener(){
      public void detailsRetrieved(      final Iterator<GenericDetail> details){
        if (!SwingUtilities.isEventDispatchThread()) {
          SwingUtilities.invokeLater(new Runnable(){
            public void run(){
              detailsRetrieved(details);
            }
          }
);
          return;
        }
        tip.removeAllLines();
        loadTooltip(tip);
      }
    }
,true);
    if (phones != null) {
      addPhoneTooltipLines(tip,phones.iterator());
    }
 else     isLoading=true;
  }
  if (isLoading)   tip.addLine(null,GuiActivator.getResources().getI18NString("String_Node_Str"));
  if (statusMessage != null)   tip.setBottomText(statusMessage);
}