Program: 135936
Project: 135936
Buggy source:
/** 
 * This method is called by eclipse when the user presses OK. The current state of the dialog is saved in preferences so that it can be restored next time, and the PM is launched with the selected options.
 */
protected void okPressed(){
  IPreferenceStore store=ProverUIActivator.getDefault().getPreferenceStore();
  store.setValue(EXTRA_OPTIONS_KEY,extraOptionsText.getText());
  store.setValue(TOOLBOX_MODE_KEY,toolboxMode.getSelection());
  store.setValue(ISATOOL_KEY,isatool.getSelection());
  store.setValue(STATUS_CHECK_KEY,noProving.getSelection());
  store.setValue(ISACHECK_KEY,isacheck.getSelection());
  store.setValue(NOISA_KEY,noisa.getSelection());
  store.setValue(PARANOID_KEY,paranoid.getSelection());
  store.setValue(FP_NORMAL_KEY,fpNormal.getSelection());
  store.setValue(FP_FORGET_ALL_KEY,fpForgetAll.getSelection());
  store.setValue(FP_FORGET_CURRENT_KEY,fpForgetCurrent.getSelection());
  ArrayList command=new ArrayList();
  if (isatool.getSelection()) {
    command.add(ITLAPMOptions.ISAPROVE);
  }
 else   if (isacheck.getSelection()) {
    command.add(ITLAPMOptions.ISACHECK);
  }
  if (fpForgetAll.getSelection()) {
    command.add(ITLAPMOptions.FORGET_ALL);
  }
 else   if (fpForgetCurrent.getSelection()) {
    command.add(ITLAPMOptions.FORGET_CURRENT);
  }
  if (paranoid.isEnabled() && paranoid.getSelection()) {
    command.add(ITLAPMOptions.PARANOID);
  }
  ProverHelper.setThreadsOption(command);
  ProverHelper.setSolverOption(command);
  ProverHelper.setSafeFPOption(command);
  String[] extraOptions=extraOptionsText.getText().trim().split("String_Node_Str");
  for (int i=0; i < extraOptions.length; i++) {
    command.add(extraOptions[i]);
  }
  TLAEditor editor=EditorUtil.getActiveTLAEditor();
  Assert.isNotNull(editor,"String_Node_Str");
  ProverJob proverJob=new ProverJob(((FileEditorInput)editor.getEditorInput()).getFile(),((ITextSelection)editor.getSelectionProvider().getSelection()).getOffset(),noProving.getSelection(),(String[])command.toArray(new String[command.size()]),toolboxMode.getSelection());
  proverJob.setUser(true);
  proverJob.schedule();
  super.okPressed();
}

Fixed version (ground truth):
/** 
 * This method is called by eclipse when the user presses OK. The current state of the dialog is saved in preferences so that it can be restored next time, and the PM is launched with the selected options.
 */
protected void okPressed(){
  IPreferenceStore store=ProverUIActivator.getDefault().getPreferenceStore();
  store.setValue(EXTRA_OPTIONS_KEY,extraOptionsText.getText());
  store.setValue(TOOLBOX_MODE_KEY,toolboxMode.getSelection());
  store.setValue(ISATOOL_KEY,isatool.getSelection());
  store.setValue(STATUS_CHECK_KEY,noProving.getSelection());
  store.setValue(ISACHECK_KEY,isacheck.getSelection());
  store.setValue(NOISA_KEY,noisa.getSelection());
  store.setValue(PARANOID_KEY,paranoid.getSelection());
  store.setValue(FP_NORMAL_KEY,fpNormal.getSelection());
  store.setValue(FP_FORGET_ALL_KEY,fpForgetAll.getSelection());
  store.setValue(FP_FORGET_CURRENT_KEY,fpForgetCurrent.getSelection());
  ArrayList command=new ArrayList();
  if (isatool.getSelection()) {
    command.add(ITLAPMOptions.ISAPROVE);
  }
 else   if (isacheck.getSelection()) {
    command.add(ITLAPMOptions.ISACHECK);
  }
  if (fpForgetAll.getSelection()) {
    command.add(ITLAPMOptions.FORGET_ALL);
  }
 else   if (fpForgetCurrent.getSelection()) {
    command.add(ITLAPMOptions.FORGET_CURRENT);
  }
  if (paranoid.isEnabled() && paranoid.getSelection()) {
    command.add(ITLAPMOptions.PARANOID);
  }
  ProverHelper.setThreadsOption(command);
  ProverHelper.setSolverOption(command);
  ProverHelper.setSafeFPOption(command);
  String[] extraOptions=extraOptionsText.getText().trim().split("String_Node_Str");
  for (int i=0; i < extraOptions.length; i++) {
    if (!extraOptions[i].equals("String_Node_Str")) {
      command.add(extraOptions[i]);
    }
  }
  TLAEditor editor=EditorUtil.getActiveTLAEditor();
  Assert.isNotNull(editor,"String_Node_Str");
  ProverJob proverJob=new ProverJob(((FileEditorInput)editor.getEditorInput()).getFile(),((ITextSelection)editor.getSelectionProvider().getSelection()).getOffset(),noProving.getSelection(),(String[])command.toArray(new String[command.size()]),toolboxMode.getSelection());
  proverJob.setUser(true);
  proverJob.schedule();
  super.okPressed();
}