Split Document into multiple document based on condition

from Memory analyzer tool (leak suspect) i got these 3 suspect
image
image
image

All the suspects refer to ruby. and this is some details from suspect 1. suspect 3 have a similar information like suspect 1

And this is details from suspect 2




image

Thank you