code: public static boolean[] updateRanges(boolean[] range, List<RuleInterval> ruleIntervals) {
      boolean[] res = Arrays.copyOf(range, range.length);
      for (RuleInterval i : ruleIntervals) {
        int start = i.getStart();
        int end = i.getEnd();
        for (int j = start; j < end; j++) {
          res[j] = true;
        }
      }
      return res;
    }
docs: Updating the coverage ranges.
  
  @param range the global range array.
  @param ruleIntervals The intervals used for this update.
  @return an updated array.