Program: 173746
Project: 173746
Buggy source:
/** 
 * Implements special rules for first time operating in 1856
 */
@Override protected boolean setNextOperatingCompany(boolean initial){
  if (operatingCompanyIndexObject == null) {
    operatingCompanyIndexObject=new IntegerState("String_Node_Str");
  }
  while (true) {
    if (initial) {
      operatingCompanyIndexObject.set(0);
      initial=false;
    }
 else {
      operatingCompanyIndexObject.add(1);
    }
    int operatingCompanyIndex=operatingCompanyIndexObject.intValue();
    if (operatingCompanyIndex >= operatingCompanyArray.length) {
      return false;
    }
 else {
      operatingCompany=operatingCompanyArray[operatingCompanyIndex];
      if (operatingCompany instanceof PublicCompany_CGR)       return true;
      if (operatingCompany.isClosed())       continue;
      if (!operatingCompany.hasOperated()) {
        int soldPercentage=100 - operatingCompany.getUnsoldPercentage();
        TrainI nextAvailableTrain=gameManager.getTrainManager().getAvailableNewTrains().get(0);
        int trainNumber;
        try {
          trainNumber=Integer.parseInt(nextAvailableTrain.getName());
        }
 catch (        NumberFormatException e) {
          trainNumber=6;
        }
        int floatPercentage=10 * trainNumber;
        log.debug("String_Node_Str" + floatPercentage + "String_Node_Str"+ soldPercentage);
        if (soldPercentage < floatPercentage) {
          DisplayBuffer.add(LocalText.getText("String_Node_Str",operatingCompany.getName(),String.valueOf(soldPercentage),String.valueOf(floatPercentage)));
          continue;
        }
      }
      return true;
    }
  }
}

Fixed version (ground truth):
/** 
 * Implements special rules for first time operating in 1856
 */
@Override protected boolean setNextOperatingCompany(boolean initial){
  if (operatingCompanyIndexObject == null) {
    operatingCompanyIndexObject=new IntegerState("String_Node_Str");
  }
  while (true) {
    if (initial) {
      operatingCompanyIndexObject.set(0);
      initial=false;
    }
 else {
      operatingCompanyIndexObject.add(1);
    }
    int operatingCompanyIndex=operatingCompanyIndexObject.intValue();
    if (operatingCompanyIndex >= operatingCompanyArray.length) {
      return false;
    }
 else {
      operatingCompany=operatingCompanyArray[operatingCompanyIndex];
      if (operatingCompany instanceof PublicCompany_CGR)       return true;
      if (operatingCompany.isClosed())       continue;
      if (!operatingCompany.hasOperated()) {
        int soldPercentage=getSoldPercentage(operatingCompany);
        TrainI nextAvailableTrain=gameManager.getTrainManager().getAvailableNewTrains().get(0);
        int trainNumber;
        try {
          trainNumber=Integer.parseInt(nextAvailableTrain.getName());
        }
 catch (        NumberFormatException e) {
          trainNumber=6;
        }
        int floatPercentage=10 * trainNumber;
        log.debug("String_Node_Str" + floatPercentage + "String_Node_Str"+ soldPercentage);
        if (soldPercentage < floatPercentage) {
          DisplayBuffer.add(LocalText.getText("String_Node_Str",operatingCompany.getName(),String.valueOf(soldPercentage),String.valueOf(floatPercentage)));
          continue;
        }
      }
      return true;
    }
  }
}