Program: 154792
Project: 154792
Buggy source:
private List<LogEntry> extractTransactionFromLog(long txId,long expectedVersion,ReadableByteChannel log) throws IOException {
  List<LogEntry> logEntryList=null;
  Map<Integer,List<LogEntry>> transactions=new HashMap<Integer,List<LogEntry>>();
  LogEntry entry;
  while ((entry=LogIoUtils.readEntry(buffer,log,cf)) != null && logEntryList == null) {
    if (entry instanceof LogEntry.Start) {
      List<LogEntry> list=new LinkedList<LogEntry>();
      list.add(entry);
      transactions.put(entry.getIdentifier(),list);
    }
 else     if (entry instanceof LogEntry.Commit) {
      if (((LogEntry.Commit)entry).getTxId() == txId) {
        logEntryList=transactions.get(entry.getIdentifier());
        logEntryList.add(entry);
      }
 else {
        transactions.remove(entry.getIdentifier());
      }
    }
 else     if (entry instanceof LogEntry.Command || entry instanceof LogEntry.Prepare) {
      transactions.get(entry.getIdentifier()).add(entry);
    }
 else     if (entry instanceof LogEntry.Done) {
      transactions.remove(entry.getIdentifier());
    }
 else {
      throw new RuntimeException("String_Node_Str" + entry);
    }
  }
  if (logEntryList == null) {
    msgLog.logMessage("String_Node_Str" + txId + "String_Node_Str"+ expectedVersion);
    throw new IOException("String_Node_Str" + txId + "String_Node_Str"+ expectedVersion+ "String_Node_Str"+ "String_Node_Str"+ this.logVersion+ "String_Node_Str");
  }
  logEntryList.add(new LogEntry.Done(logEntryList.get(0).getIdentifier()));
  return logEntryList;
}

Fixed version (ground truth):
private List<LogEntry> extractTransactionFromLog(long txId,long expectedVersion,ReadableByteChannel log) throws IOException {
  List<LogEntry> logEntryList=null;
  Map<Integer,List<LogEntry>> transactions=new HashMap<Integer,List<LogEntry>>();
  LogEntry entry;
  while ((entry=LogIoUtils.readEntry(buffer,log,cf)) != null && logEntryList == null) {
    if (entry instanceof LogEntry.Start) {
      List<LogEntry> list=new LinkedList<LogEntry>();
      list.add(entry);
      transactions.put(entry.getIdentifier(),list);
    }
 else     if (entry instanceof LogEntry.Commit) {
      if (((LogEntry.Commit)entry).getTxId() == txId) {
        logEntryList=transactions.get(entry.getIdentifier());
        logEntryList.add(entry);
      }
 else {
        transactions.remove(entry.getIdentifier());
      }
    }
 else     if (entry instanceof LogEntry.Command || entry instanceof LogEntry.Prepare) {
      List<LogEntry> list=transactions.get(entry.getIdentifier());
      if (list != null) {
        list.add(entry);
      }
    }
 else     if (entry instanceof LogEntry.Done) {
      transactions.remove(entry.getIdentifier());
    }
 else {
      throw new RuntimeException("String_Node_Str" + entry);
    }
  }
  if (logEntryList == null) {
    msgLog.logMessage("String_Node_Str" + txId + "String_Node_Str"+ expectedVersion);
    throw new IOException("String_Node_Str" + txId + "String_Node_Str"+ expectedVersion+ "String_Node_Str"+ "String_Node_Str"+ this.logVersion+ "String_Node_Str");
  }
  logEntryList.add(new LogEntry.Done(logEntryList.get(0).getIdentifier()));
  return logEntryList;
}