Program: 167035
Project: 167035
Buggy source:
@Test public void testRepeat(){
  Vertex a1=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Vertex b1=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Vertex b2=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Vertex b3=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  a1.addEdge("String_Node_Str",b1);
  a1.addEdge("String_Node_Str",b2);
  a1.addEdge("String_Node_Str",b3);
  Vertex c1=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Vertex c2=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Vertex c3=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  b1.addEdge("String_Node_Str",c1);
  b1.addEdge("String_Node_Str",c2);
  b1.addEdge("String_Node_Str",c3);
  this.sqlgGraph.tx().commit();
  List<Vertex> vertices=this.sqlgGraph.traversal().V().hasLabel("String_Node_Str").local(__.<Vertex>times(0).repeat(out("String_Node_Str").out("String_Node_Str"))).toList();
  assertEquals(1,vertices.size());
  assertTrue(vertices.contains(a1));
  vertices=this.sqlgGraph.traversal().V().hasLabel("String_Node_Str").local(repeat(out("String_Node_Str","String_Node_Str")).times(1)).toList();
  assertEquals(3,vertices.size());
  assertTrue(vertices.contains(b1));
  assertTrue(vertices.contains(b2));
  assertTrue(vertices.contains(b3));
  vertices=this.sqlgGraph.traversal().V().hasLabel("String_Node_Str").local(__.<Vertex>times(1).repeat(out("String_Node_Str","String_Node_Str"))).toList();
  assertEquals(3,vertices.size());
  assertTrue(vertices.contains(b1));
  assertTrue(vertices.contains(b2));
  assertTrue(vertices.contains(b3));
  vertices=this.sqlgGraph.traversal().V().hasLabel("String_Node_Str").local(repeat(out("String_Node_Str","String_Node_Str")).times(2)).toList();
  assertEquals(3,vertices.size());
  assertTrue(vertices.contains(c1));
  assertTrue(vertices.contains(c2));
  assertTrue(vertices.contains(c3));
  vertices=this.sqlgGraph.traversal().V().hasLabel("String_Node_Str").local(__.<Vertex>times(2).repeat(out("String_Node_Str","String_Node_Str"))).toList();
  assertEquals(3,vertices.size());
  assertTrue(vertices.contains(c1));
  assertTrue(vertices.contains(c2));
  assertTrue(vertices.contains(c3));
}

Fixed version (ground truth):
@Test public void testRepeat(){
  Vertex a1=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Vertex b1=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Vertex b2=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Vertex b3=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  a1.addEdge("String_Node_Str",b1);
  a1.addEdge("String_Node_Str",b2);
  a1.addEdge("String_Node_Str",b3);
  Vertex c1=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Vertex c2=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  Vertex c3=this.sqlgGraph.addVertex(T.label,"String_Node_Str","String_Node_Str","String_Node_Str");
  b1.addEdge("String_Node_Str",c1);
  b1.addEdge("String_Node_Str",c2);
  b1.addEdge("String_Node_Str",c3);
  this.sqlgGraph.tx().commit();
  List<Vertex> vertices=this.sqlgGraph.traversal().V().hasLabel("String_Node_Str").local(__.<Vertex>times(0).repeat(out("String_Node_Str").out("String_Node_Str"))).toList();
  vertices=this.sqlgGraph.traversal().V().hasLabel("String_Node_Str").local(repeat(out("String_Node_Str","String_Node_Str")).times(1)).toList();
  assertEquals(3,vertices.size());
  assertTrue(vertices.contains(b1));
  assertTrue(vertices.contains(b2));
  assertTrue(vertices.contains(b3));
  vertices=this.sqlgGraph.traversal().V().hasLabel("String_Node_Str").local(__.<Vertex>times(1).repeat(out("String_Node_Str","String_Node_Str"))).toList();
  assertEquals(3,vertices.size());
  assertTrue(vertices.contains(b1));
  assertTrue(vertices.contains(b2));
  assertTrue(vertices.contains(b3));
  vertices=this.sqlgGraph.traversal().V().hasLabel("String_Node_Str").local(repeat(out("String_Node_Str","String_Node_Str")).times(2)).toList();
  assertEquals(3,vertices.size());
  assertTrue(vertices.contains(c1));
  assertTrue(vertices.contains(c2));
  assertTrue(vertices.contains(c3));
  vertices=this.sqlgGraph.traversal().V().hasLabel("String_Node_Str").local(__.<Vertex>times(2).repeat(out("String_Node_Str","String_Node_Str"))).toList();
  assertEquals(3,vertices.size());
  assertTrue(vertices.contains(c1));
  assertTrue(vertices.contains(c2));
  assertTrue(vertices.contains(c3));
}