if (edge == null) {
Node firstNode = record.get(0).asNode();
Node secondNode = record.get(2).asNode();
Object firstNodeId = firstNode.get(vertexIdFieldName).asObject();
Object secondNodeId = secondNode.get(vertexIdFieldName).asObject();
<BUG>if (deletedVertices.contains(firstNodeId) || deletedVertices.contains(secondNodeId) || (!partition.isEmpty() && (!StreamSupport.stream(firstNode.labels().spliterator(), false).anyMatch(partition::contains) || !StreamSupport.stream(secondNode.labels().spliterator(), false).anyMatch(partition::contains))))
return null;</BUG>
Neo4JVertex firstVertex = vertices.get(firstNodeId);
if (firstVertex == null) {
firstVertex = new Neo4JVertex(graph, this, propertyIdProvider, vertexIdFieldName, firstNode);

if (edge == null) {
Node firstNode = record.get(0).asNode();
Node secondNode = record.get(2).asNode();
Object firstNodeId = firstNode.get(vertexIdFieldName).asObject();
Object secondNodeId = secondNode.get(vertexIdFieldName).asObject();
if (deletedVertices.contains(firstNodeId) || deletedVertices.contains(secondNodeId) || !partition.containsVertex(StreamSupport.stream(firstNode.labels().spliterator(), false).collect(Collectors.toSet())) || !partition.containsVertex(StreamSupport.stream(secondNode.labels().spliterator(), false).collect(Collectors.toSet())))
return null;
Neo4JVertex firstVertex = vertices.get(firstNodeId);
if (firstVertex == null) {
firstVertex = new Neo4JVertex(graph, this, propertyIdProvider, vertexIdFieldName, firstNode);
