code: private final void step1() {
          if (sb.charAt(k) == 's') {
              if (ends("sses"))
                  k -= 2;
              else if (ends("ies"))
                  setto("i");
              else if (sb.charAt(k-1) != 's')
                  k--;
          }
          if (ends("eed")) {
              if (m() > 0)
                  k--;
          } else if ((ends("ed") || ends("ing")) && vowelinstem()) {
              k = j;
              if (ends("at"))
                  setto("ate");
              else if (ends("bl"))
                  setto("ble");
              else if (ends("iz"))
                  setto("ize");
              else if (doublec(k)) {
                  k--; 
                  char ch = sb.charAt(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.
  
  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