code: private final void step1(boolean y) {
          if (b[k] == 's') {
              if (endWith("sses")) {
                  k -= 2;
              } else if (endWith("ies")) {
                  if (y && k-3 >= 0 && isConsonant(k-3)) {
                      setto("y");
                  } else {
                      setto("i");
                  }
              } else if (b[k - 1] != 's') {
                  k--;
              }
          }
          if (endWith("eed")) {
              if (m() > 0) {
                  k--;
              }
          } else if ((endWith("ed") || endWith("ing")) && vowelinstem()) {
              k = j;
              if (endWith("at")) {
                  setto("ate");
              } else if (endWith("bl")) {
                  setto("ble");
              } else if (endWith("iz")) {
                  setto("ize");
              } else if (y && endWith("i") && k-1 >= 0 && isConsonant(k-1)) {
                  setto("y");
              } else if (doublec(k)) {
                  k--;
                  {
                      int ch = b[k];
                      if (ch == 'l' || ch == 's' || ch == 'z') {
                          k++;
                      }
                  }
              } else if (m() == 1 && cvc(k)) {
                  setto("e");
              }
          }
      }
docs: step1() gets rid of plurals and -ed or -ing. e.g. If the argument y is true,
  do the special handling of ending ies and ied.
  
  caresses  ->  caress
  ponies    ->  poni
  ties      ->  ti
  caress    ->  caress
  cats      ->  cat
  
  feed      ->  feed
  agreed    ->  agree
  disabled  ->  disable
  
  matting   ->  mat
  mating    ->  mate
  meeting   ->  meet
  milling   ->  mill
  messing   ->  mess
  
  meetings  ->  meet