code: protected static void update(String[] ec, Set<String> predicateSet, Map<String, Integer> counter, int cutoff) {
          for (String s : ec) {
              Integer val = counter.get(s);
              val = val == null ? 1 : val + 1;
              counter.put(s, val);
  
              if (!predicateSet.contains(s) && counter.get(s) >= cutoff) {
                  predicateSet.add(s);
              }
          }
      }
docs: Updates the set of predicated and counter with the specified event contexts and cutoff.
  
  @param ec           The contexts/features which occur in a event.
  @param predicateSet The set of predicates which will be used for model building.
  @param counter      The predicate counters.
  @param cutoff       The cutoff which determines whether a predicate is included.