#vulnerable code 
                                @Test
    public void testSync() throws Exception {
        //socket
        final RedisReplicator replicator = new RedisReplicator("127.0.0.1",
                6379,
                Configuration.defaultSetting()
                        .setAuthPassword("test")
                        .setRetries(0)
                        .setVerbose(true));
        replicator.addRdbListener(new RdbListener.Adaptor() {
            @Override
            public void handle(Replicator replicator, KeyValuePair<?> kv) {
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                logger.debug(kv);
            }
        });
        replicator.addCommandListener(new CommandListener() {
            @Override
            public void handle(Replicator replicator, Command command) {
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                logger.debug(command);
            }
        });
        replicator.open();
    } 
                            #location 32 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testSync() throws Exception {
//        //socket
//        final RedisReplicator replicator = new RedisReplicator("127.0.0.1",
//                6379,
//                Configuration.defaultSetting()
//                        .setAuthPassword("test")
//                        .setRetries(0)
//                        .setVerbose(true));
//        replicator.addRdbListener(new RdbListener.Adaptor() {
//            @Override
//            public void handle(Replicator replicator, KeyValuePair<?> kv) {
//                try {
//                    Thread.sleep(100);
//                } catch (InterruptedException e) {
//                    e.printStackTrace();
//                }
//                logger.debug(kv);
//            }
//        });
//        replicator.addCommandListener(new CommandListener() {
//            @Override
//            public void handle(Replicator replicator, Command command) {
//                try {
//                    Thread.sleep(100);
//                } catch (InterruptedException e) {
//                    e.printStackTrace();
//                }
//                logger.debug(command);
//            }
//        });
//        replicator.open();
    }