private void erAndOrEndings() {
    int old_k = k;
    
    if (word.charAt(k) != 'r') return; // YCS
    
    char word_char; /* so we can remember if it was -er or -or */
    
    if (endsIn('i', 'z', 'e', 'r')) { /*
                                       * -ize is very productive, so accept it
                                       * as the root
                                       */
      word.setLength(j + 4);
      k = j + 3;
      lookup();
      return;
    }
    
    if (endsIn('e', 'r') || endsIn('o', 'r')) {
      word_char = word.charAt(j + 1);
      if (doubleC(j)) {
        word.setLength(j);
        k = j - 1;
        if (lookup()) return;
        word.unsafeWrite(word.charAt(j - 1)); /* restore the doubled consonant */
      }
      
      if (word.charAt(j) == 'i') { /* do we have a -ier ending? */
        word.setCharAt(j, 'y');
        word.setLength(j + 1);
        k = j;
        if (lookup()) /* yes, so check against the dictionary */
        return;
        word.setCharAt(j, 'i'); /* restore the endings */
        word.unsafeWrite('e');
      }
      
      if (word.charAt(j) == 'e') { /* handle -eer */
        word.setLength(j);
        k = j - 1;
        if (lookup()) return;
        word.unsafeWrite('e');
      }
      
      word.setLength(j + 2); /* remove the -r ending */
      k = j + 1;
      if (lookup()) return;
      word.setLength(j + 1); /* try removing -er/-or */
      k = j;
      if (lookup()) return;
      word.unsafeWrite('e'); /* try removing -or and adding -e */
      k = j + 1;
      if (lookup()) return;
      word.setLength(j + 1);
      word.unsafeWrite(word_char);
      word.unsafeWrite('r'); /* restore the word to the way it was */
      k = old_k;
      // nolookup()
    }
    
  }
*
YCS: this was the one place where lookup was not followed by return.
So restructure it. if ((j>0)&&(lookup(word.toString())) &&
!((word.charAt(j) == 's') && (word.charAt(j-1) == 's'))) return;
***
linguistics/src/main/java/com/yahoo/language/simple/kstem/KStemmer.java