private static int solve2(StringBuilder builder) {
        if (builder == null || builder.length() == 0)
            return 0;
        // clean ignore garbage
        StringBuilder s = new StringBuilder();
        boolean ignore = false;
        for (int i = 0; i < builder.length(); i++) {
            char current = builder.charAt(i);
            if (ignore) {
                ignore = false;
                continue;
            }
            if (current == '!') {
                ignore = true;
                continue;
            }
            s.append(current);
        }
        // clean garbage
        int i = 0;
        int sum = 0;
        while (i < s.length()) {
            int start = s.indexOf("<");
            if (start < 0)
                break;
            int end = s.indexOf(">", start);
            if (end < 0)
                throw new IllegalArgumentException("wrong input");
            s.delete(start, end + 1);
            sum += (end - start - 1);
            i = end + 1;
        }

        return sum;
    }
Why Did you create this class? what does it do?
src/adventofcode/StreamProcessing_9.java