Program: 136009
Project: 136009
Buggy source:
/** 
 * This method does model checking on a TLA+ spec. All the visited states are stored in the variable theFPSet. All the states whose next states have not been explored are stored in the variable theStateQueue.
 */
public void modelCheck() throws Exception {
  report("String_Node_Str");
  if (this.checkLiveness) {
    report("String_Node_Str");
    LiveCheck.init(this.tool,this.actions,this.metadir);
    report("String_Node_Str");
  }
  boolean recovered=this.recover();
  if (!recovered) {
    if (!this.checkAssumptions())     return;
    try {
      report("String_Node_Str");
      MP.printMessage(EC.TLC_COMPUTING_INIT);
      if (!this.doInit(false)) {
        report("String_Node_Str");
        return;
      }
    }
 catch (    Throwable e) {
      report("String_Node_Str");
      report(e);
      if (this.errState != null) {
        MP.printError(EC.TLC_INITIAL_STATE,new String[]{e.getMessage(),this.errState.toString()});
      }
 else {
        MP.printError(EC.GENERAL,e.getMessage());
      }
      this.tool.setCallStack();
      try {
        this.numOfGenStates=0;
        this.doInit(true);
      }
 catch (      Throwable e1) {
        MP.printError(EC.TLC_NESTED_EXPRESSION,this.tool.getCallStack().toString());
      }
      this.printSummary(false);
      this.cleanup(false);
      report("String_Node_Str");
      return;
    }
    if (this.numOfGenStates == this.theFPSet.size()) {
      String plural=(this.numOfGenStates == 1) ? "String_Node_Str" : "String_Node_Str";
      MP.printMessage(EC.TLC_INIT_GENERATED1,new String[]{String.valueOf(this.numOfGenStates),plural});
    }
 else {
      MP.printMessage(EC.TLC_INIT_GENERATED1,new String[]{String.valueOf(this.numOfGenStates),String.valueOf(this.theFPSet.size())});
    }
  }
  report("String_Node_Str");
  if (this.actions.length == 0) {
    this.reportSuccess();
    this.printSummary(true);
    this.cleanup(true);
    report("String_Node_Str");
    return;
  }
  boolean success=false;
  try {
    report("String_Node_Str");
    success=this.runTLC(Integer.MAX_VALUE);
    if (!success) {
      report("String_Node_Str");
      return;
    }
    if (this.errState == null) {
      if (this.checkLiveness) {
        MP.printMessage(EC.TLC_CHECKING_TEMPORAL_PROPS,"String_Node_Str");
        report("String_Node_Str");
        success=LiveCheck.check();
        report("String_Node_Str");
        if (!success) {
          report("String_Node_Str");
          return;
        }
      }
      success=true;
      this.reportSuccess();
    }
 else     if (this.keepCallStack) {
      this.tool.setCallStack();
      try {
        this.doNext(this.predErrState,new ObjLongTable(10));
      }
 catch (      Throwable e) {
        MP.printError(EC.TLC_NESTED_EXPRESSION,this.tool.getCallStack().toString());
      }
    }
  }
 catch (  Exception e) {
    report("String_Node_Str");
    success=false;
    MP.printError(EC.GENERAL,e.getMessage());
  }
 finally {
    this.printSummary(success);
    this.cleanup(success);
  }
  report("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * This method does model checking on a TLA+ spec. All the visited states are stored in the variable theFPSet. All the states whose next states have not been explored are stored in the variable theStateQueue.
 */
public void modelCheck() throws Exception {
  report("String_Node_Str");
  if (this.checkLiveness) {
    report("String_Node_Str");
    LiveCheck.init(this.tool,this.actions,this.metadir);
    report("String_Node_Str");
  }
  boolean recovered=this.recover();
  if (!recovered) {
    if (!this.checkAssumptions())     return;
    try {
      report("String_Node_Str");
      MP.printMessage(EC.TLC_COMPUTING_INIT);
      if (!this.doInit(false)) {
        report("String_Node_Str");
        return;
      }
    }
 catch (    Throwable e) {
      report("String_Node_Str");
      report(e);
      String msg=e.getMessage();
      if (e instanceof StackOverflowError) {
        msg="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
      }
      if (msg == null) {
        msg=e.toString();
      }
      if (this.errState != null) {
        MP.printError(EC.TLC_INITIAL_STATE,new String[]{msg,this.errState.toString()});
      }
 else {
        MP.printError(EC.GENERAL,msg);
      }
      this.tool.setCallStack();
      try {
        this.numOfGenStates=0;
        this.doInit(true);
      }
 catch (      Throwable e1) {
        MP.printError(EC.TLC_NESTED_EXPRESSION,this.tool.getCallStack().toString());
      }
      this.printSummary(false);
      this.cleanup(false);
      report("String_Node_Str");
      return;
    }
    if (this.numOfGenStates == this.theFPSet.size()) {
      String plural=(this.numOfGenStates == 1) ? "String_Node_Str" : "String_Node_Str";
      MP.printMessage(EC.TLC_INIT_GENERATED1,new String[]{String.valueOf(this.numOfGenStates),plural});
    }
 else {
      MP.printMessage(EC.TLC_INIT_GENERATED1,new String[]{String.valueOf(this.numOfGenStates),String.valueOf(this.theFPSet.size())});
    }
  }
  report("String_Node_Str");
  if (this.actions.length == 0) {
    this.reportSuccess();
    this.printSummary(true);
    this.cleanup(true);
    report("String_Node_Str");
    return;
  }
  boolean success=false;
  try {
    report("String_Node_Str");
    success=this.runTLC(Integer.MAX_VALUE);
    if (!success) {
      report("String_Node_Str");
      return;
    }
    if (this.errState == null) {
      if (this.checkLiveness) {
        MP.printMessage(EC.TLC_CHECKING_TEMPORAL_PROPS,"String_Node_Str");
        report("String_Node_Str");
        success=LiveCheck.check();
        report("String_Node_Str");
        if (!success) {
          report("String_Node_Str");
          return;
        }
      }
      success=true;
      this.reportSuccess();
    }
 else     if (this.keepCallStack) {
      this.tool.setCallStack();
      try {
        this.doNext(this.predErrState,new ObjLongTable(10));
      }
 catch (      Throwable e) {
        MP.printError(EC.TLC_NESTED_EXPRESSION,this.tool.getCallStack().toString());
      }
    }
  }
 catch (  Exception e) {
    report("String_Node_Str");
    success=false;
    MP.printError(EC.GENERAL,(e.getMessage() == null) ? e.toString() : e.getMessage());
  }
 finally {
    this.printSummary(success);
    this.cleanup(success);
  }
  report("String_Node_Str");
}