#vulnerable code 
                                @Override
    public NetworkEventResult process(BaseEvent networkEvent, Node node) {
        NodeEvent event = (NodeEvent) networkEvent;

//        String key = event.getHeader().getEventType() + "-" + node.getIp();
//        if (cacheService.existEvent(key)) {
//            networkService.removeNode(node.getId());
//            return null;
//        }
//        cacheService.putEvent(key, event, false);

        for (Node newNode : event.getEventBody().getNodes()) {
            newNode.setType(Node.OUT);
            newNode.setStatus(Node.WAIT);
            getNetworkService().addNodeToGroup(NetworkConstant.NETWORK_NODE_OUT_GROUP, newNode);
        }
        return null;
    } 
                            #location 15 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Override
    public NetworkEventResult process(BaseEvent networkEvent, Node node) {
        NodeEvent event = (NodeEvent) networkEvent;

        Map<String, Node> outNodes = networkService.getNodeGroup(NetworkConstant.NETWORK_NODE_OUT_GROUP).getNodes();
        boolean exist = false;
        for (Node newNode : event.getEventBody().getNodes()) {
            exist = false;
            for (Node outNode : outNodes.values()) {
                if (outNode.getIp().equals(node.getIp())) {
                    exist = true;
                    break;
                }
            }
            if (!exist) {
                newNode.setType(Node.OUT);
                newNode.setStatus(Node.WAIT);
                getNetworkService().addNodeToGroup(NetworkConstant.NETWORK_NODE_OUT_GROUP, newNode);
            }
        }
        return null;
    }