#vulnerable code 
                                public void getGitChangeSets() throws IOException, GitAPIException {
        Repository localRepository = new FileRepository(new File("./repo/server/.git"));

        Git git = new Git(localRepository);
        Iterable<RevCommit> logs = git.log().call();

        List<String> revisions = new ArrayList<>();
        for(RevCommit rev: logs) {
            System.out.println(rev.getCommitTime() + " " + rev.getName());
            revisions.add(rev.getName());
        }
        revisions = Lists.reverse(revisions);

        // TODO currently this is ignoring the very first commit changes need to include those
        for (int i = 1; i < revisions.size(); i++) {
            System.out.println("///////////////////////////////////////////////");
            this.getRevisionChanges(revisions.get(i - 1), revisions.get(i));
        }

    } 
                            #location 5 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public void getGitChangeSets() throws IOException, GitAPIException {
        Repository localRepository = new FileRepository(new File("./repo/server/.git"));

        Git git = new Git(localRepository);
        Iterable<RevCommit> logs = git.log().call();

        List<String> revisions = new ArrayList<>();
        for(RevCommit rev: logs) {
            System.out.println(rev.getCommitTime() + " " + rev.getName());
            revisions.add(rev.getName());
        }
        revisions = Lists.reverse(revisions);

        // TODO currently this is ignoring the very first commit changes need to include those
        for (int i = 1; i < revisions.size(); i++) {
            System.out.println("///////////////////////////////////////////////");
            this.getRevisionChanges(localRepository, git, revisions.get(i - 1), revisions.get(i));
        }

    }