class CommitsAnalysis implements Query {

    @Override
    public void query() throws QueryException {
        List<String> commitStatements = new ArrayList<>();
        List<String> authorStatements = new ArrayList<>();
        List<String> renameStatements = new ArrayList<>();

        int commitCount = 0;
        CommitDetails details;
        Commit currentCommit;
        for (String commit : choseCommitsSource()) {
            currentCommit = fillCommit(commit);

            logger.debug("[" + projectId + "] => Analyzing commit: " + currentCommit.sha);
            details = detailsChecker.fetch(currentCommit.sha);

            authorStatements.addAll(authorStatements(currentCommit.authorEmail));
            // GitCommit will not contain the right ordinal.
            commitStatements.add(commitStatement(currentCommit, details));
            renameStatements.addAll(fileRenameStatements(currentCommit, details));

            if (++commitCount % BATCH_SIZE == 0) {
                logger.info("[" + projectId + "] Persist commit batch of size: " + BATCH_SIZE);
                persistBatch(commitStatements, authorStatements, renameStatements);
                authorStatements.clear();
                commitStatements.clear();
                renameStatements.clear();
            }
        }
        persistBatch(commitStatements, authorStatements, renameStatements);
    }

      CommitsAnalysis(int projectId, Persistence persistence, Repository repository,
                    Iterator<Map<String, Object>> commits,
                    CommitDetailsChecker detailsChecker,
                    DeveloperQueries developerQueries, CommitQueries commitQueries);
      CommitsAnalysis(int projectId, Persistence persistence, Repository repository,
                    Iterator<Map<String, Object>> commits,
                    CommitDetailsChecker detailsChecker,
                    DeveloperQueries developerQueries, CommitQueries commitQueries,
                    boolean paprikaOnly);

}