#vulnerable code 
                                public ZMQ.Event make(SendEvent sender, int eventFilter)
    {
        Ctx ctx = new Ctx();
        @SuppressWarnings("deprecation")
        SocketBase s = ctx.createSocket(ZMQ.PUB);
        @SuppressWarnings("deprecation")
        SocketBase m = ctx.createSocket(ZMQ.PAIR);
        m.connect("inproc://TestEventResolution");
        s.monitor("inproc://TestEventResolution", eventFilter);
        sender.send(s, "tcp://127.0.0.1:8000");
        zmq.ZMQ.Event ev = zmq.ZMQ.Event.read(m);
        return new ZMQ.Event(ev.event, ev.arg, ev.addr);
    } 
                            #location 7 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public ZMQ.Event make(SendEvent sender, int eventFilter)
    {
        try (ZMQ.Context zctx = new ZMQ.Context(1);
            ZMQ.Socket s = zctx.socket(SocketType.PUB);
            ZMQ.Socket m = zctx.socket(SocketType.PAIR)) {
            s.monitor("inproc://TestEventResolution", eventFilter);
            m.connect("inproc://TestEventResolution");
            sender.send(s.base(), "tcp://127.0.0.1:8000");
            return ZMQ.Event.recv(m);
        }
    }