Program: 103423
Project: 103423
Buggy source:
/** 
 * Manages a mouse click over the contact list. When the left mouse button is clicked on a contact cell different things may happen depending on the contained component under the mouse. If the mouse is double clicked on the "contact name" the chat window is opened, configured to use the default protocol contact for the selected MetaContact. If the mouse is clicked on one of the protocol icons, the chat window is opened, configured to use the protocol contact corresponding to the given icon. When the right mouse button is clicked on a contact cell, the cell is selected and the <tt>ContactRightButtonMenu</tt> is opened. When the right mouse button is clicked on a group cell, the cell is selected and the <tt>GroupRightButtonMenu</tt> is opened. When the middle mouse button is clicked on a cell, the cell is selected.
 * @param e the <tt>MouseEvent</tt> that notified us of the click
 */
public void mouseClicked(MouseEvent e){
  TreePath path=this.getPathForLocation(e.getX(),e.getY());
  if (path == null)   return;
  Object lastComponent=path.getLastPathComponent();
  if (!(lastComponent instanceof TreeNode))   return;
  if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == 0)   return;
  if (lastComponent instanceof ContactNode) {
    fireContactListEvent(((ContactNode)lastComponent).getContactDescriptor(),ContactListEvent.CONTACT_CLICKED,e.getClickCount());
  }
 else   if (lastComponent instanceof GroupNode) {
    fireContactListEvent(((GroupNode)lastComponent).getGroupDescriptor(),ContactListEvent.GROUP_CLICKED,e.getClickCount());
  }
  if (e.getClickCount() < 2)   dispatchEventToButtons(e);
}

Fixed version (ground truth):
/** 
 * Manages a mouse click over the contact list. When the left mouse button is clicked on a contact cell different things may happen depending on the contained component under the mouse. If the mouse is double clicked on the "contact name" the chat window is opened, configured to use the default protocol contact for the selected MetaContact. If the mouse is clicked on one of the protocol icons, the chat window is opened, configured to use the protocol contact corresponding to the given icon. When the right mouse button is clicked on a contact cell, the cell is selected and the <tt>ContactRightButtonMenu</tt> is opened. When the right mouse button is clicked on a group cell, the cell is selected and the <tt>GroupRightButtonMenu</tt> is opened. When the middle mouse button is clicked on a cell, the cell is selected.
 * @param e the <tt>MouseEvent</tt> that notified us of the click
 */
public void mouseClicked(MouseEvent e){
  TreePath path=this.getPathForLocation(e.getX(),e.getY());
  if (path == null)   return;
  Object lastComponent=path.getLastPathComponent();
  if (!(lastComponent instanceof TreeNode))   return;
  if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == 0)   return;
  if (lastComponent instanceof ContactNode) {
    fireContactListEvent(((ContactNode)lastComponent).getContactDescriptor(),ContactListEvent.CONTACT_CLICKED,e.getClickCount());
  }
 else   if (lastComponent instanceof GroupNode) {
    fireContactListEvent(((GroupNode)lastComponent).getGroupDescriptor(),ContactListEvent.GROUP_CLICKED,e.getClickCount());
  }
}