Program: 8019
Project: 8019
Buggy source:
private long runEviction(QueueConsumer consumer,long currentGroupMinEvictEntry,ReadPointer readPointer) throws OperationException {
  OperationResult<Map<byte[],byte[]>> evictBytes=table.get(GLOBAL_EVICT_META_PREFIX,readPointer);
  if (evictBytes.isEmpty()) {
    if (LOG.isTraceEnabled()) {
      logTrace("String_Node_Str");
    }
    return INVALID_ENTRY_ID;
  }
  long minEntryToEvict=currentGroupMinEvictEntry;
  long lastEvictedEntry=FIRST_QUEUE_ENTRY_ID - 1;
  for (  Map.Entry<byte[],byte[]> entry : evictBytes.getValue().entrySet()) {
    if (Bytes.equals(GLOBAL_LAST_EVICT_ENTRY,entry.getKey())) {
      lastEvictedEntry=Bytes.toLong(entry.getValue());
    }
 else     if (Bytes.equals(makeColumnName(GROUP_MAX_EVICT_ENTRY,consumer.getGroupId()),entry.getKey())) {
    }
 else {
      long id=Bytes.toLong(entry.getValue());
      if (minEntryToEvict > id) {
        minEntryToEvict=id;
      }
    }
  }
  if (minEntryToEvict < FIRST_QUEUE_ENTRY_ID || minEntryToEvict <= lastEvictedEntry) {
    if (LOG.isTraceEnabled()) {
      logTrace(String.format("String_Node_Str",minEntryToEvict,lastEvictedEntry));
    }
    return INVALID_ENTRY_ID;
  }
  final long startEvictEntry=lastEvictedEntry + 1;
  if (LOG.isTraceEnabled()) {
    logTrace(String.format("String_Node_Str",startEvictEntry,minEntryToEvict));
  }
  int i=0;
  byte[][] deleteKeys=new byte[(int)(minEntryToEvict - startEvictEntry) + 1][];
  for (long id=startEvictEntry; id <= minEntryToEvict; ++id) {
    deleteKeys[i++]=Bytes.toBytes(id);
  }
  this.table.deleteDirty(deleteKeys);
  return minEntryToEvict;
}

Fixed version (ground truth):
private long runEviction(QueueConsumer consumer,long currentGroupMinEvictEntry,int totalNumGroups,ReadPointer readPointer) throws OperationException {
  OperationResult<Map<byte[],byte[]>> evictBytes=table.get(GLOBAL_EVICT_META_PREFIX,readPointer);
  if (evictBytes.isEmpty() || evictBytes.getValue() == null) {
    if (LOG.isTraceEnabled()) {
      logTrace("String_Node_Str");
    }
    return INVALID_ENTRY_ID;
  }
  Map<byte[],byte[]> evictInfoMap=evictBytes.getValue();
  byte[] lastEvictedEntryBytes=evictInfoMap.get(GLOBAL_LAST_EVICT_ENTRY);
  final long lastEvictedEntry=lastEvictedEntryBytes == null ? FIRST_QUEUE_ENTRY_ID - 1 : Bytes.toLong(lastEvictedEntryBytes);
  long minEntryToEvict=Long.MAX_VALUE;
  for (int groupId=0; groupId < totalNumGroups; ++groupId) {
    long entry;
    if (groupId == consumer.getGroupId()) {
      entry=currentGroupMinEvictEntry;
    }
 else {
      byte[] entryBytes=evictInfoMap.get(makeColumnName(GROUP_MAX_EVICT_ENTRY,groupId));
      if (entryBytes == null) {
        if (LOG.isTraceEnabled()) {
          logTrace(String.format("String_Node_Str",groupId));
        }
        return INVALID_ENTRY_ID;
      }
      entry=Bytes.toLong(entryBytes);
    }
    if (minEntryToEvict > entry) {
      minEntryToEvict=entry;
    }
  }
  if (minEntryToEvict < FIRST_QUEUE_ENTRY_ID || minEntryToEvict <= lastEvictedEntry || minEntryToEvict == Long.MAX_VALUE) {
    if (LOG.isTraceEnabled()) {
      logTrace(String.format("String_Node_Str",minEntryToEvict,lastEvictedEntry));
    }
    return INVALID_ENTRY_ID;
  }
  final long startEvictEntry=lastEvictedEntry + 1;
  if (LOG.isTraceEnabled()) {
    logTrace(String.format("String_Node_Str",startEvictEntry,minEntryToEvict));
  }
  int i=0;
  byte[][] deleteKeys=new byte[(int)(minEntryToEvict - startEvictEntry) + 1][];
  for (long id=startEvictEntry; id <= minEntryToEvict; ++id) {
    deleteKeys[i++]=makeRowKey(GLOBAL_DATA_PREFIX,id);
  }
  this.table.deleteDirty(deleteKeys);
  return minEntryToEvict;
}