code: public int[] getOccurrences() {
      int[] res = new int[this.occurrences.size()];
      for (int i = 0; i < this.occurrences.size(); i++) {
        res[i] = this.occurrences.get(i);
      }
      return res;
    }
docs: Gets occurrences.
  
  @return all rule's occurrences.