Source:
private void readDescriptionFiles(final Set<String> unlabeledRefSetIds, final IProgressMonitor monitor) { RecordParserCallback<String> descriptionParserCallback = new RecordParserCallback<String>() { @Override public void handleRecord(int recordCount, List<String> record) { if (!unlabeledRefSetIds.isEmpty()) { String refSetId = record.get(DESCRIPTION_CONCEPT_ID_COLUMN); String descriptionType = record.get(DESCRIPTION_TYPE_COLUMN); String status = record.get(STATUS_COLUMN); if (unlabeledRefSetIds.contains(refSetId) && descriptionType.equals(SnomedConstants.Concepts.FULLY_SPECIFIED_NAME) && status.equals(ACTIVE_STATUS)) { String term = record.get(DESCRIPTION_TERM_COLUMN); String trimmedTerm = StringUtils.substringBeforeLast(term, "("); refsetIdToLabelMap.put(refSetId, trimmedTerm); unlabeledRefSetIds.remove(refSetId); } } } }; if (!configuration.getDescriptionFiles().isEmpty()) { SubMonitor subMonitor = SubMonitor.convert(monitor, configuration.getDescriptionFiles().size()); subMonitor.setTaskName("Parsing description files for reference set labels..."); for (File descFile : configuration.getDescriptionFiles()) { if (!unlabeledRefSetIds.isEmpty()) { InputStreamReader descriptionReader = null; try { final URL url = configuration.toURL(descFile); descriptionReader = new InputStreamReader(url.openStream()); final CsvParser parser = new CsvParser(descriptionReader, getFileName(url), CSV_SETTINGS, descriptionParserCallback, DESCRIPTION_FIELD_COUNT); parser.parse(); } catch (IOException e) { throw new RuntimeException(e); } finally { Closeables.closeQuietly(descriptionReader); } } subMonitor.worked(1); } } monitor.done(); }

Target:
private void readDescriptionFiles(final Set<String> unlabeledRefSetIds, final IProgressMonitor monitor) { RecordParserCallback<String> descriptionParserCallback = new RecordParserCallback<String>() { @Override public void handleRecord(int recordCount, List<String> record) { if (!unlabeledRefSetIds.isEmpty()) { String refSetId = record.get(DESCRIPTION_CONCEPT_ID_COLUMN); String descriptionType = record.get(DESCRIPTION_TYPE_COLUMN); String status = record.get(STATUS_COLUMN); if (unlabeledRefSetIds.contains(refSetId) && descriptionType.equals(SnomedConstants.Concepts.FULLY_SPECIFIED_NAME) && status.equals(ACTIVE_STATUS)) { String term = record.get(DESCRIPTION_TERM_COLUMN); String trimmedTerm = StringUtils.substringBeforeLast(term, "("); refsetIdToLabelMap.put(refSetId, trimmedTerm); unlabeledRefSetIds.remove(refSetId); } } } }; if (!configuration.getDescriptionFiles().isEmpty()) { SubMonitor subMonitor = SubMonitor.convert(monitor, configuration.getDescriptionFiles().size()); subMonitor.setTaskName("Parsing description files for reference set labels..."); for (File descFile : configuration.getDescriptionFiles()) { if (!unlabeledRefSetIds.isEmpty()) { try { final URL url = configuration.toURL(descFile); try (InputStreamReader descriptionReader = new InputStreamReader(url.openStream())) { final CsvParser parser = new CsvParser(descriptionReader, getFileName(url), CSV_SETTINGS, descriptionParserCallback, DESCRIPTION_FIELD_COUNT); parser.parse(); } } catch (IOException e) { throw new RuntimeException(e); } } subMonitor.worked(1); } } monitor.done(); }