Source:
<code>protected void acceptRead(final SAMRecord rec, final ReferenceSequence ref) { if (recordFilter.filterOut(rec)) return; final String library = (rec.getReadGroup() == null) ? UNKNOWN_LIBRARY : getOrElse(rec.getReadGroup().getLibrary(), UNKNOWN_LIBRARY); if (!libraries.contains(library)) { throw new PicardException("Record contains library that is missing from header: " + library); } final ArtifactCounter counter = artifactCounters.get(library); final byte[] readBases = rec.getReadBases(); <START> final byte[] readQuals = rec.getBaseQualities(); <END> final int contextFullLength = 2 * CONTEXT_SIZE + 1; for (final AlignmentBlock block : rec.getAlignmentBlocks()) { for (int offset = 0; offset < block.getLength(); offset++) { final int readPos = block.getReadStart() + offset; final int refPos = block.getReferenceStart() + offset; final byte qual = readQuals[readPos - 1]; if (qual < MINIMUM_QUALITY_SCORE) continue; final char readBase = (char)readBases[readPos - 1]; if (readBase == 'N') continue; if (intervalMask != null && !intervalMask.get(ref.getContigIndex(), refPos)) continue; if (dbSnpMask != null && dbSnpMask.isDbSnpSite(ref.getName(), refPos)) continue; final int contextStartIndex = refPos - CONTEXT_SIZE - 1; if (contextStartIndex < 0 || contextStartIndex + contextFullLength > ref.length()) continue; final String context = getRefContext(ref, contextStartIndex, contextFullLength); if (context.contains("N")) continue; counter.countRecord(context, readBase, rec); } } }</code><technical_language>allow for OQ if user wants</technical_language>

Target:
protected void acceptRead(final SAMRecord rec, final ReferenceSequence ref) { if (recordFilter.filterOut(rec)) return; final String library = (rec.getReadGroup() == null) ? UNKNOWN_LIBRARY : getOrElse(rec.getReadGroup().getLibrary(), UNKNOWN_LIBRARY); if (!libraries.contains(library)) { throw new PicardException("Record contains library that is missing from header: " + library); } final int contextFullLength = 2 * CONTEXT_SIZE + 1; final ArtifactCounter counter = artifactCounters.get(library); final byte[] readBases = rec.getReadBases(); final byte[] readQuals; if (USE_OQ) { final byte[] tmp = rec.getOriginalBaseQualities(); readQuals = tmp == null ? rec.getBaseQualities() : tmp; } else { readQuals = rec.getBaseQualities(); } for (final AlignmentBlock block : rec.getAlignmentBlocks()) { for (int offset = 0; offset < block.getLength(); offset++) { final int readPos = block.getReadStart() + offset; final int refPos = block.getReferenceStart() + offset; final byte qual = readQuals[readPos - 1]; if (qual < MINIMUM_QUALITY_SCORE) continue; final char readBase = Character.toUpperCase((char)readBases[readPos - 1]); if (readBase == 'N') continue; if (intervalMask != null && !intervalMask.get(ref.getContigIndex(), refPos)) continue; if (dbSnpMask != null && dbSnpMask.isDbSnpSite(ref.getName(), refPos)) continue; final int contextStartIndex = refPos - CONTEXT_SIZE - 1; if (contextStartIndex < 0 || contextStartIndex + contextFullLength > ref.length()) continue; final String context = getRefContext(ref, contextStartIndex, contextFullLength); if (context.contains("N")) continue; counter.countRecord(context, readBase, rec); } } }