List<RelationshipRecord> loop = null;
Map<DirectionWrapper, Iterable<RelationshipRecord>> result = new EnumMap<>( DirectionWrapper.class );
result.put( DirectionWrapper.OUTGOING, out );
result.put( DirectionWrapper.INCOMING, in );
RelationshipLoadingPosition loadPosition = originalPosition.clone();
<BUG>long position = loadPosition.position( direction, types );
for ( int i = 0; i < relationshipGrabSize && position != Record.NO_NEXT_RELATIONSHIP.intValue(); i++ )</BUG>
{
<BUG>RelationshipRecord relRecord = relationshipStore.getChainRecord( position );
if ( relRecord == null )
{</BUG>
return Pair.of( result, loadPosition );

List<RelationshipRecord> loop = null;
Map<DirectionWrapper, Iterable<RelationshipRecord>> result = new EnumMap<>( DirectionWrapper.class );
result.put( DirectionWrapper.OUTGOING, out );
result.put( DirectionWrapper.INCOMING, in );
RelationshipLoadingPosition loadPosition = originalPosition.clone();
long position = loadPosition.position( direction, types );
RelationshipRecord relRecord = null;
boolean allocateNewRecord = true;
for ( int i = 0; i < relationshipGrabSize && position != Record.NO_NEXT_RELATIONSHIP.intValue(); i++ )
{
if ( allocateNewRecord )
{
relRecord = new RelationshipRecord( -1 );
allocateNewRecord = false;
