Source:
<code>protected void finalizeAndWriteMetrics(final LibraryIdGenerator libraryIdGenerator) { final Map<String, DuplicationMetrics> metricsByLibrary = libraryIdGenerator.getMetricsByLibraryMap(); final Histogram<Short> opticalDuplicatesByLibraryId = libraryIdGenerator.getOpticalDuplicatesByLibraryIdMap(); <START> final Histogram<Double> duplicateCountHist = libraryIdGenerator.getDuplicateCountHist(); <END> final Histogram<Double> opticalDuplicateCountHist = libraryIdGenerator.getOpticalDuplicateCountHist(); final Histogram<Double> nonOpticalDuplicateCountHist = libraryIdGenerator.getNonOpticalDuplicateCountHist(); final Map<String, Short> libraryIds = libraryIdGenerator.getLibraryIdsMap(); final MetricsFile<DuplicationMetrics, Double> file = getMetricsFile(); for (final Map.Entry<String, DuplicationMetrics> entry : metricsByLibrary.entrySet()) { final String libraryName = entry.getKey(); final DuplicationMetrics metrics = entry.getValue(); metrics.READ_PAIRS_EXAMINED = metrics.READ_PAIRS_EXAMINED / 2; metrics.READ_PAIR_DUPLICATES = metrics.READ_PAIR_DUPLICATES / 2; final Short libraryId = libraryIds.get(libraryName); if (libraryId != null) { final Histogram.Bin<Short> bin = opticalDuplicatesByLibraryId.get(libraryId); if (bin != null) { metrics.READ_PAIR_OPTICAL_DUPLICATES = (long) bin.getValue(); } } metrics.calculateDerivedFields(); file.addMetric(metrics); } if (metricsByLibrary.size() == 1) { file.setHistogram(metricsByLibrary.values().iterator().next().calculateRoiHistogram()); } file.addHistogram(duplicateCountHist); file.addHistogram(nonOpticalDuplicateCountHist); file.addHistogram(opticalDuplicateCountHist); file.write(METRICS_FILE); }</code><technical_language>declared here? line 196 below. I clearer remove variables completely inline calls getters, e.g. file.addHistogram(libraryIdGenerator.getDuplicateCountHist(); file.addHistogram(libraryIdGenerator.getOpticalDuplicateCountHist()); file.addHistogram(libraryIdGenerator.getNonOpticalDuplicateCountHist());</technical_language>

Target:
protected void finalizeAndWriteMetrics(final LibraryIdGenerator libraryIdGenerator) { final Map<String, DuplicationMetrics> metricsByLibrary = libraryIdGenerator.getMetricsByLibraryMap(); final Histogram<Short> opticalDuplicatesByLibraryId = libraryIdGenerator.getOpticalDuplicatesByLibraryIdMap(); final Map<String, Short> libraryIds = libraryIdGenerator.getLibraryIdsMap(); final MetricsFile<DuplicationMetrics, Double> file = getMetricsFile(); for (final Map.Entry<String, DuplicationMetrics> entry : metricsByLibrary.entrySet()) { final String libraryName = entry.getKey(); final DuplicationMetrics metrics = entry.getValue(); metrics.READ_PAIRS_EXAMINED = metrics.READ_PAIRS_EXAMINED / 2; metrics.READ_PAIR_DUPLICATES = metrics.READ_PAIR_DUPLICATES / 2; final Short libraryId = libraryIds.get(libraryName); if (libraryId != null) { final Histogram.Bin<Short> bin = opticalDuplicatesByLibraryId.get(libraryId); if (bin != null) { metrics.READ_PAIR_OPTICAL_DUPLICATES = (long) bin.getValue(); } } metrics.calculateDerivedFields(); file.addMetric(metrics); } if (metricsByLibrary.size() == 1) { file.setHistogram(metricsByLibrary.values().iterator().next().calculateRoiHistogram()); } file.addHistogram(libraryIdGenerator.getDuplicateCountHist()); file.addHistogram(libraryIdGenerator.getOpticalDuplicateCountHist()); file.addHistogram(libraryIdGenerator.getNonOpticalDuplicateCountHist()); file.write(METRICS_FILE); }