code: public synchronized String stem(String token) {
          // NOTE: due to the fact that this implemenation saves state per
          // stemming operation, the method needs to be synchronized in order to
          // prevent race conditions by multiple threads.
          sb = new StringBuilder(token);
          k = sb.length() - 1;
          if (k > 1) {
              step1();
              step2();
              step3();
              step4();
              step5();
              step6();
          } 
          sb.delete(k+1, sb.length());
          return sb.toString();        
      }
docs: {@inheritDoc}