#vulnerable code 
                                @Test
    public void testCreateEdgeBetweenVerticesPropertiesEagerlyLoadedOnHasHas() {
        Vertex person1 = this.sqlgGraph.addVertex(T.label, "Person", "name", "john");
        Vertex person2 = this.sqlgGraph.addVertex(T.label, "Person", "name", "peter");
        this.sqlgGraph.tx().commit();
        person1 = this.sqlgGraph.v(person1.id());
        person2 = this.sqlgGraph.v(person2.id());
        person1.addEdge("friend", person2);
        Assert.assertEquals("john", person1.value("name"));
        Assert.assertEquals("peter", person2.value("name"));
        this.sqlgGraph.tx().commit();
        List<Vertex> vertices = this.sqlgGraph.traversal().V().<Vertex>has(T.label, "Person").<Vertex>has("name", "john").toList();
        Assert.assertEquals(1, vertexTraversal(vertices.get(0)).out("friend").count().next().intValue());
        Assert.assertEquals(1, vertices.size());
        vertices = this.sqlgGraph.traversal().V().<Vertex>has(T.label, "Person").<Vertex>has("name", "peter").toList();
        Assert.assertEquals(1, vertexTraversal(vertices.get(0)).in("friend").count().next().intValue());
        Assert.assertEquals(1, vertices.size());
    } 
                            #location 8 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test
    public void testCreateEdgeBetweenVerticesPropertiesEagerlyLoadedOnHasHas() {
        Vertex person1 = this.sqlgGraph.addVertex(T.label, "Person", "name", "john");
        Vertex person2 = this.sqlgGraph.addVertex(T.label, "Person", "name", "peter");
        this.sqlgGraph.tx().commit();
        person1 = this.sqlgGraph.traversal().V(person1.id()).next();
        person2 = this.sqlgGraph.traversal().V(person2.id()).next();
        person1.addEdge("friend", person2);
        Assert.assertEquals("john", person1.value("name"));
        Assert.assertEquals("peter", person2.value("name"));
        this.sqlgGraph.tx().commit();
        List<Vertex> vertices = this.sqlgGraph.traversal().V().<Vertex>has(T.label, "Person").<Vertex>has("name", "john").toList();
        Assert.assertEquals(1, vertexTraversal(vertices.get(0)).out("friend").count().next().intValue());
        Assert.assertEquals(1, vertices.size());
        vertices = this.sqlgGraph.traversal().V().<Vertex>has(T.label, "Person").<Vertex>has("name", "peter").toList();
        Assert.assertEquals(1, vertexTraversal(vertices.get(0)).in("friend").count().next().intValue());
        Assert.assertEquals(1, vertices.size());
    }