The junior programmer wrote the code. He is able to compile this code, but, to be honest, this is its only advantage.
Please rewrite the code to fix the errors, but try to keep business logic.
To simplify, we will assume that errors were made only in the BrokenService class, the rest of the code does not need to be changed.