Bunch (final List<CommittedChangeList> data, final boolean consistentWithPrevious, final Bunch bindTo) { if (data.isEmpty()) { return null; } final SvnRepositoryLocation repositoryLocation = ((SvnChangeList) data.get(0)).getLocation(); final String location = repositoryLocation.getURL(); final List<List<CommittedChangeList>> list = split(data, SvnRevisionsNavigationMediator.CHUNK_SIZE); Bunch bindToBunch = bindTo; if (bindToBunch == null) { final Bunch fromCache = myMap.get(location); if (fromCache != null) { final long passedSmallestNumber = data.get(data.size() - 1).getNumber(); final List<CommittedChangeList> cachedList = fromCache.getList(); final long greatestNumber = cachedList.get(0).getNumber(); if (greatestNumber < passedSmallestNumber) { bindToBunch = fromCache; } } } boolean consistent = consistentWithPrevious; for (int i = list.size() - 1; i >= 0; -- i) { final List<CommittedChangeList> changeLists = list.get(i); debugInfo(changeLists, consistent, bindToBunch); bindToBunch = new Bunch(changeLists, consistent, bindToBunch); consistent = true; } if (bindToBunch != null) { myMap.put(location, bindToBunch); } return bindToBunch; }