Source:
<code>protected int doWork() { IOUtil.assertFileIsReadable(INPUT); IOUtil.assertFileIsReadable(CLUSTER_FILE); IOUtil.assertFileIsWritable(OUTPUT); <START> InfiniumEGTFile infiniumEGTFile; <END> try { infiniumEGTFile = new InfiniumEGTFile(CLUSTER_FILE); } catch (IOException e) { throw new PicardException("Error reading cluster file '" + CLUSTER_FILE.getAbsolutePath() + "'", e); } IlluminaBPMFile bpmFile; try (final DataInputStream inputStream = new DataInputStream(new FileInputStream(INPUT))) { bpmFile = new IlluminaBPMFile(inputStream); } catch (IOException e) { throw new PicardException("Error reading bpm file '" + INPUT.getAbsolutePath() + "'", e); } DecimalFormat df = new DecimalFormat(("0.0000")); try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(OUTPUT), StandardCharsets.UTF_8))) { writer.write("Index,Name,Chromosome,Position,GenTrain Score,SNP,ILMN Strand,Customer Strand,NormID"); writer.newLine(); for (IlluminaBPMLocusEntry locusEntry : bpmFile.getLocusEntries()) { StringJoiner joiner = new StringJoiner(","); float genTrainScore = infiniumEGTFile.totalScore[locusEntry.index]; joiner.add("" + (locusEntry.index + 1)); joiner.add(locusEntry.name); joiner.add(locusEntry.chrom); joiner.add("" + locusEntry.mapInfo); joiner.add(df.format(genTrainScore)); joiner.add(locusEntry.snp); joiner.add(locusEntry.ilmnStrand); joiner.add(locusEntry.customerStrand); joiner.add("" + locusEntry.normalizationId); writer.write(joiner.toString()); writer.newLine(); } } catch (IOException e) { throw new PicardException("Error writing bpm.csv file '" + OUTPUT.getAbsolutePath() + "'", e); } return 0; }</code><technical_language>final suggestion final InfiniumEGTFile infiniumEGTFile;</technical_language>

Target:
protected int doWork() { IOUtil.assertFileIsReadable(INPUT); IOUtil.assertFileIsReadable(CLUSTER_FILE); IOUtil.assertFileIsWritable(OUTPUT); final InfiniumEGTFile infiniumEGTFile; try { infiniumEGTFile = new InfiniumEGTFile(CLUSTER_FILE); } catch (IOException e) { throw new PicardException("Error reading cluster file '" + CLUSTER_FILE.getAbsolutePath() + "'", e); } final IlluminaBPMFile illuminaBPMFile; try { illuminaBPMFile = new IlluminaBPMFile(INPUT); } catch (IOException e) { throw new PicardException("Error reading bpm file '" + INPUT.getAbsolutePath() + "'", e); } final DecimalFormat df = new DecimalFormat(("0.0000")); try (BufferedWriter writer = Files.newBufferedWriter(OUTPUT.toPath())) { writer.write("Index,Name,Chromosome,Position,GenTrain Score,SNP,ILMN Strand,Customer Strand,NormID"); writer.newLine(); for (IlluminaBPMLocusEntry locusEntry : illuminaBPMFile.getLocusEntries()) { StringJoiner joiner = new StringJoiner(","); float genTrainScore = infiniumEGTFile.totalScore[locusEntry.index]; joiner.add("" + (locusEntry.index + 1)); joiner.add(locusEntry.name); joiner.add(locusEntry.chrom); joiner.add("" + locusEntry.mapInfo); joiner.add(df.format(genTrainScore)); joiner.add(locusEntry.snp); joiner.add(locusEntry.ilmnStrand); joiner.add(locusEntry.customerStrand); joiner.add("" + locusEntry.normalizationId); writer.write(joiner.toString()); writer.newLine(); } } catch (IOException e) { throw new PicardException("Error writing bpm.csv file '" + OUTPUT.getAbsolutePath() + "'", e); } return 0; }