I faced same issue today with one of my flow and the cause of issue was not the flow but an utility shape and an activity which is being called from that utility.
I re-validated that particular utility but it was of no use and if i save that utility standalone i was not getting any error. So at last i applied below mentioned work around and it worked.
Though I am not sure on the cause of the issue.
Resolution - I created another wrapper utility and called my original utility into this new utility and referenced this new utility in the flow and i was able to save the flow at last without any Java Generation error.
You can try the same if you are still facing this issue and if your issue is resolved then do let me know what you did to get that issue resolved.
Thanks for the response. We followed a similar approach to resolve the issue. We had to go through each utility shape in the flow to find the utility which is causing the error. On deleting the error causing utility and creating the same utility again resolved the issue.