#fixed code
                                public void add(long instrument, long orderId, Side side, long price, long size) {
        if (orders.containsKey(orderId))
            return;

        OrderBook book = books.get(instrument);
        if (book == null)
            return;

        Order order = new Order(book, side, price, size);

        book.add(side, price, size);

        orders.put(orderId, order);

        if (order.isOnBestLevel())
            book.bbo(listener);
    }
#vulnerable code 
                                public void add(long instrument, long orderId, Side side, long price, long size) {
        if (orders.containsKey(orderId))
            return;

        OrderBook book = books.get(instrument);
        if (book == null)
            return;

        Order order = book.add(side, price, size);
        orders.put(orderId, order);

        if (order.isOnBestLevel())
            book.bbo(listener);
    } 
                            #location 12 
                            #vulnerability type NULL_DEREFERENCE