Refactor sections of the provided Spring Boot project: identify the issues introduced across the entity, service, controller and exception-handler layers and explain your approach while thinking out loud. Asked in the Live coding stage. This was the second task in the same session; the candidate only had time to suggest moving logic to the repository.
For grading, represent each finding as a dictionary with layer, issue, and severity, then return findings grouped by layer in the order entity, service, controller, exception-handler, preserving input order within each group.
refactor_findings(findings) receives a list of dictionaries and returns a dictionary mapping each supported layer to its findings.
def refactor_findings(findings):