Program: 50228
Project: 50228
Buggy source:
public ClusterManager(final Node node){
  super(node);
  WAIT_MILLIS_BEFORE_JOIN=node.groupProperties.WAIT_SECONDS_BEFORE_JOIN.getInteger() * 1000L;
  MAX_NO_HEARTBEAT_MILLIS=node.groupProperties.MAX_NO_HEARTBEAT_SECONDS.getInteger() * 1000L;
  node.clusterService.registerPeriodicRunnable(new SplitBrainHandler(node));
  node.clusterService.registerPeriodicRunnable(new Runnable(){
    public void run(){
      heartBeater();
    }
  }
);
  node.clusterService.registerPeriodicRunnable(new Runnable(){
    public void run(){
      checkScheduledActions();
    }
  }
);
  node.connectionManager.addConnectionListener(this);
  registerPacketProcessor(ClusterOperation.RESPONSE,new PacketProcessor(){
    public void process(    Packet packet){
      handleResponse(packet);
    }
  }
);
  registerPacketProcessor(ClusterOperation.HEARTBEAT,new PacketProcessor(){
    public void process(    Packet packet){
      releasePacket(packet);
    }
  }
);
  registerPacketProcessor(ClusterOperation.JOIN_CHECK,new PacketProcessor(){
    public void process(    Packet packet){
      Connection conn=packet.conn;
      Request request=Request.copy(packet);
      JoinInfo joinInfo=(JoinInfo)toObject(request.value);
      request.clearForResponse();
      if (joinInfo != null && node.joined() && node.isActive() && node.validateJoinRequest(joinInfo)) {
        request.response=toData(node.createJoinInfo());
      }
      returnResponse(request,conn);
      releasePacket(packet);
    }
  }
);
  registerPacketProcessor(ClusterOperation.REMOTELY_PROCESS_AND_RESPOND,new PacketProcessor(){
    public void process(    Packet packet){
      Data data=packet.getValueData();
      RemotelyProcessable rp=(RemotelyProcessable)toObject(data);
      rp.setConnection(packet.conn);
      rp.setNode(node);
      rp.process();
      sendResponse(packet);
    }
  }
);
  registerPacketProcessor(ClusterOperation.REMOTELY_PROCESS,new PacketProcessor(){
    public void process(    Packet packet){
      Data data=packet.getValueData();
      RemotelyProcessable rp=(RemotelyProcessable)toObject(data);
      rp.setConnection(packet.conn);
      rp.setNode(node);
      rp.process();
      releasePacket(packet);
    }
  }
);
  registerPacketProcessor(ClusterOperation.REMOTELY_CALLABLE_BOOLEAN,new PacketProcessor(){
    public void process(    Packet packet){
      Boolean result;
      AbstractRemotelyCallable<Boolean> callable=null;
      try {
        Data data=packet.getValueData();
        callable=(AbstractRemotelyCallable<Boolean>)toObject(data);
        callable.setConnection(packet.conn);
        callable.setNode(node);
        result=callable.call();
      }
 catch (      Exception e) {
        logger.log(Level.SEVERE,"String_Node_Str" + callable,e);
        result=Boolean.FALSE;
      }
      if (result == Boolean.TRUE) {
        sendResponse(packet);
      }
 else {
        sendResponseFailure(packet);
      }
    }
  }
);
  registerPacketProcessor(ClusterOperation.REMOTELY_CALLABLE_OBJECT,new PacketProcessor(){
    public void process(    Packet packet){
      Object result;
      AbstractRemotelyCallable<Boolean> callable=null;
      try {
        Data data=packet.getValueData();
        callable=(AbstractRemotelyCallable)toObject(data);
        callable.setConnection(packet.conn);
        callable.setNode(node);
        result=callable.call();
      }
 catch (      Exception e) {
        logger.log(Level.SEVERE,"String_Node_Str" + callable,e);
        result=null;
      }
      if (result != null) {
        Data value;
        if (result instanceof Data) {
          value=(Data)result;
        }
 else {
          value=toData(result);
        }
        packet.setValue(value);
      }
      sendResponse(packet);
    }
  }
);
}

Fixed version (ground truth):
public ClusterManager(final Node node){
  super(node);
  WAIT_MILLIS_BEFORE_JOIN=node.groupProperties.WAIT_SECONDS_BEFORE_JOIN.getInteger() * 1000L;
  MAX_NO_HEARTBEAT_MILLIS=node.groupProperties.MAX_NO_HEARTBEAT_SECONDS.getInteger() * 1000L;
  node.clusterService.registerPeriodicRunnable(new SplitBrainHandler(node));
  node.clusterService.registerPeriodicRunnable(new Runnable(){
    public void run(){
      heartBeater();
    }
  }
);
  node.clusterService.registerPeriodicRunnable(new Runnable(){
    public void run(){
      checkScheduledActions();
    }
  }
);
  node.connectionManager.addConnectionListener(this);
  registerPacketProcessor(ClusterOperation.RESPONSE,new PacketProcessor(){
    public void process(    Packet packet){
      handleResponse(packet);
    }
  }
);
  registerPacketProcessor(ClusterOperation.HEARTBEAT,new PacketProcessor(){
    public void process(    Packet packet){
      releasePacket(packet);
    }
  }
);
  registerPacketProcessor(ClusterOperation.LOG,new PacketProcessor(){
    public void process(    Packet packet){
      logger.log(Level.parse(packet.name),toObject(packet.getValueData()).toString());
      releasePacket(packet);
    }
  }
);
  registerPacketProcessor(ClusterOperation.JOIN_CHECK,new PacketProcessor(){
    public void process(    Packet packet){
      Connection conn=packet.conn;
      Request request=Request.copy(packet);
      JoinInfo joinInfo=(JoinInfo)toObject(request.value);
      request.clearForResponse();
      if (joinInfo != null && node.joined() && node.isActive() && node.validateJoinRequest(joinInfo)) {
        request.response=toData(node.createJoinInfo());
      }
      returnResponse(request,conn);
      releasePacket(packet);
    }
  }
);
  registerPacketProcessor(ClusterOperation.REMOTELY_PROCESS_AND_RESPOND,new PacketProcessor(){
    public void process(    Packet packet){
      Data data=packet.getValueData();
      RemotelyProcessable rp=(RemotelyProcessable)toObject(data);
      rp.setConnection(packet.conn);
      rp.setNode(node);
      rp.process();
      sendResponse(packet);
    }
  }
);
  registerPacketProcessor(ClusterOperation.REMOTELY_PROCESS,new PacketProcessor(){
    public void process(    Packet packet){
      Data data=packet.getValueData();
      RemotelyProcessable rp=(RemotelyProcessable)toObject(data);
      rp.setConnection(packet.conn);
      rp.setNode(node);
      rp.process();
      releasePacket(packet);
    }
  }
);
  registerPacketProcessor(ClusterOperation.REMOTELY_CALLABLE_BOOLEAN,new PacketProcessor(){
    public void process(    Packet packet){
      Boolean result;
      AbstractRemotelyCallable<Boolean> callable=null;
      try {
        Data data=packet.getValueData();
        callable=(AbstractRemotelyCallable<Boolean>)toObject(data);
        callable.setConnection(packet.conn);
        callable.setNode(node);
        result=callable.call();
      }
 catch (      Exception e) {
        logger.log(Level.SEVERE,"String_Node_Str" + callable,e);
        result=Boolean.FALSE;
      }
      if (result == Boolean.TRUE) {
        sendResponse(packet);
      }
 else {
        sendResponseFailure(packet);
      }
    }
  }
);
  registerPacketProcessor(ClusterOperation.REMOTELY_CALLABLE_OBJECT,new PacketProcessor(){
    public void process(    Packet packet){
      Object result;
      AbstractRemotelyCallable<Boolean> callable=null;
      try {
        Data data=packet.getValueData();
        callable=(AbstractRemotelyCallable)toObject(data);
        callable.setConnection(packet.conn);
        callable.setNode(node);
        result=callable.call();
      }
 catch (      Exception e) {
        logger.log(Level.SEVERE,"String_Node_Str" + callable,e);
        result=null;
      }
      if (result != null) {
        Data value;
        if (result instanceof Data) {
          value=(Data)result;
        }
 else {
          value=toData(result);
        }
        packet.setValue(value);
      }
      sendResponse(packet);
    }
  }
);
}