Program: 103261
Project: 103261
Buggy source:
/** 
 * Creates an instance of <tt>ConnectionPanel</tt> by specifying the parent wizard, where it's contained.
 * @param parentForm the parent form
 */
public ConnectionPanel(JabberAccountRegistrationForm parentForm){
  super(new BorderLayout());
  this.parentForm=parentForm;
  parentForm.addValidatingPanel(this);
  mainPanel.setLayout(new BoxLayout(mainPanel,BoxLayout.Y_AXIS));
  portField.getDocument().addDocumentListener(new DocumentListener(){
    public void changedUpdate(    DocumentEvent evt){
    }
    public void insertUpdate(    DocumentEvent evt){
      setNextButtonAccordingToPortAndPriority();
    }
    public void removeUpdate(    DocumentEvent evt){
      setNextButtonAccordingToPortAndPriority();
    }
  }
);
  priorityField.getDocument().addDocumentListener(new DocumentListener(){
    public void changedUpdate(    DocumentEvent evt){
    }
    public void insertUpdate(    DocumentEvent evt){
      setNextButtonAccordingToPortAndPriority();
    }
    public void removeUpdate(    DocumentEvent evt){
      setNextButtonAccordingToPortAndPriority();
    }
  }
);
  labelsAdvOpPanel.add(serverLabel);
  labelsAdvOpPanel.add(portLabel);
  valuesAdvOpPanel.add(serverField);
  valuesAdvOpPanel.add(portField);
  JPanel checkBoxesPanel=new TransparentPanel(new GridLayout(0,1,10,10));
  checkBoxesPanel.add(sendKeepAliveBox);
  checkBoxesPanel.add(gmailNotificationsBox);
  checkBoxesPanel.add(googleContactsBox);
  checkBoxesPanel.add(allowNonSecureBox);
  final JPanel resourcePanel=new TransparentPanel(new BorderLayout(10,10));
  resourcePanel.setBorder(BorderFactory.createTitledBorder(Resources.getString("String_Node_Str")));
  resourcePanel.add(autoGenerateResource,BorderLayout.NORTH);
  JPanel resSubPanelLabel=new TransparentPanel(new GridLayout(0,1,10,10));
  JPanel resSubPanelValue=new TransparentPanel(new GridLayout(0,1,10,10));
  resSubPanelLabel.add(resourceLabel);
  resSubPanelLabel.add(priorityLabel);
  resSubPanelValue.add(resourceField);
  resSubPanelValue.add(priorityField);
  resourcePanel.add(resSubPanelLabel,BorderLayout.WEST);
  resourcePanel.add(resSubPanelValue,BorderLayout.CENTER);
  googleContactsBox.setSelected(true);
  advancedOpPanel.add(checkBoxesPanel,BorderLayout.NORTH);
  advancedOpPanel.add(labelsAdvOpPanel,BorderLayout.WEST);
  advancedOpPanel.add(valuesAdvOpPanel,BorderLayout.CENTER);
  advancedOpPanel.add(resourcePanel,BorderLayout.SOUTH);
  if (autoGenerateResource.isSelected()) {
    resourceField.setEnabled(false);
  }
  autoGenerateResource.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      resourceField.setEnabled(!autoGenerateResource.isSelected());
    }
  }
);
  mainPanel.add(advancedOpPanel);
  String serverAddress=parentForm.getServerAddress();
  if (serverAddress != null)   serverField.setText(serverAddress);
  add(mainPanel,BorderLayout.NORTH);
}

Fixed version (ground truth):
/** 
 * Creates an instance of <tt>ConnectionPanel</tt> by specifying the parent wizard, where it's contained.
 * @param parentForm the parent form
 */
public ConnectionPanel(JabberAccountRegistrationForm parentForm){
  super(new BorderLayout());
  this.parentForm=parentForm;
  parentForm.addValidatingPanel(this);
  mainPanel.setLayout(new BoxLayout(mainPanel,BoxLayout.Y_AXIS));
  portField.getDocument().addDocumentListener(new DocumentListener(){
    public void changedUpdate(    DocumentEvent evt){
    }
    public void insertUpdate(    DocumentEvent evt){
      setNextButtonAccordingToPortAndPriority();
    }
    public void removeUpdate(    DocumentEvent evt){
      setNextButtonAccordingToPortAndPriority();
    }
  }
);
  priorityField.getDocument().addDocumentListener(new DocumentListener(){
    public void changedUpdate(    DocumentEvent evt){
    }
    public void insertUpdate(    DocumentEvent evt){
      setNextButtonAccordingToPortAndPriority();
    }
    public void removeUpdate(    DocumentEvent evt){
      setNextButtonAccordingToPortAndPriority();
    }
  }
);
  labelsAdvOpPanel.add(serverLabel);
  labelsAdvOpPanel.add(portLabel);
  valuesAdvOpPanel.add(serverField);
  valuesAdvOpPanel.add(portField);
  JPanel checkBoxesPanel=new TransparentPanel(new GridLayout(0,1,10,10));
  checkBoxesPanel.add(gmailNotificationsBox);
  checkBoxesPanel.add(googleContactsBox);
  checkBoxesPanel.add(allowNonSecureBox);
  final JPanel resourcePanel=new TransparentPanel(new BorderLayout(10,10));
  resourcePanel.setBorder(BorderFactory.createTitledBorder(Resources.getString("String_Node_Str")));
  resourcePanel.add(autoGenerateResource,BorderLayout.NORTH);
  JPanel resSubPanelLabel=new TransparentPanel(new GridLayout(0,1,10,10));
  JPanel resSubPanelValue=new TransparentPanel(new GridLayout(0,1,10,10));
  resSubPanelLabel.add(resourceLabel);
  resSubPanelLabel.add(priorityLabel);
  resSubPanelValue.add(resourceField);
  resSubPanelValue.add(priorityField);
  resourcePanel.add(resSubPanelLabel,BorderLayout.WEST);
  resourcePanel.add(resSubPanelValue,BorderLayout.CENTER);
  googleContactsBox.setSelected(true);
  advancedOpPanel.add(checkBoxesPanel,BorderLayout.NORTH);
  advancedOpPanel.add(labelsAdvOpPanel,BorderLayout.WEST);
  advancedOpPanel.add(valuesAdvOpPanel,BorderLayout.CENTER);
  advancedOpPanel.add(resourcePanel,BorderLayout.SOUTH);
  if (autoGenerateResource.isSelected()) {
    resourceField.setEnabled(false);
  }
  autoGenerateResource.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      resourceField.setEnabled(!autoGenerateResource.isSelected());
    }
  }
);
  mainPanel.add(advancedOpPanel);
  String serverAddress=parentForm.getServerAddress();
  if (serverAddress != null)   serverField.setText(serverAddress);
  add(mainPanel,BorderLayout.NORTH);
}