code: private static int[] filterBySetPos(int[] members, int[] bySetPos) {
          members = Util.uniquify(members);
          IntSet iset = new IntSet();
          for (int pos : bySetPos) {
              if (pos == 0) {
                  continue;
              }
              if (pos < 0) {
                  pos += members.length;
              } else {
                  --pos;  // Zero-index.
              }
              if (pos >= 0 && pos < members.length) {
                  iset.add(members[pos]);
              }
          }
          return iset.toIntArray();
      }
docs: Given an array like BYMONTH=2,3,4,5 and a set pos like BYSETPOS=1,-1
  reduce both clauses to a single one, BYMONTH=2,5 in the preceding.