record.set(r);
return true;
}
return false;
}
<BUG>private static boolean overlaps(SAMRecord r, List<Locatable> intervals) {
if (intervals == null ||</BUG>
(r.getReadUnmappedFlag() && r.getAlignmentStart() == SAMRecord.NO_ALIGNMENT_START)) {
return true;
<BUG>}
for (Locatable interval : intervals) {
if (r.getReadUnmappedFlag()) {</BUG>
if (interval.getStart() <= r.getStart() && interval.getEnd() >= r.getStart()) {

record.set(r);
return true;
}
return false;
}
private boolean overlaps(SAMRecord r) {
if (intervals == null ||
(r.getReadUnmappedFlag() && r.getAlignmentStart() == SAMRecord.NO_ALIGNMENT_START)) {
return true;
}
if (r.getReadUnmappedFlag()) { // special case for unmapped reads with coordinate set
