LPS-51912 remove references to deprecated methods
LPS-51912 remove unnecessary variables
LPS-51912 remove duplicated code
LPS-51912 remove redundant `continue` keyword
LPS-51912 manage exceptions in the same way for all repositories

Exceptions were handled in a different way for the group repository than
for regular repositories. Make the behaviour the same in both cases and
refactor out common logic.
LPS-51912 add abstract methods for Javadoc references

Make deprecation references more explicit by adding abstract methods.