private Set<MultiChunkEntry> determineRequiredMultiChunks( List<FileSystemAction> actions, Database winnersDatabase) { Set<MultiChunkEntry> multiChunksToDownload = new HashSet<MultiChunkEntry>(); for (FileSystemAction action : actions) { if (action instanceof FileCreatingFileSystemAction) { // TODO [low] This adds ALL multichunks even though some // might be available locally multiChunksToDownload.addAll( determineMultiChunksToDownload(action.getFile2(), localDatabase, winnersDatabase)); } } return multiChunksToDownload; }