private static int findWhiteSpaceOrComma(int i, String text) {
    while (i < text.length() && !Character.isWhitespace(text.charAt(i)) && text.charAt(i) != ',') {
      i++;
    }
    return i;
  }
private static int findWhiteSpaceOrComma(int i, String text)