code: public void setMaximumInstances(int maximumInstances) {
          int newValue = maximumInstances < 0 ? 0 : maximumInstances;
  
          if (this.maximumInstances != newValue) {
              this.maximumInstances = newValue;
  
              getConfig().setProperty(PARAM_MAXIMUM_INSTANCES, this.maximumInstances);
          }
      }
docs: Sets the maximum instances of an alert to include in a report.
  @param maximumInstances the maximum number of instances for each alert