public static void mask(StringBuilder stringBuilder) {
        boolean maskedThisCharacter;
        int pos;
        int newPos;
        int length = stringBuilder.length();
        for (pos = 0; pos < length; pos++) {
            maskedThisCharacter = false;
            newPos = maskData(stringBuilder, '*', pos, length);
            maskedThisCharacter = newPos != pos;
            if (maskedThisCharacter) {
                length = stringBuilder.length();
                maskedThisCharacter = false;
            }
            if (!maskedThisCharacter) {
                while (pos < length
                        && !(Character.isWhitespace(stringBuilder.charAt(pos))
                                || STOP_CHARACTERS.contains(stringBuilder.charAt(pos)))) {
                    pos++;
                }
            }
        }
    }
mask sensitive message in the raw data

@param stringBuilder raw data
inlong-common/src/main/java/org/apache/inlong/common/util/MaskDataUtils.java