Program: 81640
Project: 81640
Buggy source:
public InitWindow(){
  super(Version.NAME + "String_Node_Str");
  this.setSize(300,100);
  this.setResizable(false);
  this.setLocationRelativeTo(null);
  this.setUndecorated(true);
  this.getContentPane().setLayout(null);
  this.setDefaultCloseOperation(EXIT_ON_CLOSE);
  textLabel=new AJLabel("String_Node_Str",new Color(123,23,89),0,10,300,30);
  textLabel.setHorizontalAlignment(JLabel.CENTER);
  this.getContentPane().add(textLabel);
  this.setVisible(true);
  textLabel.setForeground(new Color(123,23,89));
  textLabel.setText("String_Node_Str");
  File data_path=new File(ComponentConst.getXmlDirPath());
  if (!data_path.exists()) {
    data_path.mkdirs();
  }
  DbTemplate<Setting> settingDbTemplate=new SettingDom4jDbTemplate();
  List<Setting> settings=settingDbTemplate.query();
  Setting setting=null;
  if (settings == null || settings.size() == 0) {
    setting=new Setting();
    settingDbTemplate.store(setting);
  }
 else {
    setting=settings.get(0);
  }
  textLabel.setForeground(new Color(123,23,89));
  textLabel.setText("String_Node_Str");
  DbTemplate<Task> taskDbTemplate=new TaskDom4jDbTemplate();
  DbTemplate<Picture> pictureDbTemplate=new PictureDom4jDbTemplate();
  List<Task> tasks=taskDbTemplate.query();
  if (tasks != null) {
    int p_historyCount=0;
    for (    Task task : tasks) {
      task.setPictures(pictureDbTemplate.query("String_Node_Str",task.getId()));
      p_historyCount+=task.getTotal();
    }
    if (setting.getTaskHistoryCount() == 0) {
      setting.setTaskHistoryCount(tasks.size());
    }
    if (setting.getPictureHistoryCount() == 0) {
      setting.setPictureHistoryCount(p_historyCount);
    }
  }
  JFrame egDownloaderWindow=new EgDownloaderWindow(setting,tasks,taskDbTemplate,pictureDbTemplate,settingDbTemplate);
  textLabel.setText("String_Node_Str");
  egDownloaderWindow.setVisible(true);
  this.dispose();
}

Fixed version (ground truth):
public InitWindow(){
  super(Version.NAME + "String_Node_Str");
  if (ComponentConst.mainWindow != null) {
    ((TaskingTable)ComponentConst.mainWindow.runningTable).stopAllTasks();
    ComponentConst.mainWindow.dispose();
    ComponentConst.mainWindow=null;
    System.gc();
  }
  this.setSize(300,100);
  this.setResizable(false);
  this.setLocationRelativeTo(null);
  this.setUndecorated(true);
  this.getContentPane().setLayout(null);
  this.setDefaultCloseOperation(EXIT_ON_CLOSE);
  textLabel=new AJLabel("String_Node_Str",new Color(123,23,89),0,10,300,30);
  textLabel.setHorizontalAlignment(JLabel.CENTER);
  this.getContentPane().add(textLabel);
  this.setVisible(true);
  textLabel.setForeground(new Color(123,23,89));
  textLabel.setText("String_Node_Str");
  File data_path=new File(ComponentConst.getXmlDirPath());
  if (!data_path.exists()) {
    data_path.mkdirs();
  }
  DbTemplate<Setting> settingDbTemplate=new SettingDom4jDbTemplate();
  List<Setting> settings=settingDbTemplate.query();
  Setting setting=null;
  if (settings == null || settings.size() == 0) {
    setting=new Setting();
    settingDbTemplate.store(setting);
  }
 else {
    setting=settings.get(0);
  }
  textLabel.setForeground(new Color(123,23,89));
  textLabel.setText("String_Node_Str");
  DbTemplate<Task> taskDbTemplate=new TaskDom4jDbTemplate();
  DbTemplate<Picture> pictureDbTemplate=new PictureDom4jDbTemplate();
  List<Task> tasks=taskDbTemplate.query();
  if (tasks != null) {
    int p_historyCount=0;
    for (    Task task : tasks) {
      task.setPictures(pictureDbTemplate.query("String_Node_Str",task.getId()));
      p_historyCount+=task.getTotal();
    }
    if (setting.getTaskHistoryCount() == 0) {
      setting.setTaskHistoryCount(tasks.size());
    }
    if (setting.getPictureHistoryCount() == 0) {
      setting.setPictureHistoryCount(p_historyCount);
    }
  }
  ComponentConst.mainWindow=new EgDownloaderWindow(setting,tasks,taskDbTemplate,pictureDbTemplate,settingDbTemplate);
  textLabel.setText("String_Node_Str");
  ComponentConst.mainWindow.setVisible(true);
  this.dispose();
}