Program: 62627
Project: 62627
Buggy source:
/** 
 * Send broadcast message over all active interfaces
 * @param discoverString String to be used for the discovery
 */
private void sendDiscoveryMessage(String discoverString){
  DatagramSocket bcSend=null;
  try {
    bcSend=new DatagramSocket();
    bcSend.setBroadcast(true);
    byte[] sendData=discoverString.getBytes();
    Enumeration<NetworkInterface> interfaces=NetworkInterface.getNetworkInterfaces();
    while (interfaces.hasMoreElements()) {
      NetworkInterface networkInterface=interfaces.nextElement();
      if (networkInterface.isLoopback() || !networkInterface.isUp()) {
        continue;
      }
      for (      InterfaceAddress interfaceAddress : networkInterface.getInterfaceAddresses()) {
        InetAddress[] broadcast=new InetAddress[3];
        broadcast[0]=InetAddress.getByName("String_Node_Str");
        broadcast[1]=InetAddress.getByName("String_Node_Str");
        broadcast[2]=interfaceAddress.getBroadcast();
        for (        InetAddress bc : broadcast) {
          if (bc != null) {
            try {
              DatagramPacket sendPacket=new DatagramPacket(sendData,sendData.length,bc,23272);
              bcSend.send(sendPacket);
            }
 catch (            IOException e) {
              logger.debug("String_Node_Str",e.getMessage());
            }
catch (            Exception e) {
              logger.info(e.getMessage(),e);
            }
            logger.trace("String_Node_Str",bc.getHostAddress(),networkInterface.getDisplayName());
          }
        }
      }
    }
    logger.trace("String_Node_Str");
  }
 catch (  IOException e) {
    logger.debug("String_Node_Str",e.getMessage());
  }
 finally {
    try {
      if (bcSend != null)       bcSend.close();
    }
 catch (    Exception e) {
    }
  }
}

Fixed version (ground truth):
/** 
 * Send broadcast message over all active interfaces
 * @param discoverString String to be used for the discovery
 */
private void sendDiscoveryMessage(String discoverString){
  DatagramSocket bcSend=null;
  try {
    bcSend=new DatagramSocket();
    bcSend.setBroadcast(true);
    byte[] sendData=discoverString.getBytes();
    Enumeration<NetworkInterface> interfaces=NetworkInterface.getNetworkInterfaces();
    while (interfaces.hasMoreElements()) {
      NetworkInterface networkInterface=interfaces.nextElement();
      if (networkInterface.isLoopback() || !networkInterface.isUp()) {
        continue;
      }
      for (      InterfaceAddress interfaceAddress : networkInterface.getInterfaceAddresses()) {
        InetAddress[] broadcast=new InetAddress[3];
        broadcast[0]=InetAddress.getByName("String_Node_Str");
        broadcast[1]=InetAddress.getByName("String_Node_Str");
        broadcast[2]=interfaceAddress.getBroadcast();
        for (        InetAddress bc : broadcast) {
          if (bc != null) {
            try {
              DatagramPacket sendPacket=new DatagramPacket(sendData,sendData.length,bc,23272);
              bcSend.send(sendPacket);
            }
 catch (            IOException e) {
              logger.debug("String_Node_Str",e.getMessage());
            }
catch (            Exception e) {
              logger.info(e.getMessage(),e);
            }
            logger.trace("String_Node_Str",bc.getHostAddress(),networkInterface.getDisplayName());
          }
        }
      }
    }
    logger.trace("String_Node_Str");
  }
 catch (  IOException e) {
    logger.debug("String_Node_Str",e.getMessage());
  }
 finally {
    try {
      if (bcSend != null) {
        bcSend.close();
      }
    }
 catch (    Exception e) {
    }
  }
}