code: private static String reasonToString(int reason) {
          if ((reason > 0) && (reason < REASON_STRINGS.length)) {
              return REASON_STRINGS[reason];
          }
          return "Unknown reason " + reason;
      }
docs: Return a string representation for reasonFlag bit 'reason'.