class FileCollector extends ChangesetVisitor {
    private final Set<String> files;

    public FileCollector(boolean consumeMergeChangesets) {
        super(consumeMergeChangesets);
        files = new HashSet<>();
    }

    public void accept(RepositoryWithHistoryTraversal.ChangesetInfo changesetInfo) {<FILL_FUNCTION_BODY>}

    /**
     * @return set of file paths relative to source root. There are no guarantees w.r.t. ordering.
     */
    public Set<String> getFiles() {
        return files;
    }

    void addFiles(Collection<String> files) {
        this.files.addAll(files);
    }

    @VisibleForTesting
    public void reset() {
        files.clear();
    }
}

        if (changesetInfo.renamedFiles != null) {
            files.addAll(changesetInfo.renamedFiles);
        }
        if (changesetInfo.files != null) {
            files.addAll(changesetInfo.files);
        }
        if (changesetInfo.deletedFiles != null) {
            files.addAll(changesetInfo.deletedFiles);
        }
    
<methods><variables>boolean consumeMergeChangesets