Program: 17745
Project: 17745
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(name);
      }
    }
 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.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(new File(name));
      }
    }
 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();
  }
}