public static String getStyledPincode(String code) {
    if (code == null) {
      return null;
    }

    // We need to check if the code is really a string with 6 digits
    if (code.length() != 6) {
      return code;
    }

    for (int i = 0; i < 6; ++i) {
      if (!('0' <= code.charAt(i) && code.charAt(i) <= '9')) {
        return code;
      }
    }

    return code.substring(0, 3) + " " + code.substring(3, 6);
  }
This function insert a space in the middle of the string to divide a 6 digits pincode into two
3-digits part which is used

@param code The original pin code string
@return Return {@code null} when the input is {@code null}, return the original string if the
        code is not a 6-digits code, otherwise return the string with a space in the middle
java/com/google/android/apps/authenticator/util/Utilities.java