Source:
<code>public IlluminaDataProviderFactory(final File basecallDirectory, File barcodesDirectory, final int lane, final ReadStructure readStructure, final BclQualityEvaluationStrategy bclQualityEvaluationStrategy, final IlluminaDataType... dataTypesArg) { this.basecallDirectory = basecallDirectory; this.barcodesDirectory = barcodesDirectory; this.bclQualityEvaluationStrategy = bclQualityEvaluationStrategy; this.lane = lane; final Set<IlluminaDataType> dataTypes = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(dataTypesArg))); if (dataTypes.isEmpty()) { throw new PicardException("No data types have been specified for basecall output " + basecallDirectory + ", lane " + lane); } this.fileUtil = new IlluminaFileUtil(basecallDirectory, barcodesDirectory, lane); formatToDataTypes = determineFormats(dataTypes, fileUtil); final Set<IlluminaDataType> unmatchedDataTypes = findUnmatchedTypes(dataTypes, formatToDataTypes); if (!unmatchedDataTypes.isEmpty()) { throw new PicardException("Could not find a format with available files for the following data types: " + StringUtil.join(", ", new ArrayList<>(unmatchedDataTypes))); } log.debug("The following file formats will be used by IlluminaDataProvider: " + StringUtil.join("," + formatToDataTypes.keySet())); availableTiles = fileUtil.getActualTiles(new ArrayList<>(formatToDataTypes.keySet())); if (availableTiles.isEmpty()) { throw new PicardException("No available tiles were found, make sure that " + basecallDirectory.getAbsolutePath() + " has a lane " + lane); } availableTiles.sort(NewIlluminaBasecallsConverter.TILE_NUMBER_COMPARATOR); formatToDataTypes.keySet().stream() <START> .filter(format -> fileUtil.getUtil(format) instanceof PerTileOrPerRunFileUtil) <END> .forEach(format -> fileUtil.getUtil(format).setTiles(availableTiles)); outputMapping = new OutputMapping(readStructure); }</code><technical_language>clearer write .stream().map(fileUtil::getUtil).filter(...)</technical_language>

Target:
public IlluminaDataProviderFactory(final File basecallDirectory, File barcodesDirectory, final int lane, final ReadStructure readStructure, final BclQualityEvaluationStrategy bclQualityEvaluationStrategy, final IlluminaDataType... dataTypesArg) { this.basecallDirectory = basecallDirectory; this.barcodesDirectory = barcodesDirectory; this.bclQualityEvaluationStrategy = bclQualityEvaluationStrategy; this.lane = lane; final Set<IlluminaDataType> dataTypes = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(dataTypesArg))); if (dataTypes.isEmpty()) { throw new PicardException("No data types have been specified for basecall output " + basecallDirectory + ", lane " + lane); } this.fileUtil = new IlluminaFileUtil(basecallDirectory, barcodesDirectory, lane); formatToDataTypes = determineFormats(dataTypes, fileUtil); final Set<IlluminaDataType> unmatchedDataTypes = findUnmatchedTypes(dataTypes, formatToDataTypes); if (!unmatchedDataTypes.isEmpty()) { throw new PicardException("Could not find a format with available files for the following data types: " + StringUtil.join(", ", new ArrayList<>(unmatchedDataTypes))); } log.debug("The following file formats will be used by IlluminaDataProvider: " + StringUtil.join("," + formatToDataTypes.keySet())); availableTiles = fileUtil.getActualTiles(new ArrayList<>(formatToDataTypes.keySet())); if (availableTiles.isEmpty()) { throw new PicardException("No available tiles were found, make sure that " + basecallDirectory.getAbsolutePath() + " has a lane " + lane); } availableTiles.sort(NewIlluminaBasecallsConverter.TILE_NUMBER_COMPARATOR); formatToDataTypes.keySet().stream().map(fileUtil::getUtil) .forEach(util -> util.setTilesForPerRunFile(availableTiles)); outputMapping = new OutputMapping(readStructure); }