class DefaultSettingsProblemCollector implements SettingsProblemCollector {

    private List<SettingsProblem> problems;

    private String source;

    DefaultSettingsProblemCollector(List<SettingsProblem> problems) {
        this.problems = (problems != null) ? problems : new ArrayList<>();
    }

    public List<SettingsProblem> getProblems() {
        return problems;
    }

    public void setSource(String source) {
        this.source = source;
    }

    @Override
    public void add(SettingsProblem.Severity severity, String message, int line, int column, Exception cause) {<FILL_FUNCTION_BODY>}
}

        if (line <= 0 && column <= 0 && (cause instanceof SettingsParseException)) {
            SettingsParseException e = (SettingsParseException) cause;
            line = e.getLineNumber();
            column = e.getColumnNumber();
        }

        SettingsProblem problem = new DefaultSettingsProblem(message, severity, source, line, column, cause);

        problems.add(problem);
    
<no_super_class>