I was able to reproduce this with the addMemberToSiteWithRole call. Seems pretty straightforward to fix.
I'm adding members to site and roster is throwing this error a lot. It looks like from SAK-30775 that site id should be checked for null first before calling?
05-Jun-2018 13:52:45.330 WARN [http-nio-8080-exec-8] org.sakaiproject.roster.impl.SakaiProxyImpl.getSite site not found: null
Removed students and then added new ones, but old ones still show up