Program: 168480
Project: 168480
Buggy source:
/** 
 * Find records with keys <code>k</code> in the range <code>minKeyInclusive</code> &lt;= <code>k</code> &lt; <code>maxKeyExclusive</code>) that exist in <code>keyedNode</code>.<br> If no matching records are found, then the record with the largest key that is less than <code>minKeyInclusive</code> (if any such record exists) is returned in <code>result</code> and the function returns <code>false</code>. If no such record exists, nothing is added to <code>result</code> (and <code>false</code> is still returned).
 * @param < R > The type of the records that we operate on.
 * @param keyedNode <b>(in)</b> The keyed node to search.
 * @param minKeyInclusive <b>(in)</b> The smallest key in the range (inclusive).
 * @param maxKeyExclusive <b>(in)</b> The largest key in the range (exclusive).
 * @param result <b>(out)</b> A  {@link java.util.LinkedList} that will receive thematching keys.
 * @return <code>true</code> if at least one key matching the specified conditions was found, and <code>false</code> otherwise.
 */
protected <R extends CommonBTKeyedRecord<K>>boolean findLEKeys(CommonBTKeyedNode<R> keyedNode,K minKeyInclusive,K maxKeyExclusive,LinkedList<R> result){
  boolean found=false;
  K largestLEKey=null;
  R largestLERecord=null;
  for (  R record : keyedNode.getBTKeyedRecords()) {
    K key=record.getKey();
    if (key.compareTo(minKeyInclusive) < 0) {
      if (largestLEKey == null || key.compareTo(largestLEKey) > 0) {
        largestLEKey=key;
        largestLERecord=record;
      }
    }
 else     if (key.compareTo(maxKeyExclusive) < 0) {
      if (result != null) {
        result.addLast(record);
      }
      found=true;
    }
  }
  if (largestLEKey != null) {
    if (result != null) {
      result.addFirst(largestLERecord);
    }
  }
  return found;
}

Fixed version (ground truth):
/** 
 * Find records with keys <code>k</code> in the range <code>minKeyInclusive</code> &lt;= <code>k</code> &lt; <code>maxKeyExclusive</code>) that exist in <code>keyedNode</code>.<br> If no matching records are found, then the record with the largest key that is less than <code>minKeyInclusive</code> (if any such record exists) is returned in <code>result</code> and the function returns <code>false</code>. If no such record exists, nothing is added to <code>result</code> (and <code>false</code> is still returned).
 * @param < R > The type of the records that we operate on.
 * @param keyedNode <b>(in)</b> The keyed node to search.
 * @param minKeyInclusive <b>(in)</b> The smallest key in the range (inclusive).
 * @param maxKeyExclusive <b>(in)</b> The largest key in the range (exclusive).
 * @param strict <b>(in)</b> If <code>false</code>, then the record before the first match is always included in the result. This is appropriate when searching index nodes, but not for leaf nodes.
 * @param result <b>(out)</b> A  {@link java.util.LinkedList} that will receive thematching keys.
 * @return <code>true</code> if at least one key matching the specified conditions was found, and <code>false</code> otherwise.
 */
protected <R extends CommonBTKeyedRecord<K>>boolean findLEKeys(CommonBTKeyedNode<R> keyedNode,K minKeyInclusive,K maxKeyExclusive,boolean strict,LinkedList<R> result){
  boolean found=false;
  K largestLEKey=null;
  R largestLERecord=null;
  for (  R record : keyedNode.getBTKeyedRecords()) {
    K key=record.getKey();
    if (key.compareTo(minKeyInclusive) < 0) {
      if (largestLEKey == null || key.compareTo(largestLEKey) > 0) {
        largestLEKey=key;
        largestLERecord=record;
      }
    }
 else     if (key.compareTo(maxKeyExclusive) < 0) {
      if (result != null) {
        result.addLast(record);
      }
      found=true;
    }
  }
  if (largestLEKey != null && (!found || !strict)) {
    if (result != null) {
      result.addFirst(largestLERecord);
    }
  }
  return found;
}