Program: 17684
Project: 17684
Buggy source:
public static void performCreateFile() throws IOException {
  CreateFileDialog dialog=new CreateFileDialog(EncogWorkBench.getInstance().getMainWindow());
  dialog.setType(CreateFileType.MachineLearningMethod);
  if (dialog.process()) {
    String name=dialog.getFilename();
    if (name == null || name.length() == 0) {
      EncogWorkBench.displayError("String_Node_Str","String_Node_Str");
      return;
    }
    File basePath=EncogWorkBench.getInstance().getMainWindow().getTree().getPath();
    if (dialog.getType() == CreateFileType.MachineLearningMethod) {
      name=FileUtil.forceExtension(new File(name).getName(),"String_Node_Str");
      File path=new File(basePath,name);
      if (FileUtil.checkOverWrite(path)) {
        CreateNeuralNetwork.process(path);
      }
    }
 else     if (dialog.getType() == CreateFileType.TextFile) {
      name=FileUtil.forceExtension(new File(name).getName(),"String_Node_Str");
      File path=new File(basePath,name);
      if (FileUtil.checkOverWrite(path)) {
        FileUtil.writeFileAsString(path,"String_Node_Str");
      }
    }
 else     if (dialog.getType() == CreateFileType.CSVFile) {
      name=FileUtil.forceExtension(new File(name).getName(),"String_Node_Str");
      File path=new File(basePath,name);
      if (FileUtil.checkOverWrite(path)) {
        FileUtil.writeFileAsString(path,"String_Node_Str");
      }
    }
 else     if (dialog.getType() == CreateFileType.TrainingFile) {
      name=FileUtil.forceExtension(new File(name).getName(),"String_Node_Str");
      File path=new File(basePath,name);
      createNewEGB(path);
    }
 else     if (dialog.getType() == CreateFileType.NEAT) {
      name=FileUtil.forceExtension(new File(name).getName(),"String_Node_Str");
      File path=new File(basePath,name);
      createNewPopulation(path);
    }
    EncogWorkBench.getInstance().getMainWindow().getTree().refresh();
  }
}

Fixed version (ground truth):
public static void performCreateFile() throws IOException {
  CreateFileDialog dialog=new CreateFileDialog(EncogWorkBench.getInstance().getMainWindow());
  dialog.setTheType(CreateFileType.MachineLearningMethod);
  if (dialog.process()) {
    String name=dialog.getFilename();
    if (name == null || name.length() == 0) {
      EncogWorkBench.displayError("String_Node_Str","String_Node_Str");
      return;
    }
    File basePath=EncogWorkBench.getInstance().getMainWindow().getTree().getPath();
    if (dialog.getTheType() == CreateFileType.MachineLearningMethod) {
      name=FileUtil.forceExtension(new File(name).getName(),"String_Node_Str");
      File path=new File(basePath,name);
      if (FileUtil.checkOverWrite(path)) {
        CreateNeuralNetwork.process(path);
      }
    }
 else     if (dialog.getTheType() == CreateFileType.TextFile) {
      name=FileUtil.forceExtension(new File(name).getName(),"String_Node_Str");
      File path=new File(basePath,name);
      if (FileUtil.checkOverWrite(path)) {
        FileUtil.writeFileAsString(path,"String_Node_Str");
      }
    }
 else     if (dialog.getTheType() == CreateFileType.CSVFile) {
      name=FileUtil.forceExtension(new File(name).getName(),"String_Node_Str");
      File path=new File(basePath,name);
      if (FileUtil.checkOverWrite(path)) {
        FileUtil.writeFileAsString(path,"String_Node_Str");
      }
    }
 else     if (dialog.getTheType() == CreateFileType.TrainingFile) {
      name=FileUtil.forceExtension(new File(name).getName(),"String_Node_Str");
      File path=new File(basePath,name);
      createNewEGB(path);
    }
 else     if (dialog.getTheType() == CreateFileType.NEAT) {
      name=FileUtil.forceExtension(new File(name).getName(),"String_Node_Str");
      File path=new File(basePath,name);
      createNewPopulation(path);
    }
    EncogWorkBench.getInstance().getMainWindow().getTree().refresh();
  }
}