fix computePreferredLocations signature to not depend on underlying implementation



Change to Map and Set - not mutable HashMap and HashSet