Program: 103690
Project: 103690
Buggy source:
/** 
 * Creates the ui controls for portaudio.
 * @param portAudioPanel the panel
 * @param parentPanel the parent panel
 */
private void createPortAudioControls(JPanel portAudioPanel,JPanel parentPanel){
  GridBagConstraints constraints=new GridBagConstraints();
  constraints.fill=GridBagConstraints.HORIZONTAL;
  constraints.anchor=GridBagConstraints.NORTHWEST;
  constraints.gridx=0;
  constraints.weightx=0;
  constraints.weighty=0;
  constraints.gridy=0;
  portAudioPanel.add(new JLabel(getLabelText(DeviceConfigurationComboBoxModel.AUDIO_CAPTURE)),constraints);
  constraints.gridy=1;
  portAudioPanel.add(new JLabel(getLabelText(DeviceConfigurationComboBoxModel.AUDIO_PLAYBACK)),constraints);
  constraints.gridy=2;
  portAudioPanel.add(new JLabel(getLabelText(DeviceConfigurationComboBoxModel.AUDIO_NOTIFY)),constraints);
  constraints.weightx=1;
  constraints.gridx=1;
  constraints.gridy=0;
  JComboBox captureCombo=new JComboBox();
  captureCombo.setEditable(false);
  captureCombo.setModel(new DeviceConfigurationComboBoxModel(mediaService.getDeviceConfiguration(),DeviceConfigurationComboBoxModel.AUDIO_CAPTURE));
  portAudioPanel.add(captureCombo,constraints);
  constraints.gridy=1;
  JComboBox playbackCombo=new JComboBox();
  playbackCombo.setEditable(false);
  playbackCombo.setModel(new DeviceConfigurationComboBoxModel(mediaService.getDeviceConfiguration(),DeviceConfigurationComboBoxModel.AUDIO_PLAYBACK));
  portAudioPanel.add(playbackCombo,constraints);
  constraints.gridy=2;
  JComboBox notifyCombo=new JComboBox();
  notifyCombo.setEditable(false);
  notifyCombo.setModel(new DeviceConfigurationComboBoxModel(mediaService.getDeviceConfiguration(),DeviceConfigurationComboBoxModel.AUDIO_NOTIFY));
  portAudioPanel.add(notifyCombo,constraints);
  constraints.gridy=3;
  constraints.insets=new Insets(10,0,0,0);
  final JCheckBox echoCancelCheckBox=new JCheckBox(NeomediaActivator.getResources().getI18NString("String_Node_Str"));
  echoCancelCheckBox.setSelected(mediaService.getDeviceConfiguration().isEchoCancelEnabled());
  echoCancelCheckBox.addItemListener(new ItemListener(){
    public void itemStateChanged(    ItemEvent e){
      mediaService.getDeviceConfiguration().setEchoCancel(echoCancelCheckBox.isSelected(),true);
    }
  }
);
  portAudioPanel.add(echoCancelCheckBox,constraints);
  constraints.gridy=4;
  constraints.insets=new Insets(0,0,0,0);
  final JCheckBox denoiseCheckBox=new JCheckBox(NeomediaActivator.getResources().getI18NString("String_Node_Str"));
  denoiseCheckBox.setSelected(mediaService.getDeviceConfiguration().isDenoiseEnabled());
  denoiseCheckBox.addItemListener(new ItemListener(){
    public void itemStateChanged(    ItemEvent e){
      mediaService.getDeviceConfiguration().setDenoise(denoiseCheckBox.isSelected(),true);
    }
  }
);
  portAudioPanel.add(denoiseCheckBox,constraints);
  parentPanel.setBorder(BorderFactory.createTitledBorder(NeomediaActivator.getResources().getI18NString("String_Node_Str")));
}

Fixed version (ground truth):
/** 
 * Creates the ui controls for portaudio.
 * @param portAudioPanel the panel
 * @param parentPanel the parent panel
 */
private void createPortAudioControls(JPanel portAudioPanel,JPanel parentPanel){
  GridBagConstraints constraints=new GridBagConstraints();
  constraints.fill=GridBagConstraints.HORIZONTAL;
  constraints.anchor=GridBagConstraints.NORTHWEST;
  constraints.gridx=0;
  constraints.weightx=0;
  constraints.weighty=0;
  constraints.gridy=0;
  portAudioPanel.add(new JLabel(getLabelText(DeviceConfigurationComboBoxModel.AUDIO_CAPTURE)),constraints);
  constraints.gridy=1;
  portAudioPanel.add(new JLabel(getLabelText(DeviceConfigurationComboBoxModel.AUDIO_PLAYBACK)),constraints);
  constraints.gridy=2;
  portAudioPanel.add(new JLabel(getLabelText(DeviceConfigurationComboBoxModel.AUDIO_NOTIFY)),constraints);
  constraints.weightx=1;
  constraints.gridx=1;
  constraints.gridy=0;
  JComboBox captureCombo=new JComboBox();
  captureCombo.setEditable(false);
  captureCombo.setModel(new DeviceConfigurationComboBoxModel(mediaService.getDeviceConfiguration(),DeviceConfigurationComboBoxModel.AUDIO_CAPTURE));
  portAudioPanel.add(captureCombo,constraints);
  constraints.gridy=1;
  JComboBox playbackCombo=new JComboBox();
  playbackCombo.setEditable(false);
  playbackCombo.setModel(new DeviceConfigurationComboBoxModel(mediaService.getDeviceConfiguration(),DeviceConfigurationComboBoxModel.AUDIO_PLAYBACK));
  portAudioPanel.add(playbackCombo,constraints);
  constraints.gridy=2;
  JComboBox notifyCombo=new JComboBox();
  notifyCombo.setEditable(false);
  notifyCombo.setModel(new DeviceConfigurationComboBoxModel(mediaService.getDeviceConfiguration(),DeviceConfigurationComboBoxModel.AUDIO_NOTIFY));
  portAudioPanel.add(notifyCombo,constraints);
  constraints.gridy=3;
  constraints.insets=new Insets(10,0,0,0);
  final SIPCommCheckBox echoCancelCheckBox=new SIPCommCheckBox(NeomediaActivator.getResources().getI18NString("String_Node_Str"));
  echoCancelCheckBox.setSelected(mediaService.getDeviceConfiguration().isEchoCancelEnabled());
  echoCancelCheckBox.addItemListener(new ItemListener(){
    public void itemStateChanged(    ItemEvent e){
      mediaService.getDeviceConfiguration().setEchoCancel(echoCancelCheckBox.isSelected(),true);
    }
  }
);
  portAudioPanel.add(echoCancelCheckBox,constraints);
  constraints.gridy=4;
  constraints.insets=new Insets(0,0,0,0);
  final SIPCommCheckBox denoiseCheckBox=new SIPCommCheckBox(NeomediaActivator.getResources().getI18NString("String_Node_Str"));
  denoiseCheckBox.setSelected(mediaService.getDeviceConfiguration().isDenoiseEnabled());
  denoiseCheckBox.addItemListener(new ItemListener(){
    public void itemStateChanged(    ItemEvent e){
      mediaService.getDeviceConfiguration().setDenoise(denoiseCheckBox.isSelected(),true);
    }
  }
);
  portAudioPanel.add(denoiseCheckBox,constraints);
  parentPanel.setBorder(BorderFactory.createTitledBorder(NeomediaActivator.getResources().getI18NString("String_Node_Str")));
}