public char getChar(char[] pattern, int index) {
      if (myPattern == null) {
        myPattern = applyErrors(pattern.clone(), Integer.MAX_VALUE);
      }

      return myPattern[index];
    }
public char getChar(char[] pattern, int index)