Program: 94575
Project: 94575
Buggy source:
@Override public void show(){
  Configuration config=parent.getConfiguration();
  new SettingsLoader().merge(config);
  List<GPUDevice> gpus=GPU.listDevices();
  GridBagConstraints constraints=new GridBagConstraints();
  int currentRow=0;
  ImageIcon image=new ImageIcon(getClass().getResource("String_Node_Str"));
  constraints.fill=GridBagConstraints.CENTER;
  JLabel labelImage=new JLabel(image);
  constraints.gridwidth=2;
  constraints.gridx=0;
  constraints.gridy=currentRow;
  parent.getContentPane().add(labelImage,constraints);
  ++currentRow;
  JPanel authentification_panel=new JPanel(new GridLayout(2,2));
  authentification_panel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  JLabel loginLabel=new JLabel("String_Node_Str");
  login=new JTextField();
  login.setText(parent.getConfiguration().login());
  login.setColumns(20);
  login.addKeyListener(new CheckCanStart());
  JLabel passwordLabel=new JLabel("String_Node_Str");
  password=new JPasswordField();
  password.setText(parent.getConfiguration().password());
  password.setColumns(10);
  password.addKeyListener(new CheckCanStart());
  authentification_panel.add(loginLabel);
  authentification_panel.add(login);
  authentification_panel.add(passwordLabel);
  authentification_panel.add(password);
  constraints.gridx=0;
  constraints.gridy=currentRow;
  constraints.fill=GridBagConstraints.HORIZONTAL;
  parent.getContentPane().add(authentification_panel,constraints);
  JPanel directory_panel=new JPanel(new GridLayout(1,3));
  directory_panel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  JLabel cacheLabel=new JLabel("String_Node_Str");
  directory_panel.add(cacheLabel);
  String destination=DUMMY_CACHE_DIR;
  if (config.getUserSpecifiedACacheDir()) {
    destination=config.getStorageDir().getName();
  }
  JPanel cacheDirWrapper=new JPanel();
  cacheDirWrapper.setLayout(new BoxLayout(cacheDirWrapper,BoxLayout.LINE_AXIS));
  cacheDirText=new JLabel(destination);
  cacheDirWrapper.add(cacheDirText);
  cacheDirWrapper.add(Box.createHorizontalGlue());
  cacheDirChooser=new JFileChooser();
  cacheDirChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
  JButton openButton=new JButton("String_Node_Str");
  openButton.addActionListener(new ChooseFileAction());
  cacheDirWrapper.add(openButton);
  directory_panel.add(cacheDirWrapper);
  currentRow++;
  constraints.gridx=0;
  constraints.gridy=currentRow;
  constraints.gridwidth=2;
  parent.getContentPane().add(directory_panel,constraints);
  GridBagLayout gridbag=new GridBagLayout();
  GridBagConstraints compute_devices_constraints=new GridBagConstraints();
  JPanel compute_devices_panel=new JPanel(gridbag);
  compute_devices_panel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  ComputeType method=config.getComputeMethod();
  useCPU=new JCheckBox("String_Node_Str");
  boolean gpuChecked=false;
  if (method == ComputeType.CPU_GPU) {
    useCPU.setSelected(true);
    gpuChecked=true;
  }
 else   if (method == ComputeType.CPU) {
    useCPU.setSelected(true);
    gpuChecked=false;
  }
 else   if (method == ComputeType.GPU) {
    useCPU.setSelected(false);
    gpuChecked=true;
  }
  useCPU.addActionListener(new CpuChangeAction());
  compute_devices_constraints.gridx=1;
  compute_devices_constraints.gridy=0;
  compute_devices_constraints.fill=GridBagConstraints.BOTH;
  compute_devices_constraints.weightx=1.0;
  compute_devices_constraints.weighty=1.0;
  gridbag.setConstraints(useCPU,compute_devices_constraints);
  compute_devices_panel.add(useCPU);
  for (  GPUDevice gpu : gpus) {
    JCheckBoxGPU gpuCheckBox=new JCheckBoxGPU(gpu);
    gpuCheckBox.setToolTipText(gpu.getCudaName());
    if (gpuChecked) {
      GPUDevice config_gpu=config.getGPUDevice();
      if (config_gpu != null && config_gpu.getCudaName().equals(gpu.getCudaName())) {
        gpuCheckBox.setSelected(gpuChecked);
      }
    }
    gpuCheckBox.addActionListener(new GpuChangeAction());
    compute_devices_constraints.gridy++;
    gridbag.setConstraints(gpuCheckBox,compute_devices_constraints);
    compute_devices_panel.add(gpuCheckBox);
    useGPUs.add(gpuCheckBox);
  }
  CPU cpu=new CPU();
  if (cpu.cores() > 1) {
    cpuCores=new JSlider(1,cpu.cores());
    cpuCores.setMajorTickSpacing(1);
    cpuCores.setMinorTickSpacing(1);
    cpuCores.setPaintTicks(true);
    cpuCores.setPaintLabels(true);
    cpuCores.setValue(config.getNbCores() != -1 ? config.getNbCores() : cpuCores.getMaximum());
    JLabel coreLabel=new JLabel("String_Node_Str");
    compute_devices_constraints.weightx=1.0 / gpus.size();
    compute_devices_constraints.gridx=0;
    compute_devices_constraints.gridy++;
    gridbag.setConstraints(coreLabel,compute_devices_constraints);
    compute_devices_panel.add(coreLabel);
    compute_devices_constraints.gridx=1;
    compute_devices_constraints.weightx=1.0;
    gridbag.setConstraints(cpuCores,compute_devices_constraints);
    compute_devices_panel.add(cpuCores);
  }
  currentRow++;
  constraints.gridx=0;
  constraints.gridy=currentRow;
  constraints.gridwidth=2;
  parent.getContentPane().add(compute_devices_panel,constraints);
  JPanel advanced_panel=new JPanel(new GridLayout(3,2));
  advanced_panel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  JLabel proxyLabel=new JLabel("String_Node_Str");
  proxyLabel.setToolTipText("String_Node_Str");
  proxy=new JTextField();
  proxy.setToolTipText("String_Node_Str");
  proxy.setText(parent.getConfiguration().getProxy());
  proxy.addKeyListener(new CheckCanStart());
  advanced_panel.add(proxyLabel);
  advanced_panel.add(proxy);
  JLabel customTileSizeLabel=new JLabel("String_Node_Str");
  customTileSize=new JCheckBox("String_Node_Str",config.getTileSize() != -1);
  advanced_panel.add(customTileSizeLabel);
  advanced_panel.add(customTileSize);
  customTileSize.addActionListener(new TileSizeChange());
  tileSizeLabel=new JLabel("String_Node_Str");
  tileSizeValue=new JTextField();
  int fromConfig=parent.getConfiguration().getTileSize();
  if (fromConfig == -1) {
    if (parent.getConfiguration().getGPUDevice() != null) {
      fromConfig=parent.getConfiguration().getGPUDevice().getRecommandedTileSize();
    }
 else {
      fromConfig=32;
    }
  }
  tileSizeValue.setText(Integer.toString(fromConfig));
  hideCustomTileSize(config.getTileSize() != -1,false);
  advanced_panel.add(tileSizeLabel);
  advanced_panel.add(tileSizeValue);
  currentRow++;
  constraints.gridx=0;
  constraints.gridy=currentRow;
  constraints.gridwidth=2;
  parent.getContentPane().add(advanced_panel,constraints);
  JPanel general_panel=new JPanel(new GridLayout(1,2));
  saveFile=new JCheckBox("String_Node_Str",true);
  general_panel.add(saveFile);
  autoSignIn=new JCheckBox("String_Node_Str",config.getAutoSignIn());
  autoSignIn.addActionListener(new AutoSignInChangeAction());
  general_panel.add(autoSignIn);
  currentRow++;
  constraints.gridx=0;
  constraints.gridy=currentRow;
  constraints.gridwidth=2;
  parent.getContentPane().add(general_panel,constraints);
  String buttonText="String_Node_Str";
  if (parent.getClient() != null) {
    if (parent.getClient().isRunning()) {
      buttonText="String_Node_Str";
    }
  }
  saveButton=new JButton(buttonText);
  checkDisplaySaveButton();
  saveButton.addActionListener(new SaveAction());
  currentRow++;
  constraints.gridwidth=2;
  constraints.gridx=0;
  constraints.gridy=currentRow;
  parent.getContentPane().add(saveButton,constraints);
  if (haveAutoStarted == false && config.getAutoSignIn() && checkDisplaySaveButton()) {
    haveAutoStarted=true;
    new SaveAction().actionPerformed(null);
  }
}

Fixed version (ground truth):
@Override public void show(){
  Configuration config=parent.getConfiguration();
  new SettingsLoader().merge(config);
  List<GPUDevice> gpus=GPU.listDevices();
  GridBagConstraints constraints=new GridBagConstraints();
  int currentRow=0;
  ImageIcon image=new ImageIcon(getClass().getResource("String_Node_Str"));
  constraints.fill=GridBagConstraints.CENTER;
  JLabel labelImage=new JLabel(image);
  constraints.gridwidth=2;
  constraints.gridx=0;
  constraints.gridy=currentRow;
  parent.getContentPane().add(labelImage,constraints);
  ++currentRow;
  JPanel authentication_panel=new JPanel(new GridLayout(2,2));
  authentication_panel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  JLabel loginLabel=new JLabel("String_Node_Str");
  login=new JTextField();
  login.setText(parent.getConfiguration().login());
  login.setColumns(20);
  login.addKeyListener(new CheckCanStart());
  JLabel passwordLabel=new JLabel("String_Node_Str");
  password=new JPasswordField();
  password.setText(parent.getConfiguration().password());
  password.setColumns(10);
  password.addKeyListener(new CheckCanStart());
  authentication_panel.add(loginLabel);
  authentication_panel.add(login);
  authentication_panel.add(passwordLabel);
  authentication_panel.add(password);
  constraints.gridx=0;
  constraints.gridy=currentRow;
  constraints.fill=GridBagConstraints.HORIZONTAL;
  parent.getContentPane().add(authentication_panel,constraints);
  JPanel directory_panel=new JPanel(new GridLayout(1,3));
  directory_panel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  JLabel cacheLabel=new JLabel("String_Node_Str");
  directory_panel.add(cacheLabel);
  String destination=DUMMY_CACHE_DIR;
  if (config.getUserSpecifiedACacheDir()) {
    destination=config.getStorageDir().getName();
  }
  JPanel cacheDirWrapper=new JPanel();
  cacheDirWrapper.setLayout(new BoxLayout(cacheDirWrapper,BoxLayout.LINE_AXIS));
  cacheDirText=new JLabel(destination);
  cacheDirWrapper.add(cacheDirText);
  cacheDirWrapper.add(Box.createHorizontalGlue());
  cacheDirChooser=new JFileChooser();
  cacheDirChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
  JButton openButton=new JButton("String_Node_Str");
  openButton.addActionListener(new ChooseFileAction());
  cacheDirWrapper.add(openButton);
  directory_panel.add(cacheDirWrapper);
  currentRow++;
  constraints.gridx=0;
  constraints.gridy=currentRow;
  constraints.gridwidth=2;
  parent.getContentPane().add(directory_panel,constraints);
  GridBagLayout gridbag=new GridBagLayout();
  GridBagConstraints compute_devices_constraints=new GridBagConstraints();
  JPanel compute_devices_panel=new JPanel(gridbag);
  compute_devices_panel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  ComputeType method=config.getComputeMethod();
  useCPU=new JCheckBox("String_Node_Str");
  boolean gpuChecked=false;
  if (method == ComputeType.CPU_GPU) {
    useCPU.setSelected(true);
    gpuChecked=true;
  }
 else   if (method == ComputeType.CPU) {
    useCPU.setSelected(true);
    gpuChecked=false;
  }
 else   if (method == ComputeType.GPU) {
    useCPU.setSelected(false);
    gpuChecked=true;
  }
  useCPU.addActionListener(new CpuChangeAction());
  compute_devices_constraints.gridx=1;
  compute_devices_constraints.gridy=0;
  compute_devices_constraints.fill=GridBagConstraints.BOTH;
  compute_devices_constraints.weightx=1.0;
  compute_devices_constraints.weighty=1.0;
  gridbag.setConstraints(useCPU,compute_devices_constraints);
  compute_devices_panel.add(useCPU);
  for (  GPUDevice gpu : gpus) {
    JCheckBoxGPU gpuCheckBox=new JCheckBoxGPU(gpu);
    gpuCheckBox.setToolTipText(gpu.getCudaName());
    if (gpuChecked) {
      GPUDevice config_gpu=config.getGPUDevice();
      if (config_gpu != null && config_gpu.getCudaName().equals(gpu.getCudaName())) {
        gpuCheckBox.setSelected(gpuChecked);
      }
    }
    gpuCheckBox.addActionListener(new GpuChangeAction());
    compute_devices_constraints.gridy++;
    gridbag.setConstraints(gpuCheckBox,compute_devices_constraints);
    compute_devices_panel.add(gpuCheckBox);
    useGPUs.add(gpuCheckBox);
  }
  CPU cpu=new CPU();
  if (cpu.cores() > 1) {
    cpuCores=new JSlider(1,cpu.cores());
    cpuCores.setMajorTickSpacing(1);
    cpuCores.setMinorTickSpacing(1);
    cpuCores.setPaintTicks(true);
    cpuCores.setPaintLabels(true);
    cpuCores.setValue(config.getNbCores() != -1 ? config.getNbCores() : cpuCores.getMaximum());
    JLabel coreLabel=new JLabel("String_Node_Str");
    compute_devices_constraints.weightx=1.0 / gpus.size();
    compute_devices_constraints.gridx=0;
    compute_devices_constraints.gridy++;
    gridbag.setConstraints(coreLabel,compute_devices_constraints);
    compute_devices_panel.add(coreLabel);
    compute_devices_constraints.gridx=1;
    compute_devices_constraints.weightx=1.0;
    gridbag.setConstraints(cpuCores,compute_devices_constraints);
    compute_devices_panel.add(cpuCores);
  }
  currentRow++;
  constraints.gridx=0;
  constraints.gridy=currentRow;
  constraints.gridwidth=2;
  parent.getContentPane().add(compute_devices_panel,constraints);
  JPanel advanced_panel=new JPanel(new GridLayout(3,2));
  advanced_panel.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  JLabel proxyLabel=new JLabel("String_Node_Str");
  proxyLabel.setToolTipText("String_Node_Str");
  proxy=new JTextField();
  proxy.setToolTipText("String_Node_Str");
  proxy.setText(parent.getConfiguration().getProxy());
  proxy.addKeyListener(new CheckCanStart());
  advanced_panel.add(proxyLabel);
  advanced_panel.add(proxy);
  JLabel customTileSizeLabel=new JLabel("String_Node_Str");
  customTileSize=new JCheckBox("String_Node_Str",config.getTileSize() != -1);
  advanced_panel.add(customTileSizeLabel);
  advanced_panel.add(customTileSize);
  customTileSize.addActionListener(new TileSizeChange());
  tileSizeLabel=new JLabel("String_Node_Str");
  tileSizeValue=new JTextField();
  int fromConfig=parent.getConfiguration().getTileSize();
  if (fromConfig == -1) {
    if (parent.getConfiguration().getGPUDevice() != null) {
      fromConfig=parent.getConfiguration().getGPUDevice().getRecommandedTileSize();
    }
 else {
      fromConfig=32;
    }
  }
  tileSizeValue.setText(Integer.toString(fromConfig));
  hideCustomTileSize(config.getTileSize() != -1,false);
  advanced_panel.add(tileSizeLabel);
  advanced_panel.add(tileSizeValue);
  currentRow++;
  constraints.gridx=0;
  constraints.gridy=currentRow;
  constraints.gridwidth=2;
  parent.getContentPane().add(advanced_panel,constraints);
  JPanel general_panel=new JPanel(new GridLayout(1,2));
  saveFile=new JCheckBox("String_Node_Str",true);
  general_panel.add(saveFile);
  autoSignIn=new JCheckBox("String_Node_Str",config.getAutoSignIn());
  autoSignIn.addActionListener(new AutoSignInChangeAction());
  general_panel.add(autoSignIn);
  currentRow++;
  constraints.gridx=0;
  constraints.gridy=currentRow;
  constraints.gridwidth=2;
  parent.getContentPane().add(general_panel,constraints);
  String buttonText="String_Node_Str";
  if (parent.getClient() != null) {
    if (parent.getClient().isRunning()) {
      buttonText="String_Node_Str";
    }
  }
  saveButton=new JButton(buttonText);
  checkDisplaySaveButton();
  saveButton.addActionListener(new SaveAction());
  currentRow++;
  constraints.gridwidth=2;
  constraints.gridx=0;
  constraints.gridy=currentRow;
  parent.getContentPane().add(saveButton,constraints);
  if (haveAutoStarted == false && config.getAutoSignIn() && checkDisplaySaveButton()) {
    haveAutoStarted=true;
    new SaveAction().actionPerformed(null);
  }
}