Program: 130742
Project: 130742
Buggy source:
/** 
 * Waits until receives the CEPOCH message from the quorum.
 * @throws InterruptedException if anything wrong happens.
 * @throws TimeoutException in case of timeout.
 */
void waitProposedEpochFromQuorum() throws InterruptedException, TimeoutException, IOException {
  ClusterConfiguration currentConfig=persistence.getLastSeenConfig();
  long acknowledgedEpoch=persistence.getAckEpoch();
  while (this.quorumSet.size() < getQuorumSize() - 1) {
    MessageTuple tuple=getExpectedMessage(MessageType.PROPOSED_EPOCH,null);
    Message msg=tuple.getMessage();
    String source=tuple.getServerId();
    ZabMessage.ProposedEpoch epoch=msg.getProposedEpoch();
    ClusterConfiguration peerConfig=ClusterConfiguration.fromProto(epoch.getConfig(),source);
    long peerProposedEpoch=epoch.getProposedEpoch();
    long peerAckedEpoch=epoch.getCurrentEpoch();
    int syncTimeoutMs=epoch.getSyncTimeout();
    Zxid peerVersion=peerConfig.getVersion();
    Zxid selfVersion=currentConfig.getVersion();
    if (!peerVersion.equals(selfVersion)) {
      LOG.debug("String_Node_Str",peerVersion,selfVersion);
      if (peerAckedEpoch > acknowledgedEpoch || (peerAckedEpoch == acknowledgedEpoch && peerVersion.compareTo(selfVersion) > 0)) {
        LOG.debug("String_Node_Str" + "String_Node_Str",source);
        throw new BackToElectionException();
      }
    }
    if (!currentConfig.contains(source)) {
      LOG.debug("String_Node_Str",source);
      continue;
    }
    if (this.quorumSet.containsKey(source)) {
      throw new RuntimeException("String_Node_Str" + source + "String_Node_Str");
    }
    PeerHandler ph=new PeerHandler(source,transport,config.getTimeoutMs() / 3);
    ph.setLastProposedEpoch(peerProposedEpoch);
    this.quorumSet.put(source,ph);
  }
  LOG.debug("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Waits until receives the CEPOCH message from the quorum.
 * @throws InterruptedException if anything wrong happens.
 * @throws TimeoutException in case of timeout.
 */
void waitProposedEpochFromQuorum() throws InterruptedException, TimeoutException, IOException {
  ClusterConfiguration currentConfig=persistence.getLastSeenConfig();
  long acknowledgedEpoch=persistence.getAckEpoch();
  while (this.quorumSet.size() < getQuorumSize() - 1) {
    MessageTuple tuple=getExpectedMessage(MessageType.PROPOSED_EPOCH,null);
    Message msg=tuple.getMessage();
    String source=tuple.getServerId();
    ZabMessage.ProposedEpoch epoch=msg.getProposedEpoch();
    ClusterConfiguration peerConfig=ClusterConfiguration.fromProto(epoch.getConfig(),source);
    long peerProposedEpoch=epoch.getProposedEpoch();
    long peerAckedEpoch=epoch.getCurrentEpoch();
    int syncTimeoutMs=epoch.getSyncTimeout();
    Zxid peerVersion=peerConfig.getVersion();
    Zxid selfVersion=currentConfig.getVersion();
    if (!peerVersion.equals(selfVersion)) {
      LOG.debug("String_Node_Str",peerVersion,selfVersion);
      if (peerAckedEpoch > acknowledgedEpoch || (peerAckedEpoch == acknowledgedEpoch && peerVersion.compareTo(selfVersion) > 0)) {
        LOG.debug("String_Node_Str" + "String_Node_Str",source);
        throw new BackToElectionException();
      }
    }
    if (!currentConfig.contains(source)) {
      LOG.debug("String_Node_Str",source);
      continue;
    }
    if (this.quorumSet.containsKey(source)) {
      throw new RuntimeException("String_Node_Str" + source + "String_Node_Str");
    }
    PeerHandler ph=new PeerHandler(source,transport,config.getTimeoutMs() / 3);
    ph.setLastProposedEpoch(peerProposedEpoch);
    ph.setSyncTimeoutMs(syncTimeoutMs);
    this.quorumSet.put(source,ph);
  }
  LOG.debug("String_Node_Str");
}