code: private Number getStat(StatList stat) {
          LocalDateTime now = this.clock.now();
          if (now.minusSeconds(this.expiryInterval).isAfter(this.responseDate)) {
              this.responseDate = now;
              this.cachedResponse = commandExecutor.sendCommand(serverProperties.getStats());
          }
  
          for (String line : cachedResponse) {
              if (line.startsWith(stat.getStatPrefix())) {
                  try {
                      return (NumberFormat.getInstance()).parse(line.substring(stat.getStatPrefix().length()).trim());
                  } catch (ParseException e) {
                      LOGGER.warn("Could not parse server statistic", e);
                      return 0;
                  }
              }
          }
  
          return 0;
      }
docs: Returns the statistics of the requested statistics element.
  See <code>StatList</code> for a list of possible items returned
  by getServerStat.
  
  @param stat the statistic desired
  @return the requested statistic