class MonotoneAnnotationParser implements Executor.StreamHandler {
    /**
     * Store annotation created by processStream.
     */
    private final Annotation annotation;

    /**
     * Pattern used to extract author/revision from the {@code mnt annotate} command.
     */
    private static final Pattern ANNOTATION_PATTERN
            = Pattern.compile("^(\\w+)\\p{Punct}\\p{Punct} by (\\S+)");

    /**
     * @param file the file being annotated
     */
    public MonotoneAnnotationParser(File file) {
        annotation = new Annotation(file.getName());
    }

   /**
     * Returns the annotation that has been created.
     *
     * @return annotation an annotation object
     */
    public Annotation getAnnotation() {
        return annotation;
    }

    @Override
    public void processStream(InputStream input) throws IOException {<FILL_FUNCTION_BODY>}
}

        try (BufferedReader in = new BufferedReader(new InputStreamReader(input))) {
            String line;
            String author = null;
            String rev = null;
            while ((line = in.readLine()) != null) {
                Matcher matcher = ANNOTATION_PATTERN.matcher(line);
                if (matcher.find()) {
                    rev = matcher.group(1);
                    author = matcher.group(2);
                    annotation.addLine(rev, author, true);
                } else {
                    annotation.addLine(rev, author, true);
                }
            }
        }
    
<no_super_class>