Program: 99009
Project: 99009
Buggy source:
@Override public void start(){
  super.start();
  this.coordinatorTxns=new HashMap<UUID,TxnState>();
  this.participantTxns=new HashMap<UUID,TxnState>();
  this.logFile=LOG_FILE + addr;
  try {
    if (Utility.fileExists(this,this.logFile)) {
      writeOutput("String_Node_Str");
      PersistentStorageReader reader=getReader(this.logFile);
      while (reader.ready()) {
        String line=reader.readLine();
        writeOutput("String_Node_Str" + line);
        String[] parts=line.split("String_Node_Str",2);
        TxnLog.Record r=TxnLog.parseRecordType(parts[0]);
        String txnRecordData=parts[1];
        TxnState txnState;
switch (r) {
case START:
          txnState=TxnState.fromRecordString(txnRecordData);
        coordinatorTxns.put(txnState.txnID,txnState);
      break;
case COMMIT:
    txnState=TxnState.fromRecordString(txnRecordData);
  if (coordinatorTxns.containsKey(txnState.txnID)) {
    coordinatorTxns.get(txnState.txnID).status=TxnState.TxnStatus.COMMITTED;
  }
if (participantTxns.containsKey(txnState.txnID)) {
  participantTxns.get(txnState.txnID).status=TxnState.TxnStatus.COMMITTED;
}
break;
case ABORT:
txnState=TxnState.fromRecordString(txnRecordData);
if (coordinatorTxns.containsKey(txnState.txnID)) {
coordinatorTxns.get(txnState.txnID).status=TxnState.TxnStatus.ABORTED;
}
if (participantTxns.containsKey(txnState.txnID)) {
participantTxns.get(txnState.txnID).status=TxnState.TxnStatus.ABORTED;
}
break;
case ACCEPT:
txnState=TxnState.fromRecordString(txnRecordData);
txnState.status=TxnState.TxnStatus.WAITING;
participantTxns.put(txnState.txnID,txnState);
break;
case REJECT:
txnState=TxnState.fromRecordString(txnRecordData);
txnState.status=TxnState.TxnStatus.ABORTED;
participantTxns.put(txnState.txnID,txnState);
break;
case DONE:
txnState=TxnState.fromRecordString(txnRecordData);
participantTxns.get(txnState.txnID).status=TxnState.TxnStatus.DONE;
break;
}
}
for (TxnState txnState : coordinatorTxns.values()) {
if (txnState.status == TxnState.TxnStatus.UNKNOWN) {
txnLogger.logAbort(txnState);
writeOutput("String_Node_Str" + txnState.txnID + "String_Node_Str");
sendTxnAbort(null,txnState.txnID);
}
}
for (TxnState txnState : participantTxns.values()) {
if (txnState.status == TxnState.TxnStatus.WAITING) {
writeOutput("String_Node_Str" + txnState.txnID + "String_Node_Str");
sendDecisionRequest(txnState.txnID);
}
 else if (txnState.status == TxnState.TxnStatus.ABORTED) {
writeOutput("String_Node_Str" + txnState.txnID + "String_Node_Str");
recieveTxnAbort(TxnPacket.getAbortPacket(this,txnState.txnID,txnState.request));
}
 else if (txnState.status == TxnState.TxnStatus.COMMITTED) {
writeOutput("String_Node_Str" + txnState.txnID + "String_Node_Str");
recieveTxnCommit(TxnPacket.getCommitPacket(this,txnState.txnID,txnState.request,txnState.args));
}
}
}
}
 catch (IOException e) {
writeError("String_Node_Str");
e.printStackTrace();
fail();
}
this.txnLogger=new TxnLog(this.logFile,this);
}

Fixed version (ground truth):
@Override public void start(){
  super.start();
  this.coordinatorTxns=new HashMap<UUID,TxnState>();
  this.participantTxns=new HashMap<UUID,TxnState>();
  this.logFile=LOG_FILE + addr;
  this.txnLogger=new TxnLog(this.logFile,this);
  try {
    if (Utility.fileExists(this,this.logFile)) {
      writeOutput("String_Node_Str");
      PersistentStorageReader reader=getReader(this.logFile);
      while (reader.ready()) {
        String line=reader.readLine();
        writeOutput("String_Node_Str" + line);
        String[] parts=line.split("String_Node_Str",2);
        TxnLog.Record r=TxnLog.parseRecordType(parts[0]);
        String txnRecordData=parts[1];
        TxnState txnState;
switch (r) {
case START:
          txnState=TxnState.fromRecordString(txnRecordData);
        coordinatorTxns.put(txnState.txnID,txnState);
      break;
case COMMIT:
    txnState=TxnState.fromRecordString(txnRecordData);
  if (coordinatorTxns.containsKey(txnState.txnID)) {
    coordinatorTxns.get(txnState.txnID).status=TxnState.TxnStatus.COMMITTED;
  }
if (participantTxns.containsKey(txnState.txnID)) {
  participantTxns.get(txnState.txnID).status=TxnState.TxnStatus.COMMITTED;
}
break;
case ABORT:
txnState=TxnState.fromRecordString(txnRecordData);
if (coordinatorTxns.containsKey(txnState.txnID)) {
coordinatorTxns.get(txnState.txnID).status=TxnState.TxnStatus.ABORTED;
}
if (participantTxns.containsKey(txnState.txnID)) {
participantTxns.get(txnState.txnID).status=TxnState.TxnStatus.ABORTED;
}
break;
case ACCEPT:
txnState=TxnState.fromRecordString(txnRecordData);
txnState.status=TxnState.TxnStatus.WAITING;
participantTxns.put(txnState.txnID,txnState);
break;
case REJECT:
txnState=TxnState.fromRecordString(txnRecordData);
txnState.status=TxnState.TxnStatus.ABORTED;
participantTxns.put(txnState.txnID,txnState);
break;
case DONE:
txnState=TxnState.fromRecordString(txnRecordData);
participantTxns.get(txnState.txnID).status=TxnState.TxnStatus.DONE;
break;
}
}
for (TxnState txnState : coordinatorTxns.values()) {
if (txnState.status == TxnState.TxnStatus.UNKNOWN) {
txnLogger.logAbort(txnState);
writeOutput("String_Node_Str" + txnState.txnID + "String_Node_Str");
sendTxnAbort(null,txnState.txnID);
}
}
for (TxnState txnState : participantTxns.values()) {
if (txnState.status == TxnState.TxnStatus.WAITING) {
writeOutput("String_Node_Str" + txnState.txnID + "String_Node_Str");
sendDecisionRequest(txnState.txnID);
}
 else if (txnState.status == TxnState.TxnStatus.ABORTED) {
writeOutput("String_Node_Str" + txnState.txnID + "String_Node_Str");
recieveTxnAbort(TxnPacket.getAbortPacket(this,txnState.txnID,txnState.request));
}
 else if (txnState.status == TxnState.TxnStatus.COMMITTED) {
writeOutput("String_Node_Str" + txnState.txnID + "String_Node_Str");
recieveTxnCommit(TxnPacket.getCommitPacket(this,txnState.txnID,txnState.request,txnState.args));
}
}
}
}
 catch (IOException e) {
writeError("String_Node_Str");
e.printStackTrace();
fail();
}
}