Program: 93732
Project: 93732
Buggy source:
private void doSendOrPub(boolean send,SockJSSocket sock,String address,JsonObject message){
  final Object body=message.getValue("String_Node_Str");
  final String replyAddress=message.getString("String_Node_Str");
  if (replyAddress != null && replyAddress.length() > 36) {
    log.error("String_Node_Str");
    replyError(sock,"String_Node_Str");
    return;
  }
  final boolean debug=log.isDebugEnabled();
  if (debug) {
    log.debug("String_Node_Str" + address + "String_Node_Str"+ body);
  }
  Match curMatch=checkMatches(true,address,body);
  if (curMatch.doesMatch) {
    if (curMatch.requiredPermission != null || curMatch.requiredRole != null) {
      Session apexSession=sock.apexSession();
      if (apexSession != null) {
        if (!apexSession.isLoggedIn()) {
          replyError(sock,"String_Node_Str");
        }
 else {
          authorise(curMatch,apexSession,res -> {
            if (res.succeeded()) {
              if (res.result()) {
                checkAndSend(send,address,body,sock,replyAddress);
              }
 else {
                replyError(sock,"String_Node_Str");
                if (debug) {
                  log.debug("String_Node_Str" + address + "String_Node_Str");
                }
              }
            }
 else {
              replyError(sock,"String_Node_Str");
              log.error("String_Node_Str",res.cause());
            }
          }
);
        }
      }
 else {
        replyError(sock,"String_Node_Str");
        if (debug) {
          log.debug("String_Node_Str" + address + "String_Node_Str");
        }
      }
    }
 else {
      checkAndSend(send,address,body,sock,replyAddress);
    }
  }
 else {
    replyError(sock,"String_Node_Str");
    if (debug) {
      log.debug("String_Node_Str" + address + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void doSendOrPub(boolean send,SockJSSocket sock,String address,JsonObject message){
  final Object body=message.getValue("String_Node_Str");
  final String replyAddress=message.getString("String_Node_Str");
  if (replyAddress != null && replyAddress.length() > 36) {
    log.error("String_Node_Str");
    replyError(sock,"String_Node_Str");
    return;
  }
  final boolean debug=log.isDebugEnabled();
  if (debug) {
    log.debug("String_Node_Str" + address + "String_Node_Str"+ body);
  }
  final Message awaitingReply=messagesAwaitingReply.remove(address);
  Match curMatch;
  if (awaitingReply != null) {
    curMatch=new Match(true);
  }
 else {
    curMatch=checkMatches(true,address,body);
  }
  if (curMatch.doesMatch) {
    if (curMatch.requiredPermission != null || curMatch.requiredRole != null) {
      Session apexSession=sock.apexSession();
      if (apexSession != null) {
        if (!apexSession.isLoggedIn()) {
          replyError(sock,"String_Node_Str");
        }
 else {
          authorise(curMatch,apexSession,res -> {
            if (res.succeeded()) {
              if (res.result()) {
                checkAndSend(send,address,body,sock,replyAddress,null);
              }
 else {
                replyError(sock,"String_Node_Str");
                if (debug) {
                  log.debug("String_Node_Str" + address + "String_Node_Str");
                }
              }
            }
 else {
              replyError(sock,"String_Node_Str");
              log.error("String_Node_Str",res.cause());
            }
          }
);
        }
      }
 else {
        replyError(sock,"String_Node_Str");
        if (debug) {
          log.debug("String_Node_Str" + address + "String_Node_Str");
        }
      }
    }
 else {
      checkAndSend(send,address,body,sock,replyAddress,awaitingReply);
    }
  }
 else {
    replyError(sock,"String_Node_Str");
    if (debug) {
      log.debug("String_Node_Str" + address + "String_Node_Str");
    }
  }
}