Program: 50612
Project: 50612
Buggy source:
public final void heartBeater(){
  if (!Node.get().joined())   return;
  long now=System.currentTimeMillis();
  if (isMaster()) {
    List<Address> lsDeadAddresses=null;
    for (    MemberImpl memberImpl : lsMembers) {
      final Address address=memberImpl.getAddress();
      if (!thisAddress.equals(address)) {
        try {
          Connection conn=ConnectionManager.get().getConnection(address);
          if (conn != null && conn.live()) {
            if ((now - memberImpl.getLastRead()) >= 10000) {
              conn=null;
              if (lsDeadAddresses == null) {
                lsDeadAddresses=new ArrayList<Address>();
              }
              lsDeadAddresses.add(address);
            }
          }
          if (conn != null && conn.live()) {
            if ((now - memberImpl.getLastWrite()) > 500) {
              Packet packet=obtainPacket("String_Node_Str",null,null,ClusterOperation.HEARTBEAT,0);
              sendOrReleasePacket(packet,conn);
            }
          }
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
    if (lsDeadAddresses != null) {
      for (      Address address : lsDeadAddresses) {
        logger.log(Level.FINEST,"String_Node_Str" + address);
        doRemoveAddress(address);
        sendRemoveMemberToOthers(address);
      }
    }
  }
 else {
    if (getMasterAddress() != null) {
      MemberImpl masterMember=getMember(getMasterAddress());
      boolean removed=false;
      if (masterMember != null) {
        if ((now - masterMember.getLastRead()) >= 10000) {
          doRemoveAddress(getMasterAddress());
          removed=true;
        }
      }
      if (!removed) {
        Packet packet=obtainPacket("String_Node_Str",null,null,ClusterOperation.HEARTBEAT,0);
        Connection connMaster=ConnectionManager.get().getOrConnect(getMasterAddress());
        sendOrReleasePacket(packet,connMaster);
      }
    }
    for (    MemberImpl member : lsMembers) {
      if (!member.localMember()) {
        Address address=member.getAddress();
        if (shouldConnectTo(address)) {
          Connection conn=ConnectionManager.get().getOrConnect(address);
          if (conn != null) {
            Packet packet=obtainPacket("String_Node_Str",null,null,ClusterOperation.HEARTBEAT,0);
            sendOrReleasePacket(packet,conn);
          }
        }
 else {
          Connection conn=ConnectionManager.get().getConnection(address);
          if (conn != null && conn.live()) {
            if ((now - member.getLastWrite()) > 1000) {
              Packet packet=obtainPacket("String_Node_Str",null,null,ClusterOperation.HEARTBEAT,0);
              sendOrReleasePacket(packet,conn);
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public final void heartBeater(){
  if (!Node.get().joined())   return;
  long now=System.currentTimeMillis();
  if (isMaster()) {
    List<Address> lsDeadAddresses=null;
    for (    MemberImpl memberImpl : lsMembers) {
      final Address address=memberImpl.getAddress();
      if (!thisAddress.equals(address)) {
        try {
          Connection conn=ConnectionManager.get().getConnection(address);
          if (conn != null && conn.live()) {
            if ((now - memberImpl.getLastRead()) >= (MAX_NO_HEARTBEAT_SECONDS * 1000L)) {
              conn=null;
              if (lsDeadAddresses == null) {
                lsDeadAddresses=new ArrayList<Address>();
              }
              lsDeadAddresses.add(address);
            }
          }
          if (conn != null && conn.live()) {
            if ((now - memberImpl.getLastWrite()) > 500) {
              Packet packet=obtainPacket("String_Node_Str",null,null,ClusterOperation.HEARTBEAT,0);
              sendOrReleasePacket(packet,conn);
            }
          }
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
    if (lsDeadAddresses != null) {
      for (      Address address : lsDeadAddresses) {
        logger.log(Level.FINEST,"String_Node_Str" + address);
        doRemoveAddress(address);
        sendRemoveMemberToOthers(address);
      }
    }
  }
 else {
    if (getMasterAddress() != null) {
      MemberImpl masterMember=getMember(getMasterAddress());
      boolean removed=false;
      if (masterMember != null) {
        if ((now - masterMember.getLastRead()) >= (MAX_NO_HEARTBEAT_SECONDS * 1000L)) {
          doRemoveAddress(getMasterAddress());
          removed=true;
        }
      }
      if (!removed) {
        Packet packet=obtainPacket("String_Node_Str",null,null,ClusterOperation.HEARTBEAT,0);
        Connection connMaster=ConnectionManager.get().getOrConnect(getMasterAddress());
        sendOrReleasePacket(packet,connMaster);
      }
    }
    for (    MemberImpl member : lsMembers) {
      if (!member.localMember()) {
        Address address=member.getAddress();
        if (shouldConnectTo(address)) {
          Connection conn=ConnectionManager.get().getOrConnect(address);
          if (conn != null) {
            Packet packet=obtainPacket("String_Node_Str",null,null,ClusterOperation.HEARTBEAT,0);
            sendOrReleasePacket(packet,conn);
          }
        }
 else {
          Connection conn=ConnectionManager.get().getConnection(address);
          if (conn != null && conn.live()) {
            if ((now - member.getLastWrite()) > 1000) {
              Packet packet=obtainPacket("String_Node_Str",null,null,ClusterOperation.HEARTBEAT,0);
              sendOrReleasePacket(packet,conn);
            }
          }
        }
      }
    }
  }
}