boolean () { if (repositoryCommits.size() > 0) { if (currentPosition < repositoryCommits.size()) return true; if (fetchedCount >= MAX_FETCH_SIZE) { LOG.info("Exceeded fetch limit for git commits"); return false; } fetchOldCommits(repositoryCommits.get(currentPosition - 1)); if (repositoryCommits.size() > 0) { currentPosition = 0; return true; } } return false; }