Program: 3897
Project: 3897
Buggy source:
/** 
 * Reviews the bug.
 */
public static void reviewBug(final LocalClientInfo info){
  final JDialog dialog=new LimeJDialog();
  dialog.setSize(new Dimension(300,100));
  dialog.setTitle("String_Node_Str");
  JPanel mainPanel=new JPanel();
  mainPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
  mainPanel.setLayout(new GridBagLayout());
  String msg="String_Node_Str";
  MultiLineLabel label=new MultiLineLabel(msg,500);
  JPanel labelPanel=new JPanel();
  labelPanel.setLayout(new GridBagLayout());
  GridBagConstraints constraints=new GridBagConstraints();
  constraints.gridx=0;
  constraints.gridy=0;
  constraints.gridwidth=GridBagConstraints.REMAINDER;
  constraints.gridheight=GridBagConstraints.REMAINDER;
  constraints.weightx=1.0;
  constraints.weighty=1.0;
  labelPanel.add(label,constraints);
  final JPanel bugSpecificsPanel=new JPanel();
  bugSpecificsPanel.setLayout(new GridBagLayout());
  bugSpecificsPanel.setVisible(false);
  JTextArea showBug=new JTextArea(info.toBugReport());
  showBug.setColumns(50);
  showBug.setEditable(false);
  showBug.setCaretPosition(0);
  showBug.setLineWrap(true);
  showBug.setWrapStyleWord(true);
  JScrollPane showBugScroller=new JScrollPane(showBug);
  showBugScroller.setBorder(BorderFactory.createEtchedBorder());
  showBugScroller.setPreferredSize(new Dimension(500,200));
  constraints=new GridBagConstraints();
  constraints.gridx=0;
  constraints.gridy=0;
  bugSpecificsPanel.add(showBugScroller,constraints);
  final String defaultDesc="String_Node_Str";
  final JTextArea userCommentsTextArea=new JTextArea(defaultDesc);
  userCommentsTextArea.setLineWrap(true);
  userCommentsTextArea.setWrapStyleWord(true);
  userCommentsTextArea.addFocusListener(new FocusAdapter(){
    @Override public void focusGained(    FocusEvent e){
      if (userCommentsTextArea.getText().equals(defaultDesc)) {
        userCommentsTextArea.selectAll();
      }
    }
  }
);
  JScrollPane userCommentsScrollPane=new JScrollPane(userCommentsTextArea);
  userCommentsScrollPane.setBorder(BorderFactory.createEtchedBorder());
  userCommentsScrollPane.setPreferredSize(new Dimension(500,60));
  constraints=new GridBagConstraints();
  constraints.gridx=0;
  constraints.gridy=1;
  constraints.insets=new Insets(10,0,0,0);
  bugSpecificsPanel.add(userCommentsScrollPane,constraints);
  final HyperlinkButton showHideBugLink=new HyperlinkButton("String_Node_Str");
  showHideBugLink.addActionListener(new AbstractAction(){
    boolean panelVisible=false;
    @Override public void actionPerformed(    ActionEvent e){
      if (panelVisible) {
        bugSpecificsPanel.setVisible(false);
        showHideBugLink.setText("String_Node_Str");
        dialog.pack();
      }
 else {
        bugSpecificsPanel.setVisible(true);
        showHideBugLink.setText("String_Node_Str");
      }
      dialog.pack();
      panelVisible=!panelVisible;
    }
  }
);
  JButton sendButton=new JButton("String_Node_Str");
  sendButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      String userComments=userCommentsTextArea.getText();
      if (!userComments.equals(defaultDesc))       info.addUserComments(userComments);
      sendToServlet(info);
      dialog.dispose();
    }
  }
);
  constraints=new GridBagConstraints();
  constraints.gridx=0;
  constraints.gridy=0;
  mainPanel.add(labelPanel,constraints);
  constraints=new GridBagConstraints();
  constraints.gridx=0;
  constraints.gridy=1;
  constraints.insets=new Insets(10,0,0,0);
  constraints.anchor=GridBagConstraints.LINE_START;
  mainPanel.add(showHideBugLink,constraints);
  constraints=new GridBagConstraints();
  constraints.gridx=0;
  constraints.gridy=2;
  constraints.fill=GridBagConstraints.BOTH;
  constraints.weightx=1.0;
  constraints.weighty=1.0;
  constraints.insets=new Insets(30,0,6,0);
  mainPanel.add(bugSpecificsPanel,constraints);
  constraints=new GridBagConstraints();
  constraints.gridx=0;
  constraints.gridy=4;
  mainPanel.add(sendButton,constraints);
  mainPanel.validate();
  dialog.getContentPane().add(mainPanel);
  dialog.pack();
  sendButton.requestFocusInWindow();
  dialog.setLocationRelativeTo(null);
  for (  Window window : Window.getWindows()) {
    if (window == dialog) {
      continue;
    }
    window.setVisible(false);
    window.dispose();
  }
  dialog.setVisible(true);
  dialog.toFront();
}

Fixed version (ground truth):
/** 
 * Reviews the bug.
 */
public static void reviewBug(final LocalClientInfo info){
  final JDialog dialog=new LimeJDialog();
  dialog.setSize(new Dimension(300,100));
  dialog.setTitle("String_Node_Str");
  JPanel mainPanel=new JPanel();
  mainPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
  mainPanel.setLayout(new GridBagLayout());
  String msg="String_Node_Str";
  MultiLineLabel label=new MultiLineLabel(msg,500);
  JPanel labelPanel=new JPanel();
  labelPanel.setLayout(new GridBagLayout());
  GridBagConstraints constraints=new GridBagConstraints();
  constraints.gridx=0;
  constraints.gridy=0;
  constraints.gridwidth=GridBagConstraints.REMAINDER;
  constraints.gridheight=GridBagConstraints.REMAINDER;
  constraints.weightx=1.0;
  constraints.weighty=1.0;
  labelPanel.add(label,constraints);
  final JPanel bugSpecificsPanel=new JPanel();
  bugSpecificsPanel.setLayout(new GridBagLayout());
  bugSpecificsPanel.setVisible(false);
  JTextArea showBug=new JTextArea(info.toBugReport());
  showBug.setColumns(50);
  showBug.setEditable(false);
  showBug.setCaretPosition(0);
  showBug.setLineWrap(true);
  showBug.setWrapStyleWord(true);
  JScrollPane showBugScroller=new JScrollPane(showBug);
  showBugScroller.setBorder(BorderFactory.createEtchedBorder());
  showBugScroller.setPreferredSize(new Dimension(500,200));
  constraints=new GridBagConstraints();
  constraints.gridx=0;
  constraints.gridy=0;
  bugSpecificsPanel.add(showBugScroller,constraints);
  final String defaultDesc="String_Node_Str";
  final JTextArea userCommentsTextArea=new JTextArea(defaultDesc);
  userCommentsTextArea.setLineWrap(true);
  userCommentsTextArea.setWrapStyleWord(true);
  userCommentsTextArea.addFocusListener(new FocusAdapter(){
    @Override public void focusGained(    FocusEvent e){
      if (userCommentsTextArea.getText().equals(defaultDesc)) {
        userCommentsTextArea.selectAll();
      }
    }
  }
);
  JScrollPane userCommentsScrollPane=new JScrollPane(userCommentsTextArea);
  userCommentsScrollPane.setBorder(BorderFactory.createEtchedBorder());
  userCommentsScrollPane.setPreferredSize(new Dimension(500,60));
  constraints=new GridBagConstraints();
  constraints.gridx=0;
  constraints.gridy=1;
  constraints.insets=new Insets(10,0,0,0);
  bugSpecificsPanel.add(userCommentsScrollPane,constraints);
  final HyperlinkButton showHideBugLink=new HyperlinkButton("String_Node_Str");
  showHideBugLink.addActionListener(new AbstractAction(){
    boolean panelVisible=false;
    @Override public void actionPerformed(    ActionEvent e){
      if (panelVisible) {
        bugSpecificsPanel.setVisible(false);
        showHideBugLink.setText("String_Node_Str");
        dialog.pack();
      }
 else {
        bugSpecificsPanel.setVisible(true);
        showHideBugLink.setText("String_Node_Str");
      }
      dialog.pack();
      panelVisible=!panelVisible;
    }
  }
);
  final JButton sendButton=new JButton("String_Node_Str");
  sendButton.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      String userComments=userCommentsTextArea.getText();
      if (!userComments.equals(defaultDesc))       info.addUserComments(userComments);
      sendButton.setEnabled(false);
      sendButton.setText("String_Node_Str");
      new Thread("String_Node_Str"){
        public void run(){
          try {
            sendToServlet(info);
          }
  finally {
            SwingUtilities.invokeLater(new Runnable(){
              public void run(){
                dialog.dispose();
                System.exit(1);
              }
            }
);
          }
        }
      }
.start();
    }
  }
);
  constraints=new GridBagConstraints();
  constraints.gridx=0;
  constraints.gridy=0;
  mainPanel.add(labelPanel,constraints);
  constraints=new GridBagConstraints();
  constraints.gridx=0;
  constraints.gridy=1;
  constraints.insets=new Insets(10,0,0,0);
  constraints.anchor=GridBagConstraints.LINE_START;
  mainPanel.add(showHideBugLink,constraints);
  constraints=new GridBagConstraints();
  constraints.gridx=0;
  constraints.gridy=2;
  constraints.fill=GridBagConstraints.BOTH;
  constraints.weightx=1.0;
  constraints.weighty=1.0;
  constraints.insets=new Insets(30,0,6,0);
  mainPanel.add(bugSpecificsPanel,constraints);
  constraints=new GridBagConstraints();
  constraints.gridx=0;
  constraints.gridy=4;
  mainPanel.add(sendButton,constraints);
  mainPanel.validate();
  dialog.getContentPane().add(mainPanel);
  dialog.pack();
  sendButton.requestFocusInWindow();
  dialog.setLocationRelativeTo(null);
  for (  Window window : Window.getWindows()) {
    if (window == dialog) {
      continue;
    }
    window.setVisible(false);
    window.dispose();
  }
  dialog.setVisible(true);
  dialog.toFront();
}