Program: 17059
Project: 17059
Buggy source:
private void calcDBSearch(){
  JTabbedPane tabPane=dbsearch.getTabPane();
  System.out.println("String_Node_Str" + tabPane.getSelectedIndex());
  Structure s=null;
  StructurePairSelector tab=null;
  int pos=tabPane.getSelectedIndex();
  if (pos == 0) {
    tab=dbsearch.getSelectPDBPanel();
  }
 else   if (pos == 1) {
    tab=dbsearch.getPDBUploadPanel();
  }
  try {
    s=tab.getStructure1();
    if (s == null) {
      System.err.println("String_Node_Str");
      return;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  String name1="String_Node_Str";
  if (pos == 0) {
    name1=dbsearch.getSelectPDBPanel().getName1();
  }
 else {
    name1=s.getPDBCode();
  }
  System.out.println("String_Node_Str" + name1);
  String file=dbsearch.getOutFileLocation();
  if (file == null || file.equals("String_Node_Str")) {
    JOptionPane.showMessageDialog(null,"String_Node_Str");
    return;
  }
  UserConfiguration config=WebStartMain.getWebStartConfig();
  int totalNrCPUs=Runtime.getRuntime().availableProcessors();
  int useNrCPUs=1;
  if (totalNrCPUs > 1) {
    Object[] options=new Integer[totalNrCPUs];
    int posX=0;
    for (int i=totalNrCPUs; i > 0; i--) {
      options[posX]=i;
      posX++;
    }
    int n=JOptionPane.showOptionDialog(null,"String_Node_Str","String_Node_Str" + totalNrCPUs + "String_Node_Str",JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[0]);
    if (n < 0)     return;
    useNrCPUs=(Integer)options[n];
    System.out.println("String_Node_Str" + useNrCPUs + "String_Node_Str");
  }
  alicalc=new AlignmentCalcDB(this,s,name1,config,file);
  alicalc.setNrCPUs(useNrCPUs);
  abortB.setEnabled(true);
  progress.setIndeterminate(true);
  ProgressThreadDrawer drawer=new ProgressThreadDrawer(progress);
  drawer.start();
  Thread t=new Thread(alicalc);
  t.start();
}

Fixed version (ground truth):
private void calcDBSearch(){
  JTabbedPane tabPane=dbsearch.getTabPane();
  System.out.println("String_Node_Str" + tabPane.getSelectedIndex());
  Structure s=null;
  StructurePairSelector tab=null;
  int pos=tabPane.getSelectedIndex();
  if (pos == 0) {
    tab=dbsearch.getSelectPDBPanel();
  }
 else   if (pos == 1) {
    tab=dbsearch.getPDBUploadPanel();
  }
  try {
    s=tab.getStructure1();
    if (s == null) {
      System.err.println("String_Node_Str");
      return;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  String name1="String_Node_Str";
  if (pos == 0) {
    name1=s.getName();
  }
 else {
    name1=s.getPDBCode();
  }
  System.out.println("String_Node_Str" + name1);
  String file=dbsearch.getOutFileLocation();
  if (file == null || file.equals("String_Node_Str")) {
    JOptionPane.showMessageDialog(null,"String_Node_Str");
    return;
  }
  UserConfiguration config=WebStartMain.getWebStartConfig();
  int totalNrCPUs=Runtime.getRuntime().availableProcessors();
  int useNrCPUs=1;
  if (totalNrCPUs > 1) {
    Object[] options=new Integer[totalNrCPUs];
    int posX=0;
    for (int i=totalNrCPUs; i > 0; i--) {
      options[posX]=i;
      posX++;
    }
    int n=JOptionPane.showOptionDialog(null,"String_Node_Str","String_Node_Str" + totalNrCPUs + "String_Node_Str",JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[0]);
    if (n < 0)     return;
    useNrCPUs=(Integer)options[n];
    System.out.println("String_Node_Str" + useNrCPUs + "String_Node_Str");
  }
  alicalc=new AlignmentCalcDB(this,s,name1,config,file);
  alicalc.setNrCPUs(useNrCPUs);
  abortB.setEnabled(true);
  progress.setIndeterminate(true);
  ProgressThreadDrawer drawer=new ProgressThreadDrawer(progress);
  drawer.start();
  Thread t=new Thread(alicalc);
  t.start();
}