This is generated code.
Anyway, it's worth keeping in case there is a bug and the stateId is not generated unique.