private Map findIncompleteSFVs(Collection sections) { Map incompleteSfv = new HashMap(); List uncheckedDirs = new ArrayList(); //add all dirs in sections for (SectionInterface section : sections) { uncheckedDirs.addAll(section.getBaseFile().getDirectories()); } //check for subdirs to process and add all non complete sfvfiles while (!uncheckedDirs.isEmpty()) { LinkedRemoteFileInterface file = uncheckedDirs.remove(0); try { SFVFile sfv = file.lookupSFVFile(); if (sfv != null && !sfv.getStatus().isFinished()) incompleteSfv.put(sfv, file); } catch (FileNotFoundException e) { //no sfv, ignore that } catch (IOException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } catch (NoAvailableSlaveException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } if (file.isDirectory()) { uncheckedDirs.addAll(file.getDirectories()); } } return incompleteSfv;