#vulnerable code 
                                @Override
    public void onEvent(DisruptorData<ProcessData<E>> processDataDisruptorMessage, long l, boolean b) {
        try {
            BaseMessage message = processDataDisruptorMessage.getData().getData();
            if (null == message || message.getHeader() == null) {
                return;
            }
            messageCacheService.cacheRecievedMessageHash(message.getHash());
            //todo test
            if (message.getHeader().getModuleId() == ProtocolConstant.MODULE_ID_PROTOCOL && message.getHeader().getMsgType() == ProtocolConstant.MESSAGE_TYPE_NEW_BLOCK) {
                SmallBlockMessage smallBlockMessage = (SmallBlockMessage) message;
                Log.warn("rcv-msg:" + smallBlockMessage.getMsgBody().getHeader().getHash().toString());
            }

            boolean commonDigestTx = message.getHeader().getMsgType() == MessageBusConstant.MSG_TYPE_COMMON_MSG_HASH_MSG &&
                    message.getHeader().getModuleId() == MessageBusConstant.MODULE_ID_MESSAGE_BUS;

            if (!commonDigestTx) {
                return;
            }
            if (messageCacheService.kownTheMessage(((CommonDigestMessage) message).getMsgBody())) {
                Log.info("discard:{}," + ((CommonDigestMessage) message).getMsgBody(), processDataDisruptorMessage.getData().getNode().getId());
                processDataDisruptorMessage.setStoped(true);
            } else if (messageCacheService.kownTheMessage(message.getHash())) {
                Log.info("discard2:{}," + message.getClass(), processDataDisruptorMessage.getData().getNode().getId());
                processDataDisruptorMessage.setStoped(true);
            }
        } catch (Exception e) {
            Log.error(e);
        }
    } 
                            #location 12 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Override
    public void onEvent(DisruptorData<ProcessData<E>> processDataDisruptorMessage, long l, boolean b) {
        try {
            BaseMessage message = processDataDisruptorMessage.getData().getData();
            if (null == message || message.getHeader() == null) {
                return;
            }

            //todo test
            if (message.getHeader().getModuleId() == ProtocolConstant.MODULE_ID_PROTOCOL && message.getHeader().getMsgType() == ProtocolConstant.MESSAGE_TYPE_NEW_BLOCK) {
                SmallBlockMessage smallBlockMessage = (SmallBlockMessage) message;
                Log.warn("rcv-msg:" + smallBlockMessage.getMsgBody().getHeader().getHash().toString());
            }

            boolean commonDigestTx = message.getHeader().getMsgType() == MessageBusConstant.MSG_TYPE_COMMON_MSG_HASH_MSG &&
                    message.getHeader().getModuleId() == MessageBusConstant.MODULE_ID_MESSAGE_BUS;

            if (!commonDigestTx) {
                messageCacheService.cacheRecievedMessageHash(message.getHash());
                return;
            }
            if (messageCacheService.kownTheMessage(((CommonDigestMessage) message).getMsgBody())) {
                Log.info("discard:{}," + ((CommonDigestMessage) message).getMsgBody(), processDataDisruptorMessage.getData().getNode().getId());
                processDataDisruptorMessage.setStoped(true);
            } else if (messageCacheService.kownTheMessage(message.getHash())) {
                Log.info("discard2:{}," + message.getClass(), processDataDisruptorMessage.getData().getNode().getId());
                processDataDisruptorMessage.setStoped(true);
            } else {
                messageCacheService.cacheRecievedMessageHash(message.getHash());
            }
        } catch (Exception e) {
            Log.error(e);
        }
    }