class ACLFileParser {

    private static final Logger LOG = LoggerFactory.getLogger(ACLFileParser.class);

    /**
     * Parse the configuration from file.
     *
     * @param file
     *            to parse
     * @return the collector of authorizations form reader passed into.
     * @throws ParseException
     *             if the format is not compliant.
     */
    public static AuthorizationsCollector parse(File file) throws ParseException {
        if (file == null) {
            LOG.warn("parsing NULL file, so fallback on default configuration!");
            return AuthorizationsCollector.emptyImmutableCollector();
        }
        if (!file.exists()) {
            LOG.warn(
                    String.format(
                            "parsing not existing file %s, so fallback on default configuration!",
                            file.getAbsolutePath()));
            return AuthorizationsCollector.emptyImmutableCollector();
        }
        try {
            Reader reader = Files.newBufferedReader(file.toPath(), UTF_8);
            return parse(reader);
        } catch (IOException fex) {
            LOG.warn(
                    String.format(
                            "parsing not existing file %s, so fallback on default configuration!",
                            file.getAbsolutePath()),
                    fex);
            return AuthorizationsCollector.emptyImmutableCollector();
        }
    }

    /**
     * Parse the ACL configuration file
     *
     * @param reader
     *            to parse
     * @return the collector of authorizations form reader passed into.
     * @throws ParseException
     *             if the format is not compliant.
     */
    public static AuthorizationsCollector parse(Reader reader) throws ParseException {<FILL_FUNCTION_BODY>}

    private ACLFileParser() {
    }
}

        if (reader == null) {
            // just log and return default properties
            LOG.warn("parsing NULL reader, so fallback on default configuration!");
            return AuthorizationsCollector.emptyImmutableCollector();
        }

        BufferedReader br = new BufferedReader(reader);
        String line;
        AuthorizationsCollector collector = new AuthorizationsCollector();

        Pattern emptyLine = Pattern.compile("^\\s*$");
        Pattern commentLine = Pattern.compile("^#.*"); // As spec, comment lines should start with '#'
        Pattern invalidCommentLine = Pattern.compile("^\\s*#.*");
        // This pattern has a dependency on filtering `commentLine`.
        Pattern endLineComment = Pattern.compile("^([\\w\\s\\/\\+]+#?)(\\s*#.*)$");
        Matcher endLineCommentMatcher;

        try {
            while ((line = br.readLine()) != null) {
                if (line.isEmpty() || emptyLine.matcher(line).matches() || commentLine.matcher(line).matches()) {
                    // skip it's a black line or comment
                    continue;
                } else if (invalidCommentLine.matcher(line).matches()) {
                    // it's a malformed comment
                    int commentMarker = line.indexOf('#');
                    throw new ParseException(line, commentMarker);
                }

                endLineCommentMatcher = endLineComment.matcher(line);
                if (endLineCommentMatcher.matches()) {
                    line = endLineCommentMatcher.group(1);
                }

                collector.parse(line);
            }
        } catch (IOException ex) {
            throw new ParseException("Failed to read", 1);
        }
        return collector;
    
<no_super_class>