#fixed code
                                private static void listen(boolean taq, Config config) throws IOException {
        Instruments instruments = Instruments.fromConfig(config, "instruments");

        MarketDataListener listener = taq ? new TAQFormat(instruments) : new DisplayFormat(instruments);

        Market market = new Market(listener);

        for (Instrument instrument : instruments)
            market.open(instrument.asLong());

        MarketDataProcessor processor = new MarketDataProcessor(market, listener);

        listen(config, new PMDParser(processor));
    }
#vulnerable code 
                                private static void listen(boolean taq, Config config) throws IOException {
        List<String> instruments = config.getStringList("instruments");

        MarketDataListener listener = taq ? new TAQFormat() : new DisplayFormat(instruments);

        Market market = new Market(listener);

        for (String instrument : instruments)
            market.open(ASCII.packLong(instrument));

        MarketDataProcessor processor = new MarketDataProcessor(market, listener);

        listen(config, new PMDParser(processor));
    } 
                            #location 13 
                            #vulnerability type RESOURCE_LEAK