#vulnerable code 
                                @Test
    public void testCloseListener1() throws IOException, InterruptedException {
        final AtomicInteger acc = new AtomicInteger(0);
        Replicator replicator = new RedisReplicator(
                RedisSocketReplicatorTest.class.getClassLoader().getResourceAsStream("dumpV6.rdb"),
                Configuration.defaultSetting());
        replicator.addCloseListener(new CloseListener() {
            @Override
            public void handle(Replicator replicator) {
                System.out.println("close testCloseListener1");
                acc.incrementAndGet();
                assertEquals(1, acc.get());
            }
        });
        replicator.open();
    } 
                            #location 15 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testCloseListener1() throws IOException, InterruptedException {
        final AtomicInteger acc = new AtomicInteger(0);
        Replicator replicator = new RedisReplicator(
                RedisSocketReplicatorTest.class.getClassLoader().getResourceAsStream("dumpV6.rdb"), FileType.RDB,
                Configuration.defaultSetting());
        replicator.addCloseListener(new CloseListener() {
            @Override
            public void handle(Replicator replicator) {
                System.out.println("close testCloseListener1");
                acc.incrementAndGet();
                assertEquals(1, acc.get());
            }
        });
        replicator.open();
    }