Program: 166964
Project: 166964
Buggy source:
@Test public void testAddSchemaAndVertexAndEdge(){
  TopologyListenerTest topologyListenerTest=new TopologyListenerTest(topologyListenerTriple);
  this.sqlgGraph.getTopology().registerListener(topologyListenerTest);
  Vertex a1=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Vertex a2=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Edge e1=a1.addEdge("String_Node_Str",a2);
  a1.property("String_Node_Str","String_Node_Str");
  e1.property("String_Node_Str","String_Node_Str");
  Vertex b1=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Edge e2=a1.addEdge("String_Node_Str",b1);
  Schema schema=this.sqlgGraph.getTopology().getSchema("String_Node_Str").get();
  VertexLabel aVertexLabel=schema.getVertexLabel("String_Node_Str").get();
  EdgeLabel edgeLabel=aVertexLabel.getOutEdgeLabel("String_Node_Str").get();
  PropertyColumn vertexPropertyColumn=aVertexLabel.getProperty("String_Node_Str").get();
  PropertyColumn edgePropertyColumn=edgeLabel.getProperty("String_Node_Str").get();
  VertexLabel bVertexLabel=schema.getVertexLabel("String_Node_Str").get();
  Index index=aVertexLabel.ensureIndexExists(IndexType.UNIQUE,new ArrayList<>(aVertexLabel.getProperties().values()));
  GlobalUniqueIndex globalUniqueIndex=schema.ensureGlobalUniqueIndexExist(new HashSet<>(aVertexLabel.getProperties().values()));
  assertEquals(12,this.topologyListenerTriple.size());
  assertEquals(schema,this.topologyListenerTriple.get(0).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(0).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(0).getRight());
  assertEquals(aVertexLabel,this.topologyListenerTriple.get(1).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(1).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(1).getRight());
  assertEquals(edgeLabel,this.topologyListenerTriple.get(2).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(2).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(2).getRight());
  assertEquals(vertexPropertyColumn,this.topologyListenerTriple.get(3).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(3).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(3).getRight());
  assertEquals(edgePropertyColumn,this.topologyListenerTriple.get(4).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(4).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(4).getRight());
  assertEquals(bVertexLabel,this.topologyListenerTriple.get(5).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(5).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(5).getRight());
  assertEquals(edgeLabel,this.topologyListenerTriple.get(6).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(6).getMiddle());
  assertEquals(TopologyChangeAction.ADD_IN_VERTEX_LABELTO_EDGE,this.topologyListenerTriple.get(6).getRight());
  assertEquals(index,this.topologyListenerTriple.get(7).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(7).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(7).getRight());
  assertEquals(globalUniqueIndex,this.topologyListenerTriple.get(11).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(11).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(11).getRight());
  this.sqlgGraph.tx().commit();
}

Fixed version (ground truth):
@Test public void testAddSchemaAndVertexAndEdge(){
  TopologyListenerTest topologyListenerTest=new TopologyListenerTest(topologyListenerTriple);
  this.sqlgGraph.getTopology().registerListener(topologyListenerTest);
  Vertex a1=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Vertex a2=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Edge e1=a1.addEdge("String_Node_Str",a2);
  a1.property("String_Node_Str","String_Node_Str");
  e1.property("String_Node_Str","String_Node_Str");
  Vertex b1=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Edge e2=a1.addEdge("String_Node_Str",b1);
  Schema schema=this.sqlgGraph.getTopology().getSchema("String_Node_Str").get();
  VertexLabel aVertexLabel=schema.getVertexLabel("String_Node_Str").get();
  EdgeLabel edgeLabel=aVertexLabel.getOutEdgeLabel("String_Node_Str").get();
  PropertyColumn vertexPropertyColumn=aVertexLabel.getProperty("String_Node_Str").get();
  PropertyColumn edgePropertyColumn=edgeLabel.getProperty("String_Node_Str").get();
  VertexLabel bVertexLabel=schema.getVertexLabel("String_Node_Str").get();
  Index index=aVertexLabel.ensureIndexExists(IndexType.UNIQUE,new ArrayList<>(aVertexLabel.getProperties().values()));
  GlobalUniqueIndex globalUniqueIndex=schema.ensureGlobalUniqueIndexExist(new HashSet<>(aVertexLabel.getProperties().values()));
  assertEquals(12,this.topologyListenerTriple.size());
  assertEquals(schema,this.topologyListenerTriple.get(0).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(0).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(0).getRight());
  assertEquals(aVertexLabel,this.topologyListenerTriple.get(1).getLeft());
  Map<String,PropertyColumn> props=((VertexLabel)this.topologyListenerTriple.get(1).getLeft()).getProperties();
  assertTrue(props.containsKey("String_Node_Str"));
  assertTrue(props.containsKey("String_Node_Str"));
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(1).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(1).getRight());
  assertEquals(edgeLabel,this.topologyListenerTriple.get(2).getLeft());
  String s=this.topologyListenerTriple.get(2).getLeft().toString();
  assertTrue(s.contains(edgeLabel.getSchema().getName()));
  props=((EdgeLabel)this.topologyListenerTriple.get(2).getLeft()).getProperties();
  assertTrue(props.containsKey("String_Node_Str"));
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(2).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(2).getRight());
  assertEquals(vertexPropertyColumn,this.topologyListenerTriple.get(3).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(3).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(3).getRight());
  assertEquals(edgePropertyColumn,this.topologyListenerTriple.get(4).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(4).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(4).getRight());
  assertEquals(bVertexLabel,this.topologyListenerTriple.get(5).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(5).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(5).getRight());
  assertEquals(edgeLabel,this.topologyListenerTriple.get(6).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(6).getMiddle());
  assertEquals(TopologyChangeAction.ADD_IN_VERTEX_LABELTO_EDGE,this.topologyListenerTriple.get(6).getRight());
  assertEquals(index,this.topologyListenerTriple.get(7).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(7).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(7).getRight());
  assertEquals(globalUniqueIndex,this.topologyListenerTriple.get(11).getLeft());
  assertEquals("String_Node_Str",this.topologyListenerTriple.get(11).getMiddle());
  assertEquals(TopologyChangeAction.CREATE,this.topologyListenerTriple.get(11).getRight());
  this.sqlgGraph.tx().commit();
}