Program: 186103
Project: 186103
Buggy source:
@Test public void insert_opertation_should_add_data_and_indexes_into_graph(){
  GraphDatabaseService newEmbeddedDatabase=new GraphDatabaseFactory().newEmbeddedDatabase(DB_PATH);
  Neo4jConfiguration neo4jConfiguration=new Neo4jConfiguration();
  neo4jConfiguration.setGraphDatabaseService(newEmbeddedDatabase);
  Neo4jOperation neo4jOperation=new Neo4jOperation(newEmbeddedDatabase);
  neo4jOperation.insert(new ByteArrayInputStream(WELL_FORMED_GRAPH_WITH_MANUAL_INDEX.getBytes()));
  GlobalGraphOperations globalGraphOperations=GlobalGraphOperations.at(newEmbeddedDatabase);
  Iterable<Node> allNodes=globalGraphOperations.getAllNodes();
  Iterable<Relationship> allRelationships=globalGraphOperations.getAllRelationships();
  Node firstNode=selectFirst(allNodes,having(on(Node.class).getProperty("String_Node_Str"),equalTo("String_Node_Str")));
  assertThat(firstNode,notNullValue());
  Node secondNode=selectFirst(allNodes,having(on(Node.class).getProperty("String_Node_Str"),equalTo("String_Node_Str")));
  assertThat(secondNode,notNullValue());
  Node thirdNode=selectFirst(allNodes,having(on(Node.class).getProperty("String_Node_Str"),equalTo("String_Node_Str")));
  assertThat(thirdNode,notNullValue());
  Relationship firstRelationship=selectFirst(allRelationships,having(on(Relationship.class).getProperty("String_Node_Str"),equalTo(Float.parseFloat("String_Node_Str"))));
  assertThat(firstRelationship,notNullValue());
  Relationship secondRelationship=selectFirst(allRelationships,having(on(Relationship.class).getProperty("String_Node_Str"),equalTo(Float.parseFloat("String_Node_Str"))));
  assertThat(secondRelationship,notNullValue());
  String[] nodeIndexNames=newEmbeddedDatabase.index().nodeIndexNames();
  assertThat(nodeIndexNames,arrayContainingInAnyOrder("String_Node_Str"));
  newEmbeddedDatabase.shutdown();
}

Fixed version (ground truth):
@Test public void insert_opertation_should_add_data_and_indexes_into_graph(){
  GraphDatabaseService newEmbeddedDatabase=new GraphDatabaseFactory().newEmbeddedDatabase(DB_PATH);
  Neo4jConfiguration neo4jConfiguration=new Neo4jConfiguration();
  neo4jConfiguration.setGraphDatabaseService(newEmbeddedDatabase);
  Neo4jOperation neo4jOperation=new Neo4jOperation(newEmbeddedDatabase);
  neo4jOperation.insert(new ByteArrayInputStream(WELL_FORMED_GRAPH_WITH_MANUAL_INDEX.getBytes()));
  GlobalGraphOperations globalGraphOperations=GlobalGraphOperations.at(newEmbeddedDatabase);
  Iterable<Node> allNodes=globalGraphOperations.getAllNodes();
  Iterable<Relationship> allRelationships=globalGraphOperations.getAllRelationships();
  Node firstNode=selectFirst(allNodes,having(on(Node.class).getProperty("String_Node_Str"),equalTo("String_Node_Str")));
  assertThat(firstNode,notNullValue());
  Node secondNode=selectFirst(allNodes,having(on(Node.class).getProperty("String_Node_Str"),equalTo("String_Node_Str")));
  assertThat(secondNode,notNullValue());
  Node thirdNode=selectFirst(allNodes,having(on(Node.class).getProperty("String_Node_Str"),equalTo("String_Node_Str")));
  assertThat(thirdNode,notNullValue());
  Relationship firstRelationship=selectFirst(allRelationships,having(on(Relationship.class).getProperty("String_Node_Str"),equalTo(Float.parseFloat("String_Node_Str"))));
  assertThat(firstRelationship,notNullValue());
  Relationship secondRelationship=selectFirst(allRelationships,having(on(Relationship.class).getProperty("String_Node_Str"),equalTo(Float.parseFloat("String_Node_Str"))));
  assertThat(secondRelationship,notNullValue());
  String[] nodeIndexNames=newEmbeddedDatabase.index().nodeIndexNames();
  assertThat(nodeIndexNames,arrayContainingInAnyOrder("String_Node_Str"));
  neo4jOperation.deleteAll();
  newEmbeddedDatabase.shutdown();
}