#vulnerable code 
                                public void run() {
        while (!finished.get()) {
            try {
                final Socket socket = serverSocket.accept();
                Runnable r = new Runnable() {
                    public void run() {
                        try {
                            MessagePack msgpack = new MessagePack();
                            msgpack.register(Event.class, MockEventTemplate.INSTANCE);
                            process.process(msgpack, socket);
                        } catch (IOException e) {
                            // ignore
                        }
                    }
                };
                new Thread(r).start();
            } catch (IOException e) {
                // ignore
            }
        }
    } 
                            #location 16 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public void run() {
        while (!finished.get()) {
            try {
                final Socket socket = serverSocket.accept();
                socket.setSoLinger(true, 0);
                clientSockets.add(socket);
                Runnable r = new Runnable() {
                    public void run() {
                        try {
                            MessagePack msgpack = new MessagePack();
                            msgpack.register(Event.class, MockEventTemplate.INSTANCE);
                            process.process(msgpack, socket);
                        } catch (IOException e) {
                            // ignore
                        }
                    }
                };
                new Thread(r).start();
            } catch (IOException e) {
                // ignore
            }
        }
    }