Program: 31580
Project: 31580
Buggy source:
private void vote(boolean startup) throws JournalNetworkException {
  ServerNode activeNode;
  if (startup) {
    try {
      if ((activeNode=getActiveNodeAndSetupClient()) != null) {
        LOGGER.info(thisNode() + "String_Node_Str",activeNode);
        setupClient(activeNode);
        return;
      }
    }
 catch (    JournalNetworkException ignore) {
      LOGGER.info("String_Node_Str",ignore.getMessage());
    }
    haltClient();
  }
  LOGGER.info(thisNode() + "String_Node_Str");
  server=new JournalServer(serverConfig,factory,null,thisNode().getId());
  for (int i=0, writersSize=writers.size(); i < writersSize; i++) {
    server.publish(writers.get(i));
  }
  server.start();
  boolean isClient=false;
  while (!isClient && server.isRunning() && (activeNode=getActiveNodeAndSetupClient()) != null && client != null) {
    LOGGER.info("String_Node_Str",thisNode(),activeNode);
switch (client.voteInstance(instance,activeNode)) {
case ALPHA:
      LOGGER.info(thisNode() + "String_Node_Str");
    setupClient(activeNode);
  return;
case THEM:
LOGGER.info("String_Node_Str",thisNode(),activeNode);
isClient=true;
break;
default :
LOGGER.info("String_Node_Str",thisNode(),activeNode);
}
haltClient();
Thread.yield();
}
if (!isClient) {
server.setIgnoreVoting(true);
LOGGER.info(thisNode() + "String_Node_Str");
listener.onNodeActive();
return;
}
while (true) {
activeNode=getActiveNodeAndSetupClient();
if (activeNode == null || client == null) {
throw new JournalNetworkException("String_Node_Str");
}
if (client.voteInstance(instance,activeNode) == JournalClient.VoteResult.ALPHA) {
setupClient(activeNode);
return;
}
haltClient();
}
}

Fixed version (ground truth):
private void vote(boolean startup) throws JournalNetworkException {
  ServerNode activeNode;
  if (startup) {
    try {
      if ((activeNode=getActiveNodeAndSetupClient()) != null) {
        LOGGER.info(thisNode() + "String_Node_Str",activeNode);
        setupClient(activeNode);
        return;
      }
    }
 catch (    JournalNetworkException ignore) {
      LOGGER.info("String_Node_Str",ignore.getMessage());
    }
    haltClient();
  }
  LOGGER.info(thisNode() + "String_Node_Str");
  server=new JournalServer(serverConfig,factory,null,thisNode().getId());
  for (int i=0, writersSize=writers.size(); i < writersSize; i++) {
    server.publish(writers.get(i));
  }
  server.start();
  boolean isClient=false;
  while (!isClient && server.isRunning() && (activeNode=getActiveNodeAndSetupClient()) != null && client != null) {
    LOGGER.info("String_Node_Str",thisNode(),activeNode);
switch (client.voteInstance(instance,activeNode)) {
case ALPHA:
      LOGGER.info(thisNode() + "String_Node_Str");
    server.halt();
  setupClient(activeNode);
return;
case THEM:
LOGGER.info("String_Node_Str",thisNode(),activeNode);
isClient=true;
server.halt();
break;
default :
LOGGER.info("String_Node_Str",thisNode(),activeNode);
}
haltClient();
Thread.yield();
}
if (!isClient) {
server.setIgnoreVoting(true);
LOGGER.info(thisNode() + "String_Node_Str");
listener.onNodeActive();
return;
}
while (true) {
activeNode=getActiveNodeAndSetupClient();
if (activeNode == null || client == null) {
throw new JournalNetworkException("String_Node_Str");
}
if (client.voteInstance(instance,activeNode) == JournalClient.VoteResult.ALPHA) {
setupClient(activeNode);
return;
}
haltClient();
}
}