Program: 17661
Project: 17661
Buggy source:
public static void createEncogAnalyst(File csvFile){
  boolean refresh=true;
  if (!EncogWorkBench.getInstance().getMainWindow().getTabManager().queryViews(csvFile))   return;
  AnalystWizardDialog dialog=new AnalystWizardDialog(EncogWorkBench.getInstance().getMainWindow());
  if (csvFile != null) {
    dialog.getRawFile().setValue(csvFile.toString());
  }
  if (dialog.process()) {
    EncogAnalyst analyst=null;
    File projectFolder=EncogWorkBench.getInstance().getProjectDirectory();
    File egaFile=null;
    if (dialog.getMethodType() == WizardMethodType.SOM && dialog.getGoal() == AnalystGoal.Regression) {
      EncogWorkBench.displayError("String_Node_Str","String_Node_Str");
      return;
    }
    try {
      EncogWorkBench.getInstance().getMainWindow().beginWait();
      File sourceCSVFile=new File(dialog.getRawFile().getValue());
      File targetCSVFile=new File(projectFolder,sourceCSVFile.getName());
      if (!sourceCSVFile.toString().equals(targetCSVFile.toString())) {
        org.encog.util.file.FileUtil.copy(sourceCSVFile,targetCSVFile);
      }
      egaFile=new File(FileUtil.forceExtension(targetCSVFile.toString(),"String_Node_Str"));
      if (!EncogWorkBench.getInstance().getMainWindow().getTabManager().queryViews(egaFile))       return;
      File egFile=new File(FileUtil.forceExtension(targetCSVFile.toString(),"String_Node_Str"));
      analyst=new EncogAnalyst();
      AnalystWizard wizard=new AnalystWizard(analyst);
      boolean headers=dialog.getHeaders().getValue();
      AnalystFileFormat format=dialog.getFormat();
      wizard.setMethodType(dialog.getMethodType());
      wizard.setTargetField(dialog.getTargetField());
      String m=(String)dialog.getMissing().getSelectedValue();
      if (m.equals("String_Node_Str")) {
        wizard.setMissing(new DiscardMissing());
      }
 else       if (m.equals("String_Node_Str")) {
        wizard.setMissing(new MeanAndModeMissing());
      }
 else       if (m.equals("String_Node_Str")) {
        wizard.setMissing(new NegateMissing());
      }
 else {
        wizard.setMissing(new DiscardMissing());
      }
      wizard.setGoal(dialog.getGoal());
      wizard.setLagWindowSize(dialog.getLagCount().getValue());
      wizard.setLeadWindowSize(dialog.getLeadCount().getValue());
      wizard.setIncludeTargetField(dialog.getIncludeTarget().getValue());
      wizard.setRange(dialog.getRange());
      wizard.setTaskNormalize(dialog.getNormalize().getValue());
      wizard.setTaskRandomize(dialog.getRandomize().getValue());
      wizard.setTaskSegregate(dialog.getSegregate().getValue());
      wizard.setTaskBalance(dialog.getBalance().getValue());
      wizard.setTaskCluster(dialog.getCluster().getValue());
      setSpecific(wizard);
      wizard.wizard(targetCSVFile,headers,format);
      if (analyst != null) {
        analyst.save(egaFile);
        analyst=null;
      }
      EncogWorkBench.getInstance().getMainWindow().getTree().refresh();
      refresh=false;
      EncogWorkBench.getInstance().getMainWindow().openFile(egaFile);
    }
 catch (    EncogError e) {
      EncogWorkBench.displayError("String_Node_Str",e);
    }
 finally {
      EncogWorkBench.getInstance().getMainWindow().endWait();
      if (analyst != null)       analyst.save(egaFile);
    }
  }
}

Fixed version (ground truth):
public static void createEncogAnalyst(File csvFile){
  boolean refresh=true;
  if (!EncogWorkBench.getInstance().getMainWindow().getTabManager().queryViews(csvFile))   return;
  AnalystWizardDialog dialog=new AnalystWizardDialog(EncogWorkBench.getInstance().getMainWindow());
  if (csvFile != null) {
    dialog.getRawFile().setValue(csvFile.toString());
  }
  if (dialog.process()) {
    EncogAnalyst analyst=null;
    File projectFolder=EncogWorkBench.getInstance().getProjectDirectory();
    File egaFile=null;
    if (dialog.getMethodType() == WizardMethodType.SOM && dialog.getGoal() == AnalystGoal.Regression) {
      EncogWorkBench.displayError("String_Node_Str","String_Node_Str");
      return;
    }
    try {
      EncogWorkBench.getInstance().getMainWindow().beginWait();
      File sourceCSVFile=new File(dialog.getRawFile().getValue());
      File targetCSVFile=new File(projectFolder,sourceCSVFile.getName());
      if (!sourceCSVFile.toString().equals(targetCSVFile.toString())) {
        org.encog.util.file.FileUtil.copy(sourceCSVFile,targetCSVFile);
      }
      egaFile=new File(FileUtil.forceExtension(targetCSVFile.toString(),"String_Node_Str"));
      if (!EncogWorkBench.getInstance().getMainWindow().getTabManager().queryViews(egaFile))       return;
      File egFile=new File(FileUtil.forceExtension(targetCSVFile.toString(),"String_Node_Str"));
      analyst=new EncogAnalyst();
      AnalystWizard wizard=new AnalystWizard(analyst);
      boolean headers=dialog.getHeaders().getValue();
      AnalystFileFormat format=dialog.getFormat();
      wizard.setMethodType(dialog.getMethodType());
      wizard.setTargetField(dialog.getTargetField());
      String m=(String)dialog.getMissing().getSelectedValue();
      if (m.equals("String_Node_Str")) {
        wizard.setMissing(new DiscardMissing());
      }
 else       if (m.equals("String_Node_Str")) {
        wizard.setMissing(new MeanAndModeMissing());
      }
 else       if (m.equals("String_Node_Str")) {
        wizard.setMissing(new NegateMissing());
      }
 else {
        wizard.setMissing(new DiscardMissing());
      }
      wizard.setGoal(dialog.getGoal());
      wizard.setLagWindowSize(dialog.getLagCount().getValue());
      wizard.setLeadWindowSize(dialog.getLeadCount().getValue());
      wizard.setIncludeTargetField(dialog.getIncludeTarget().getValue());
      wizard.setRange(dialog.getRange());
      wizard.setTaskNormalize(dialog.getNormalize().getValue());
      wizard.setTaskRandomize(dialog.getRandomize().getValue());
      wizard.setTaskSegregate(dialog.getSegregate().getValue());
      wizard.setTaskBalance(dialog.getBalance().getValue());
      wizard.setTaskCluster(dialog.getCluster().getValue());
      wizard.setMaxError(dialog.getMaxError().getValue() / 100.0);
      setSpecific(wizard);
      wizard.wizard(targetCSVFile,headers,format);
      if (analyst != null) {
        analyst.save(egaFile);
        analyst=null;
      }
      EncogWorkBench.getInstance().getMainWindow().getTree().refresh();
      refresh=false;
      EncogWorkBench.getInstance().getMainWindow().openFile(egaFile);
    }
 catch (    EncogError e) {
      EncogWorkBench.displayError("String_Node_Str",e);
    }
 finally {
      EncogWorkBench.getInstance().getMainWindow().endWait();
      if (analyst != null)       analyst.save(egaFile);
    }
  }
}