Source:
<code>public List<FingerprintResults> checkFingerprints(final List<File> samFiles, final List<File> genotypeFiles, final String specificSample, final boolean ignoreReadGroups) { final List<Fingerprint> expectedFingerprints = new LinkedList<>(); for (final File f : genotypeFiles) { expectedFingerprints.addAll(loadFingerprints(f, specificSample).values()); } if (expectedFingerprints.isEmpty()) { throw new IllegalStateException("Could not find any fingerprints in: " + genotypeFiles); } final List<FingerprintResults> resultsList = new ArrayList<>(); final IntervalList intervals = getLociToGenotype(expectedFingerprints); for (final File f : samFiles) { final Map<SAMReadGroupRecord, Fingerprint> fingerprintsByReadGroup = fingerprintSamFile(f, intervals); if (ignoreReadGroups) { final Fingerprint combinedFp = new Fingerprint(specificSample, f, null); fingerprintsByReadGroup.values().forEach(combinedFp::merge); <START> final FingerprintResults results = new FingerprintResults(f, specificSample, specificSample); <END> for (final Fingerprint expectedFp : expectedFingerprints) { final MatchResults result = calculateMatchResults(combinedFp, expectedFp, 0, pLossofHet); results.addResults(result); } resultsList.add(results); } else { for (final SAMReadGroupRecord rg : fingerprintsByReadGroup.keySet()) { final FingerprintResults results = new FingerprintResults(f, rg.getPlatformUnit(), specificSample); for (final Fingerprint expectedFp : expectedFingerprints) { final MatchResults result = calculateMatchResults(fingerprintsByReadGroup.get(rg), expectedFp, 0, pLossofHet); results.addResults(result); } resultsList.add(results); } } } return resultsList; }</code><technical_language>a odd readgroup sample sample_alias. readgroup null empty string in this case</technical_language>

Target:
public List<FingerprintResults> checkFingerprints(final List<File> samFiles, final List<File> genotypeFiles, final String specificSample, final boolean ignoreReadGroups) { final List<Fingerprint> expectedFingerprints = new LinkedList<>(); for (final File f : genotypeFiles) { expectedFingerprints.addAll(loadFingerprints(f, specificSample).values()); } if (expectedFingerprints.isEmpty()) { throw new IllegalStateException("Could not find any fingerprints in: " + genotypeFiles); } final List<FingerprintResults> resultsList = new ArrayList<>(); final IntervalList intervals = getLociToGenotype(expectedFingerprints); for (final File f : samFiles) { final Map<SAMReadGroupRecord, Fingerprint> fingerprintsByReadGroup = fingerprintSamFile(f, intervals); if (ignoreReadGroups) { final Fingerprint combinedFp = new Fingerprint(specificSample, f, null); fingerprintsByReadGroup.values().forEach(combinedFp::merge); final FingerprintResults results = new FingerprintResults(f, null, specificSample); for (final Fingerprint expectedFp : expectedFingerprints) { final MatchResults result = calculateMatchResults(combinedFp, expectedFp, 0, pLossofHet); results.addResults(result); } resultsList.add(results); } else { for (final SAMReadGroupRecord rg : fingerprintsByReadGroup.keySet()) { final FingerprintResults results = new FingerprintResults(f, rg.getPlatformUnit(), specificSample); for (final Fingerprint expectedFp : expectedFingerprints) { final MatchResults result = calculateMatchResults(fingerprintsByReadGroup.get(rg), expectedFp, 0, pLossofHet); results.addResults(result); } resultsList.add(results); } } } return resultsList; }