code: public void removeDuplicateRules() {
          int prod1, prod2;
          int[] tmp1, tmp2;
  
          for (prod1 = getProductionCount() - 1; prod1 >= 0; prod1--) {
              tmp1 = getProduction(prod1);
              for (prod2 = prod1 - 1; prod2 >= 0; prod2--) {
                  tmp2 = getProduction(prod2);
                  if (tmp1[0] == tmp2[0]) {
                      if (equal(tmp1, tmp2)) {
                          removeProduction(prod1);
                          break;
                      }
                  }
              }
          }
      }
docs: TODO: duplicate user-supplied rules are removed silently!