Program: 87204
Project: 87204
Buggy source:
/** 
 * Do actions for the state we are now in.  Essentially, we're always one state ahead of the participants thus we process the result of a Collect in the BEGIN state which means we expect Last or OldRound and in LEARNED state we expect ACCEPT or OLDROUND
 */
private void process(List<Transport.Packet> aMessages){
switch (_stateMachine.getCurrentState()) {
case SHUTDOWN:
{
      _logger.debug(toString() + "String_Node_Str");
      if (_interactionAlarm != null)       cancelInteraction();
      return;
    }
case ABORT:
{
    _logger.debug(toString() + "String_Node_Str" + _outcomes);
    if (_interactionAlarm != null)     cancelInteraction();
    reportOutcome();
    return;
  }
case EXIT:
{
  _logger.debug(toString() + "String_Node_Str" + _outcomes);
  reportOutcome();
  return;
}
case SUBMITTED:
{
if (!_membership.couldComplete()) {
  error(VoteOutcome.Reason.BAD_MEMBERSHIP);
}
 else if (!_common.amMember()) {
  error(VoteOutcome.Reason.NOT_MEMBER);
}
 else {
  _stateMachine.transition(_startState);
  process(NO_MESSAGES);
}
break;
}
case COLLECT:
{
emit(new Collect(_seqNum,_rndNumber));
_stateMachine.transition(State.BEGIN);
break;
}
case BEGIN:
{
if (goneBad(aMessages)) return;
Transport.Packet myLast=null;
for (Transport.Packet p : aMessages) {
Last myNewLast=(Last)p.getMessage();
if (!myNewLast.getConsolidatedValue().equals(Proposal.NO_VALUE)) {
if (myLast == null) myLast=p;
 else if (myNewLast.getRndNumber() > ((Last)myLast.getMessage()).getRndNumber()) {
  myLast=p;
}
}
}
if ((myLast != null) && (!((Last)myLast.getMessage()).getConsolidatedValue().equals(_prop))) {
VoteOutcome myOutcome=new VoteOutcome(VoteOutcome.Reason.OTHER_VALUE,_seqNum,_rndNumber,_prop,myLast.getSource());
_outcomes.add(myOutcome);
_prop=((Last)myLast.getMessage()).getConsolidatedValue();
}
emit(new Begin(_seqNum,_rndNumber,_prop));
_stateMachine.transition(State.SUCCESS);
break;
}
case SUCCESS:
{
if (goneBad(aMessages)) return;
if (aMessages.size() >= _common.getTransport().getFD().getMajority()) {
successful(VoteOutcome.Reason.VALUE);
}
 else {
emit(new Begin(_seqNum,_rndNumber,_prop));
}
break;
}
default :
throw new Error("String_Node_Str" + _stateMachine.getCurrentState());
}
}

Fixed version (ground truth):
/** 
 * Do actions for the state we are now in.  Essentially, we're always one state ahead of the participants thus we process the result of a Collect in the BEGIN state which means we expect Last or OldRound and in LEARNED state we expect ACCEPT or OLDROUND
 */
private void process(Collection<Transport.Packet> aMessages){
switch (_stateMachine.getCurrentState()) {
case SHUTDOWN:
{
      _logger.debug(toString() + "String_Node_Str");
      if (_interactionAlarm != null)       cancelInteraction();
      return;
    }
case ABORT:
{
    _logger.debug(toString() + "String_Node_Str" + _outcomes);
    if (_interactionAlarm != null)     cancelInteraction();
    reportOutcome();
    return;
  }
case EXIT:
{
  _logger.debug(toString() + "String_Node_Str" + _outcomes);
  reportOutcome();
  return;
}
case SUBMITTED:
{
if (!_membership.couldComplete()) {
  error(VoteOutcome.Reason.BAD_MEMBERSHIP);
}
 else if (!_common.amMember()) {
  error(VoteOutcome.Reason.NOT_MEMBER);
}
 else {
  _stateMachine.transition(_startState);
  process(NO_MESSAGES);
}
break;
}
case COLLECT:
{
emit(new Collect(_seqNum,_rndNumber));
_stateMachine.transition(State.BEGIN);
break;
}
case BEGIN:
{
if (goneBad(aMessages)) return;
Transport.Packet myLast=null;
for (Transport.Packet p : aMessages) {
Last myNewLast=(Last)p.getMessage();
if (!myNewLast.getConsolidatedValue().equals(Proposal.NO_VALUE)) {
if (myLast == null) myLast=p;
 else if (myNewLast.getRndNumber() > ((Last)myLast.getMessage()).getRndNumber()) {
  myLast=p;
}
}
}
if ((myLast != null) && (!((Last)myLast.getMessage()).getConsolidatedValue().equals(_prop))) {
VoteOutcome myOutcome=new VoteOutcome(VoteOutcome.Reason.OTHER_VALUE,_seqNum,_rndNumber,_prop,myLast.getSource());
_outcomes.add(myOutcome);
_prop=((Last)myLast.getMessage()).getConsolidatedValue();
}
emit(new Begin(_seqNum,_rndNumber,_prop));
_stateMachine.transition(State.SUCCESS);
break;
}
case SUCCESS:
{
if (goneBad(aMessages)) return;
if (aMessages.size() >= _common.getTransport().getFD().getMajority()) {
successful(VoteOutcome.Reason.VALUE);
}
 else {
emit(new Begin(_seqNum,_rndNumber,_prop));
}
break;
}
default :
throw new Error("String_Node_Str" + _stateMachine.getCurrentState());
}
}