Program: 81645
Project: 81645
Buggy source:
protected Void doInBackground() throws Exception {
  if (((EgDownloaderWindow)mainWindow).taskDbTemplate.exsits("String_Node_Str",task.getUrl())) {
    return null;
  }
  EgDownloaderWindow window=(EgDownloaderWindow)mainWindow;
  window.setEnabled(false);
  AddFormDialog addFormWindow=((AddFormDialog)window.addFormWindow);
  addFormWindow.setVisible(false);
  window.creatingWindow.setVisible(true);
  Setting setting=window.setting;
  InputStream is;
  try {
    if (setting.isOpenScript()) {
      if ("String_Node_Str".equals(setting.getCreateTaskScriptPath())) {
        JOptionPane.showMessageDialog(null,"String_Node_Str");
        return null;
      }
 else       if ("String_Node_Str".equals(setting.getCollectPictureScriptPath())) {
        JOptionPane.showMessageDialog(null,"String_Node_Str");
        return null;
      }
      task=ScriptParser.buildTaskByJavaScript(task,setting,window.creatingWindow);
    }
 else {
      task=ParseEngine.buildTask_new(task,setting,window.creatingWindow);
    }
    if (task != null) {
      is=WebClient.getStreamUseJava(task.getCoverUrl());
      FileUtil.storeStream(ComponentConst.getSavePathPreffix() + task.getSaveDir(),"String_Node_Str",is);
      setting.setLastCreateTime(task.getCreateTime());
      setting.setTaskHistoryCount(setting.getTaskHistoryCount() + 1);
      setting.setPictureHistoryCount(setting.getPictureHistoryCount() + task.getTotal());
      window.pictureDbTemplate.store(task.getPictures());
      window.taskDbTemplate.store(task);
      window.settingDbTemplate.update(setting);
      TaskingTable taskTable=(TaskingTable)window.runningTable;
      taskTable.getTasks().add(0,task);
      addFormWindow.emptyField();
      addFormWindow.dispose();
      window.tablePane.setVisible(true);
      window.emptyTableTips.setVisible(false);
      taskTable.updateUI();
      if (setting.isAutoDownload()) {
        taskTable.startTask(task);
      }
    }
 else {
      JOptionPane.showMessageDialog(null,"String_Node_Str");
    }
  }
 catch (  SocketTimeoutException e) {
    JOptionPane.showMessageDialog(null,"String_Node_Str");
  }
catch (  ConnectTimeoutException e) {
    JOptionPane.showMessageDialog(null,"String_Node_Str");
  }
catch (  SpiderException e) {
    JOptionPane.showMessageDialog(null,e.getMessage());
  }
catch (  WebClientException e) {
    JOptionPane.showMessageDialog(null,e.getMessage());
  }
catch (  FileNotFoundException e) {
    JOptionPane.showMessageDialog(null,e.getMessage());
  }
catch (  ScriptException e) {
    JOptionPane.showMessageDialog(null,e.getMessage());
  }
 finally {
    ((CreatingWindow)(window.creatingWindow)).reset();
    window.creatingWindow.dispose();
    addFormWindow.dispose();
    window.setEnabled(true);
    window.setVisible(true);
  }
  return null;
}

Fixed version (ground truth):
protected Void doInBackground() throws Exception {
  if (((EgDownloaderWindow)mainWindow).taskDbTemplate.exsits("String_Node_Str",task.getUrl())) {
    return null;
  }
  EgDownloaderWindow window=(EgDownloaderWindow)mainWindow;
  window.setEnabled(false);
  window.setVisible(true);
  AddFormDialog addFormWindow=((AddFormDialog)window.addFormWindow);
  addFormWindow.setVisible(false);
  window.creatingWindow.setVisible(true);
  Setting setting=window.setting;
  InputStream is;
  try {
    if (setting.isOpenScript()) {
      if ("String_Node_Str".equals(setting.getCreateTaskScriptPath())) {
        JOptionPane.showMessageDialog(null,"String_Node_Str");
        return null;
      }
 else       if ("String_Node_Str".equals(setting.getCollectPictureScriptPath())) {
        JOptionPane.showMessageDialog(null,"String_Node_Str");
        return null;
      }
      task=ScriptParser.buildTaskByJavaScript(task,setting,window.creatingWindow);
    }
 else {
      task=ParseEngine.buildTask_new(task,setting,window.creatingWindow);
    }
    if (task != null) {
      is=WebClient.getStreamUseJava(task.getCoverUrl());
      FileUtil.storeStream(ComponentConst.getSavePathPreffix() + task.getSaveDir(),"String_Node_Str",is);
      setting.setLastCreateTime(task.getCreateTime());
      setting.setTaskHistoryCount(setting.getTaskHistoryCount() + 1);
      setting.setPictureHistoryCount(setting.getPictureHistoryCount() + task.getTotal());
      window.pictureDbTemplate.store(task.getPictures());
      window.taskDbTemplate.store(task);
      window.settingDbTemplate.update(setting);
      TaskingTable taskTable=(TaskingTable)window.runningTable;
      taskTable.getTasks().add(0,task);
      addFormWindow.emptyField();
      addFormWindow.dispose();
      window.tablePane.setVisible(true);
      window.emptyTableTips.setVisible(false);
      taskTable.updateUI();
      if (setting.isAutoDownload()) {
        taskTable.startTask(task);
      }
      task.setCreateWorker(null);
    }
 else {
      JOptionPane.showMessageDialog(null,"String_Node_Str");
    }
  }
 catch (  SocketTimeoutException e) {
    JOptionPane.showMessageDialog(null,"String_Node_Str");
  }
catch (  ConnectTimeoutException e) {
    JOptionPane.showMessageDialog(null,"String_Node_Str");
  }
catch (  SpiderException e) {
    JOptionPane.showMessageDialog(null,e.getMessage());
  }
catch (  WebClientException e) {
    JOptionPane.showMessageDialog(null,e.getMessage());
  }
catch (  FileNotFoundException e) {
    JOptionPane.showMessageDialog(null,e.getMessage());
  }
catch (  ScriptException e) {
    JOptionPane.showMessageDialog(null,e.getMessage());
  }
catch (  Throwable e) {
    e.printStackTrace();
  }
 finally {
    ((CreatingWindow)(window.creatingWindow)).reset();
    window.creatingWindow.dispose();
    addFormWindow.dispose();
    window.setEnabled(true);
    window.setVisible(true);
  }
  return null;
}