It's looping through a map for the key "loadoutinv", the map is stored in the player class and is called through the getSavingAttributes(), I'd imagine somewhere in your source will have something else that adds data to that map in order to use.
Essentially it's looping until it finds what it needs, in this case "loadoutinv"