Program: 172297
Project: 172297
Buggy source:
/** 
 * Run the Win32 Netbios() API listen code
 * @exception Exception If an unhandled error occurs
 */
private final void runNetBIOS() throws Exception {
  if (logger.isDebugEnabled() && hasDebug())   logger.debug("String_Node_Str");
  byte[] callerNameBuf=new byte[NetBIOS.NCBNameSize];
  String callerName=null;
  callerNameBuf[0]='\0';
  callerName=null;
  int lsn=Win32NetBIOS.Listen(m_lana,m_nbName.getNetBIOSName(),m_acceptClient,callerNameBuf);
  if (hasShutdown())   return;
  if (callerNameBuf[0] != '\0')   callerName=new String(callerNameBuf).trim();
 else   callerName="String_Node_Str";
  if (lsn >= 0) {
    try {
      if (logger.isDebugEnabled() && hasDebug())       logger.debug("String_Node_Str" + lsn + "String_Node_Str"+ callerName+ "String_Node_Str");
      PacketHandler pktHandler=new Win32NetBIOSPacketHandler(m_lana,lsn,callerName);
      SMBSrvSession srvSess=new SMBSrvSession(pktHandler,getServer());
      srvSess.setSessionId(getNextSessionId());
      srvSess.setUniqueId(pktHandler.getShortName() + srvSess.getSessionId());
      srvSess.setDebugPrefix("String_Node_Str" + pktHandler.getShortName() + srvSess.getSessionId()+ "String_Node_Str");
      getServer().addSession(srvSess);
      Thread srvThread=new Thread(THREAD_GROUP_SESSION,srvSess);
      srvThread.setDaemon(true);
      srvThread.setName("String_Node_Str" + srvSess.getSessionId() + "String_Node_Str"+ lsn);
      srvThread.start();
    }
 catch (    Exception ex) {
      if (logger.isDebugEnabled() && hasDebug())       logger.debug("String_Node_Str" + ex.toString());
    }
  }
 else {
    int sts=-lsn;
    if (sts == NetBIOS.NRC_Bridge) {
      m_lanaValid=false;
      if (logger.isDebugEnabled() && hasDebug())       logger.debug("String_Node_Str" + getLANANumber());
    }
 else     if (logger.isDebugEnabled() && hasDebug())     logger.debug("String_Node_Str" + Integer.toHexString(-lsn) + "String_Node_Str"+ NetBIOS.getErrorString(-lsn));
  }
}

Fixed version (ground truth):
/** 
 * Run the Win32 Netbios() API listen code
 * @exception Exception If an unhandled error occurs
 */
private final void runNetBIOS() throws Exception {
  if (logger.isDebugEnabled() && hasDebug())   logger.debug("String_Node_Str");
  byte[] callerNameBuf=new byte[NetBIOS.NCBNameSize];
  String callerName=null;
  callerNameBuf[0]='\0';
  callerName=null;
  int lsn=Win32NetBIOS.Listen(m_lana,m_nbName.getNetBIOSName(),m_acceptClient,callerNameBuf);
  if (hasShutdown())   return;
  if (callerNameBuf[0] != '\0')   callerName=new String(callerNameBuf).trim();
 else   callerName="String_Node_Str";
  if (lsn >= 0) {
    try {
      if (logger.isDebugEnabled() && hasDebug())       logger.debug("String_Node_Str" + lsn + "String_Node_Str"+ callerName+ "String_Node_Str");
      PacketHandler pktHandler=new Win32NetBIOSPacketHandler(m_lana,lsn,callerName);
      SMBSrvSession srvSess=new SMBSrvSession(pktHandler,getServer());
      srvSess.setSessionId(getNextSessionId());
      srvSess.setUniqueId(pktHandler.getShortName() + srvSess.getSessionId());
      getServer().addSession(srvSess);
      Thread srvThread=new Thread(THREAD_GROUP_SESSION,srvSess);
      srvThread.setDaemon(true);
      srvThread.setName("String_Node_Str" + srvSess.getSessionId() + "String_Node_Str"+ lsn);
      srvThread.start();
    }
 catch (    Exception ex) {
      if (logger.isDebugEnabled() && hasDebug())       logger.debug("String_Node_Str" + ex.toString());
    }
  }
 else {
    int sts=-lsn;
    if (sts == NetBIOS.NRC_Bridge) {
      m_lanaValid=false;
      if (logger.isDebugEnabled() && hasDebug())       logger.debug("String_Node_Str" + getLANANumber());
    }
 else     if (logger.isDebugEnabled() && hasDebug())     logger.debug("String_Node_Str" + Integer.toHexString(-lsn) + "String_Node_Str"+ NetBIOS.getErrorString(-lsn));
  }
}