Program: 102914
Project: 102914
Buggy source:
/** 
 * Returns the tool tip opened on mouse over.
 * @return the tool tip opened on mouse over
 */
@Override public ExtendedTooltip getToolTip(){
  ExtendedTooltip tip=new ExtendedTooltip(true);
  byte[] avatarImage=sourceContact.getImage();
  if (avatarImage != null && avatarImage.length > 0)   tip.setImage(new ImageIcon(avatarImage));
  tip.setTitle(sourceContact.getDisplayName());
  String displayDetails=getDisplayDetails();
  if (displayDetails != null)   tip.addLine(new JLabel[]{new JLabel(getDisplayDetails())});
  try {
    List<ContactDetail> details=sourceContact.getContactDetails(ContactDetail.Category.Phone);
    if (details != null && details.size() > 0)     addDetailsToToolTip(details,GuiActivator.getResources().getI18NString("String_Node_Str"),tip);
    details=sourceContact.getContactDetails(ContactDetail.Category.Email);
    if (details != null && details.size() > 0)     addDetailsToToolTip(details,GuiActivator.getResources().getI18NString("String_Node_Str"),tip);
    details=sourceContact.getContactDetails(ContactDetail.Category.InstantMessaging);
    if (details != null && details.size() > 0)     addDetailsToToolTip(details,GuiActivator.getResources().getI18NString("String_Node_Str"),tip);
  }
 catch (  OperationNotSupportedException e) {
    List<ContactDetail> telDetails=sourceContact.getContactDetails(OperationSetBasicTelephony.class);
    if (telDetails == null || telDetails.isEmpty())     return tip;
    List<ContactDetail> allDetails=sourceContact.getContactDetails();
    addDetailsToToolTip(allDetails,GuiActivator.getResources().getI18NString("String_Node_Str"),tip);
  }
  return tip;
}

Fixed version (ground truth):
/** 
 * Returns the tool tip opened on mouse over.
 * @return the tool tip opened on mouse over
 */
@Override public ExtendedTooltip getToolTip(){
  ExtendedTooltip tip=new ExtendedTooltip(true);
  tip.setImage(getScaledAvatar(false,30,30));
  tip.setTitle(sourceContact.getDisplayName());
  String displayDetails=getDisplayDetails();
  if (displayDetails != null)   tip.addLine(new JLabel[]{new JLabel(getDisplayDetails())});
  try {
    List<ContactDetail> details=sourceContact.getContactDetails(ContactDetail.Category.Phone);
    if (details != null && details.size() > 0)     addDetailsToToolTip(details,GuiActivator.getResources().getI18NString("String_Node_Str"),tip);
    details=sourceContact.getContactDetails(ContactDetail.Category.Email);
    if (details != null && details.size() > 0)     addDetailsToToolTip(details,GuiActivator.getResources().getI18NString("String_Node_Str"),tip);
    details=sourceContact.getContactDetails(ContactDetail.Category.InstantMessaging);
    if (details != null && details.size() > 0)     addDetailsToToolTip(details,GuiActivator.getResources().getI18NString("String_Node_Str"),tip);
  }
 catch (  OperationNotSupportedException e) {
    List<ContactDetail> telDetails=sourceContact.getContactDetails(OperationSetBasicTelephony.class);
    if (telDetails == null || telDetails.isEmpty())     return tip;
    List<ContactDetail> allDetails=sourceContact.getContactDetails();
    addDetailsToToolTip(allDetails,GuiActivator.getResources().getI18NString("String_Node_Str"),tip);
  }
  return tip;
}