Program: 93729
Project: 93729
Buggy source:
private void internalHandleRegister(SockJSSocket sock,String address,Map<String,MessageConsumer> registrations){
  if (address.length() > maxAddressLength) {
    log.warn("String_Node_Str");
    replyError(sock,"String_Node_Str");
    return;
  }
  final SockInfo info=sockInfos.get(sock);
  if (!checkMaxHandlers(sock,info)) {
    return;
  }
  if (handlePreRegister(sock,address)) {
    final boolean debug=log.isDebugEnabled();
    Match match=checkMatches(false,address,null);
    if (match.doesMatch) {
      Handler<Message<Object>> handler=msg -> {
        Match curMatch=checkMatches(false,address,msg.body());
        if (curMatch.doesMatch) {
          if (curMatch.requiredPermission != null || curMatch.requiredRole != null) {
            authorise(curMatch,sock.apexSession(),res -> {
              if (res.succeeded()) {
                if (res.result()) {
                  checkAddAccceptedReplyAddress(msg.replyAddress());
                  deliverMessage(sock,address,msg);
                }
 else {
                  if (debug) {
                    log.debug("String_Node_Str" + address + "String_Node_Str");
                  }
                }
              }
 else {
                log.error(res.cause());
              }
            }
);
          }
 else {
            checkAddAccceptedReplyAddress(msg.replyAddress());
            deliverMessage(sock,address,msg);
          }
        }
 else {
          if (debug) {
            log.debug("String_Node_Str" + address + "String_Node_Str");
          }
        }
      }
;
      MessageConsumer reg=eb.consumer(address).handler(handler);
      registrations.put(address,reg);
      handlePostRegister(sock,address);
      info.handlerCount++;
    }
 else {
      if (debug) {
        log.debug("String_Node_Str" + address + "String_Node_Str");
      }
      replyError(sock,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void internalHandleRegister(SockJSSocket sock,String address,Map<String,MessageConsumer> registrations){
  if (address.length() > maxAddressLength) {
    log.warn("String_Node_Str");
    replyError(sock,"String_Node_Str");
    return;
  }
  final SockInfo info=sockInfos.get(sock);
  if (!checkMaxHandlers(sock,info)) {
    return;
  }
  if (handlePreRegister(sock,address)) {
    final boolean debug=log.isDebugEnabled();
    Match match=checkMatches(false,address,null);
    if (match.doesMatch) {
      Handler<Message<Object>> handler=msg -> {
        Match curMatch=checkMatches(false,address,msg.body());
        if (curMatch.doesMatch) {
          if (curMatch.requiredPermission != null || curMatch.requiredRole != null) {
            authorise(curMatch,sock.apexSession(),res -> {
              if (res.succeeded()) {
                if (res.result()) {
                  checkAddAccceptedReplyAddress(msg);
                  deliverMessage(sock,address,msg);
                }
 else {
                  if (debug) {
                    log.debug("String_Node_Str" + address + "String_Node_Str");
                  }
                }
              }
 else {
                log.error(res.cause());
              }
            }
);
          }
 else {
            checkAddAccceptedReplyAddress(msg);
            deliverMessage(sock,address,msg);
          }
        }
 else {
          if (debug) {
            log.debug("String_Node_Str" + address + "String_Node_Str");
          }
        }
      }
;
      MessageConsumer reg=eb.consumer(address).handler(handler);
      registrations.put(address,reg);
      handlePostRegister(sock,address);
      info.handlerCount++;
    }
 else {
      if (debug) {
        log.debug("String_Node_Str" + address + "String_Node_Str");
      }
      replyError(sock,"String_Node_Str");
    }
  }
}