Program: 104177
Project: 104177
Buggy source:
/** 
 * Constructs the <tt>ChatInviteDialog</tt>.
 * @param chatPanel the <tt>ChatPanel</tt> corresponding to the<tt>ChatRoom</tt>, where the contact is invited. 
 */
public ChatInviteDialog(ChatPanel chatPanel){
  this.chatPanel=chatPanel;
  this.setModal(false);
  String title=GuiActivator.getResources().getI18NString("String_Node_Str");
  this.setTitle(title);
  TransparentPanel mainPanel=new TransparentPanel(new BorderLayout(5,5));
  TransparentPanel northPanel=new TransparentPanel(new BorderLayout(10,10));
  mainPanel.setPreferredSize(new Dimension(450,350));
  mainPanel.setBorder(BorderFactory.createEmptyBorder(15,15,15,15));
  this.reasonArea.setBorder(BorderFactory.createTitledBorder(GuiActivator.getResources().getI18NString("String_Node_Str")));
  JTextArea infoTextArea=new JTextArea();
  infoTextArea.setText(GuiActivator.getResources().getI18NString("String_Node_Str"));
  infoTextArea.setFont(Constants.FONT.deriveFont(Font.BOLD,12f));
  infoTextArea.setLineWrap(true);
  infoTextArea.setOpaque(false);
  infoTextArea.setWrapStyleWord(true);
  infoTextArea.setEditable(false);
  JLabel iconLabel=new JLabel(new ImageIcon(ImageLoader.getImage(ImageLoader.INVITE_DIALOG_ICON)));
  northPanel.add(iconLabel,BorderLayout.WEST);
  northPanel.add(infoTextArea,BorderLayout.CENTER);
  TransparentPanel buttonsPanel=new TransparentPanel(new FlowLayout(FlowLayout.RIGHT));
  inviteButton.addActionListener(this);
  cancelButton.addActionListener(this);
  buttonsPanel.add(inviteButton);
  buttonsPanel.add(cancelButton);
  this.getRootPane().setDefaultButton(inviteButton);
  inviteButton.setMnemonic(GuiActivator.getResources().getI18nMnemonic("String_Node_Str"));
  cancelButton.setMnemonic(GuiActivator.getResources().getI18nMnemonic("String_Node_Str"));
  MainFrame mainFrame=GuiActivator.getUIService().getMainFrame();
  final ContactList contactList=new ContactList(mainFrame);
  final ContactList selectedContactList=new ContactList(mainFrame);
  contactList.setModel(contactListModel);
  selectedContactList.setModel(selectedContactListModel);
  contactList.setMouseMotionListener(null);
  contactList.setMouseListener(new MouseAdapter(){
    public void mouseClicked(    MouseEvent e){
      if (e.getClickCount() > 1) {
        MetaContact metaContact=(MetaContact)contactList.getSelectedValue();
        moveContactFromLeftToRight(metaContact);
      }
    }
  }
);
  selectedContactList.setMouseMotionListener(null);
  selectedContactList.setMouseListener(new MouseAdapter(){
    public void mouseClicked(    MouseEvent e){
      if (e.getClickCount() > 1) {
        MetaContact metaContact=(MetaContact)selectedContactList.getSelectedValue();
        moveContactFromRightToLeft(metaContact);
      }
    }
  }
);
  JScrollPane contactListScrollPane=new JScrollPane();
  contactListScrollPane.setOpaque(false);
  contactListScrollPane.getViewport().setOpaque(false);
  contactListScrollPane.getViewport().add(contactList);
  contactListScrollPane.getViewport().setBorder(null);
  contactListScrollPane.setViewportBorder(null);
  contactListScrollPane.setBorder(SIPCommBorders.getRoundBorder());
  JScrollPane selectedListScrollPane=new JScrollPane();
  selectedListScrollPane.setOpaque(false);
  selectedListScrollPane.getViewport().setOpaque(false);
  selectedListScrollPane.getViewport().add(selectedContactList);
  selectedListScrollPane.getViewport().setBorder(null);
  selectedListScrollPane.setViewportBorder(null);
  selectedListScrollPane.setBorder(SIPCommBorders.getRoundBorder());
  JPanel listPanel=new JPanel(new GridLayout(0,2,5,5));
  listPanel.setPreferredSize(new Dimension(400,200));
  listPanel.add(contactListScrollPane);
  listPanel.add(selectedListScrollPane);
  listPanel.setOpaque(false);
  this.initContactListData();
  JPanel addRemoveButtonsPanel=new JPanel(new GridLayout(0,2,5,5));
  addRemoveButtonsPanel.setOpaque(false);
  JButton addContactButton=new JButton(GuiActivator.getResources().getI18NString("String_Node_Str"));
  JButton removeContactButton=new JButton(GuiActivator.getResources().getI18NString("String_Node_Str"));
  addRemoveButtonsPanel.add(addContactButton);
  addRemoveButtonsPanel.add(removeContactButton);
  addContactButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      MetaContact metaContact=(MetaContact)contactList.getSelectedValue();
      if (metaContact != null)       moveContactFromLeftToRight(metaContact);
    }
  }
);
  removeContactButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      MetaContact metaContact=(MetaContact)selectedContactList.getSelectedValue();
      if (metaContact != null)       moveContactFromRightToLeft(metaContact);
    }
  }
);
  TransparentPanel centerPanel=new TransparentPanel(new BorderLayout());
  centerPanel.add(listPanel,BorderLayout.CENTER);
  centerPanel.add(addRemoveButtonsPanel,BorderLayout.SOUTH);
  TransparentPanel southPanel=new TransparentPanel(new BorderLayout());
  southPanel.add(reasonArea,BorderLayout.CENTER);
  southPanel.add(buttonsPanel,BorderLayout.SOUTH);
  mainPanel.add(northPanel,BorderLayout.NORTH);
  mainPanel.add(centerPanel,BorderLayout.CENTER);
  mainPanel.add(southPanel,BorderLayout.SOUTH);
  this.getContentPane().add(mainPanel);
}

Fixed version (ground truth):
/** 
 * Constructs the <tt>ChatInviteDialog</tt>.
 * @param chatPanel the <tt>ChatPanel</tt> corresponding to the<tt>ChatRoom</tt>, where the contact is invited.
 */
public ChatInviteDialog(ChatPanel chatPanel){
  this.chatPanel=chatPanel;
  this.setModal(false);
  String title=GuiActivator.getResources().getI18NString("String_Node_Str");
  this.setTitle(title);
  TransparentPanel mainPanel=new TransparentPanel(new BorderLayout(5,5));
  TransparentPanel northPanel=new TransparentPanel(new BorderLayout(10,10));
  mainPanel.setPreferredSize(new Dimension(450,350));
  mainPanel.setBorder(BorderFactory.createEmptyBorder(15,15,15,15));
  this.reasonArea.setBorder(BorderFactory.createTitledBorder(GuiActivator.getResources().getI18NString("String_Node_Str")));
  JTextArea infoTextArea=new JTextArea();
  infoTextArea.setText(GuiActivator.getResources().getI18NString("String_Node_Str"));
  infoTextArea.setFont(Constants.FONT.deriveFont(Font.BOLD,12f));
  infoTextArea.setLineWrap(true);
  infoTextArea.setOpaque(false);
  infoTextArea.setWrapStyleWord(true);
  infoTextArea.setEditable(false);
  JLabel iconLabel=new JLabel(new ImageIcon(ImageLoader.getImage(ImageLoader.INVITE_DIALOG_ICON)));
  northPanel.add(iconLabel,BorderLayout.WEST);
  northPanel.add(infoTextArea,BorderLayout.CENTER);
  TransparentPanel buttonsPanel=new TransparentPanel(new FlowLayout(FlowLayout.RIGHT));
  inviteButton.addActionListener(this);
  cancelButton.addActionListener(this);
  buttonsPanel.add(inviteButton);
  buttonsPanel.add(cancelButton);
  this.getRootPane().setDefaultButton(inviteButton);
  inviteButton.setMnemonic(GuiActivator.getResources().getI18nMnemonic("String_Node_Str"));
  cancelButton.setMnemonic(GuiActivator.getResources().getI18nMnemonic("String_Node_Str"));
  final DefaultContactList contactList=new DefaultContactList();
  final DefaultContactList selectedContactList=new DefaultContactList();
  contactList.setModel(contactListModel);
  selectedContactList.setModel(selectedContactListModel);
  contactList.addMouseListener(new MouseAdapter(){
    public void mouseClicked(    MouseEvent e){
      if (e.getClickCount() > 1) {
        MetaContact metaContact=(MetaContact)contactList.getSelectedValue();
        moveContactFromLeftToRight(metaContact);
      }
    }
  }
);
  selectedContactList.addMouseListener(new MouseAdapter(){
    public void mouseClicked(    MouseEvent e){
      if (e.getClickCount() > 1) {
        MetaContact metaContact=(MetaContact)selectedContactList.getSelectedValue();
        moveContactFromRightToLeft(metaContact);
      }
    }
  }
);
  JScrollPane contactListScrollPane=new JScrollPane();
  contactListScrollPane.setOpaque(false);
  contactListScrollPane.getViewport().setOpaque(false);
  contactListScrollPane.getViewport().add(contactList);
  contactListScrollPane.getViewport().setBorder(null);
  contactListScrollPane.setViewportBorder(null);
  contactListScrollPane.setBorder(SIPCommBorders.getRoundBorder());
  JScrollPane selectedListScrollPane=new JScrollPane();
  selectedListScrollPane.setOpaque(false);
  selectedListScrollPane.getViewport().setOpaque(false);
  selectedListScrollPane.getViewport().add(selectedContactList);
  selectedListScrollPane.getViewport().setBorder(null);
  selectedListScrollPane.setViewportBorder(null);
  selectedListScrollPane.setBorder(SIPCommBorders.getRoundBorder());
  JPanel listPanel=new JPanel(new GridLayout(0,2,5,5));
  listPanel.setPreferredSize(new Dimension(400,200));
  listPanel.add(contactListScrollPane);
  listPanel.add(selectedListScrollPane);
  listPanel.setOpaque(false);
  this.initContactListData();
  JPanel addRemoveButtonsPanel=new JPanel(new GridLayout(0,2,5,5));
  addRemoveButtonsPanel.setOpaque(false);
  JButton addContactButton=new JButton(GuiActivator.getResources().getI18NString("String_Node_Str"));
  JButton removeContactButton=new JButton(GuiActivator.getResources().getI18NString("String_Node_Str"));
  addRemoveButtonsPanel.add(addContactButton);
  addRemoveButtonsPanel.add(removeContactButton);
  addContactButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      MetaContact metaContact=(MetaContact)contactList.getSelectedValue();
      if (metaContact != null)       moveContactFromLeftToRight(metaContact);
    }
  }
);
  removeContactButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      MetaContact metaContact=(MetaContact)selectedContactList.getSelectedValue();
      if (metaContact != null)       moveContactFromRightToLeft(metaContact);
    }
  }
);
  TransparentPanel centerPanel=new TransparentPanel(new BorderLayout());
  centerPanel.add(listPanel,BorderLayout.CENTER);
  centerPanel.add(addRemoveButtonsPanel,BorderLayout.SOUTH);
  TransparentPanel southPanel=new TransparentPanel(new BorderLayout());
  southPanel.add(reasonArea,BorderLayout.CENTER);
  southPanel.add(buttonsPanel,BorderLayout.SOUTH);
  mainPanel.add(northPanel,BorderLayout.NORTH);
  mainPanel.add(centerPanel,BorderLayout.CENTER);
  mainPanel.add(southPanel,BorderLayout.SOUTH);
  this.getContentPane().add(mainPanel);
}