Program: 45349
Project: 45349
Buggy source:
public void run(){
synchronized (lock) {
    int noCommands=commands.size();
    int commandsRun=0;
    this.owner.getRunButton().setEnabled(false);
    this.owner.getProgressBar().setMaximum(noCommands);
    this.owner.getProgressBar().setValue(0);
    Iterator<RunCommand> iter=this.commands.iterator();
    while (iter.hasNext() && !stop) {
      RunCommand r=iter.next();
      this.owner.getProgressBar().setString("String_Node_Str" + r.getMethod() + "String_Node_Str");
      this.owner.getProgressBar().setStringPainted(true);
      r.run();
      passes+=r.getPasses();
      failures+=r.getFailures();
      exceptions+=r.getExceptions();
      if (owner.getHideSuccessfulTests().getState() && r.getFailures() == 0) {
      }
 else {
        owner.getTestOutput().append(r.getOutput() + "String_Node_Str");
        owner.getTestOutput().setCaretPosition(owner.getTestOutput().getText().length());
      }
      this.owner.getProgressBar().setValue(++commandsRun);
    }
    owner.getTestOutput().append("String_Node_Str");
    owner.getTestOutput().append("String_Node_Str" + passes + "String_Node_Str"+ failures+ "String_Node_Str"+ exceptions+ "String_Node_Str");
    owner.getTestOutput().setCaretPosition(owner.getTestOutput().getText().length());
    if (stop) {
      this.owner.getProgressBar().setValue(0);
      this.owner.getProgressBar().setString("String_Node_Str");
    }
 else {
      this.owner.getProgressBar().setString("String_Node_Str");
    }
    stop=false;
    this.owner.getRunButton().setEnabled(true);
    this.owner.getCancelButton().setEnabled(false);
  }
}

Fixed version (ground truth):
@Override public void run(){
synchronized (lock) {
    int noCommands=commands.size();
    this.owner.getRunButton().setEnabled(false);
    this.owner.getProgressBar().setMaximum(noCommands);
    this.owner.getProgressBar().setValue(0);
    Iterator<RunCommand> iter=this.commands.iterator();
    while (iter.hasNext() && !stop) {
      RunCommand r=iter.next();
      this.owner.getProgressBar().setString("String_Node_Str" + r.getMethod() + "String_Node_Str");
      this.owner.getProgressBar().setStringPainted(true);
      r.run();
      passes+=r.getPasses();
      failures+=r.getFailures();
      exceptions+=r.getExceptions();
      commandsRun++;
      if (owner.getHideSuccessfulTests().getState() && r.getFailures() == 0 && r.getPasses() > 0) {
      }
 else {
        owner.getTestOutput().append(r.getOutput() + "String_Node_Str");
        owner.getTestOutput().setCaretPosition(owner.getTestOutput().getText().length());
      }
      if (!r.getError().isEmpty()) {
        owner.getTestOutput().append(r.getMethod() + "String_Node_Str" + r.getError()+ "String_Node_Str");
        owner.getTestOutput().setCaretPosition(owner.getTestOutput().getText().length());
      }
      this.owner.getProgressBar().setValue(commandsRun);
    }
    owner.getTestOutput().append("String_Node_Str");
    owner.getTestOutput().append("String_Node_Str" + commandsRun + "String_Node_Str"+ passes+ "String_Node_Str"+ failures+ "String_Node_Str"+ exceptions+ "String_Node_Str");
    owner.getTestOutput().setCaretPosition(owner.getTestOutput().getText().length());
    if (stop) {
      this.owner.getProgressBar().setValue(0);
      this.owner.getProgressBar().setString("String_Node_Str");
    }
 else {
      this.owner.getProgressBar().setString("String_Node_Str");
    }
    stop=false;
    this.owner.getRunButton().setEnabled(true);
    this.owner.getCancelButton().setEnabled(false);
  }
}