Program: 173539
Project: 173539
Buggy source:
protected boolean executeOperatingCost(OperatingCost action){
  String companyName=action.getCompanyName();
  OperatingCost.OCType typeOC=action.getOCType();
  int amount=action.getAmount();
  String errMsg=null;
  while (true) {
    if (!companyName.equals(operatingCompany.value().getId())) {
      errMsg=LocalText.getText("String_Node_Str",companyName,operatingCompany.value().getId());
      break;
    }
    if ((amount + operatingCompany.value().getCash()) < 0) {
      errMsg=LocalText.getText("String_Node_Str",companyName,Bank.format(operatingCompany.value().getCash()),Bank.format(amount));
      break;
    }
    if (typeOC == OperatingCost.OCType.LAY_BASE_TOKEN && operatingCompany.value().getNumberOfFreeBaseTokens() == 0) {
      errMsg=LocalText.getText("String_Node_Str",companyName);
      break;
    }
    break;
  }
  if (errMsg != null) {
    DisplayBuffer.add(LocalText.getText("String_Node_Str",companyName,errMsg));
    return false;
  }
  if (amount > 0) {
    MoneyModel.cashMove(operatingCompany.value(),bank,amount);
  }
 else   if (amount > 0) {
    MoneyModel.cashMove(bank,operatingCompany.value(),-amount);
  }
  if (typeOC == OperatingCost.OCType.LAY_TILE) {
    operatingCompany.value().layTilenNoMapMode(amount);
    ReportBuffer.add(LocalText.getText("String_Node_Str",operatingCompany.value().getId(),Bank.format(amount)));
  }
  if (typeOC == OperatingCost.OCType.LAY_BASE_TOKEN) {
    BaseToken token=operatingCompany.value().getFreeToken();
    if (token == null) {
      log.error("String_Node_Str" + operatingCompany.value().getId() + "String_Node_Str");
      return false;
    }
 else {
    }
    operatingCompany.value().layBaseTokennNoMapMode(amount);
    ReportBuffer.add(LocalText.getText("String_Node_Str",operatingCompany.value().getId(),Bank.format(amount)));
  }
  return true;
}

Fixed version (ground truth):
protected boolean executeOperatingCost(OperatingCost action){
  String companyName=action.getCompanyName();
  OperatingCost.OCType typeOC=action.getOCType();
  int amount=action.getAmount();
  String errMsg=null;
  while (true) {
    if (!companyName.equals(operatingCompany.value().getId())) {
      errMsg=LocalText.getText("String_Node_Str",companyName,operatingCompany.value().getId());
      break;
    }
    if ((amount + operatingCompany.value().getCash()) < 0) {
      errMsg=LocalText.getText("String_Node_Str",companyName,Bank.format(operatingCompany.value().getCash()),Bank.format(amount));
      break;
    }
    if (typeOC == OperatingCost.OCType.LAY_BASE_TOKEN && operatingCompany.value().getNumberOfFreeBaseTokens() == 0) {
      errMsg=LocalText.getText("String_Node_Str",companyName);
      break;
    }
    break;
  }
  if (errMsg != null) {
    DisplayBuffer.add(LocalText.getText("String_Node_Str",companyName,errMsg));
    return false;
  }
  getRoot().getChangeStack().newChangeSet(action);
  if (amount > 0) {
    MoneyModel.cashMove(operatingCompany.value(),bank,amount);
  }
 else   if (amount > 0) {
    MoneyModel.cashMove(bank,operatingCompany.value(),-amount);
  }
  if (typeOC == OperatingCost.OCType.LAY_TILE) {
    operatingCompany.value().layTilenNoMapMode(amount);
    ReportBuffer.add(LocalText.getText("String_Node_Str",operatingCompany.value().getId(),Bank.format(amount)));
  }
  if (typeOC == OperatingCost.OCType.LAY_BASE_TOKEN) {
    BaseToken token=operatingCompany.value().getFreeToken();
    if (token == null) {
      log.error("String_Node_Str" + operatingCompany.value().getId() + "String_Node_Str");
      return false;
    }
 else {
    }
    operatingCompany.value().layBaseTokennNoMapMode(amount);
    ReportBuffer.add(LocalText.getText("String_Node_Str",operatingCompany.value().getId(),Bank.format(amount)));
  }
  return true;
}