#vulnerable code 
                                public void testTinkerGraph() {
        TinkerGraph g = new TinkerGraph();
        g.createIndex("name", Vertex.class);
        Vertex marko = g.addVertex(TinkerProperty.make("name", "marko", "age", 33));
        Vertex stephen = g.addVertex(TinkerProperty.make("name", "stephen", "id", 12));
        marko.addEdge("knows", stephen);
        System.out.println(g.query().has("name", Compare.EQUAL, "marko").vertices());
        System.out.println(marko.query().direction(Direction.OUT).labels("knows", "workedWith").vertices());
    } 
                            #location 9 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public void testTinkerGraph() {
        TinkerGraph g = new TinkerGraph();
        g.createIndex("name", Vertex.class);
        Vertex marko = g.addVertex(TinkerProperty.make("name", "marko", "age", 33, "blah", "bloop"));
        Vertex stephen = g.addVertex(TinkerProperty.make("name", "stephen", "id", 12, "blah", "bloop"));
        Random r = new Random();
        Stream.generate(()->g.addVertex(TinkerProperty.make("blah",r.nextInt()))).limit(100000).count();
        assertEquals(g.vertices.size(), 100002);
        marko.addEdge("knows", stephen);
        System.out.println(g.query().has("name", Compare.EQUAL, "marko").vertices());
        System.out.println(marko.query().direction(Direction.OUT).labels("knows", "workedWith").vertices());
        g.createIndex("blah", Vertex.class);
    }