Update: I modified the function getActiveInstructorIds to use Set<String> ret = new java.util.HashSet<String>(); instead of Set<String> ret = Collections.emptySet(); and it now functions normally