replace
IMendixObject newFileDocument = Core.create(getContext(), "System.FileDocument");
with
IMendixObject newFileDocument = new system.proxies.FileDocument(getContext()).getMendixObject();
on line 57
I believe Core.create() was deprecated and may have been removed.
Try this one:
FileDocument newFileDocument = FileDocument.create(getContext());
You might also need to remove a line where the IMendixObject was loaded as a FileDocument, as this is already done in the line above.
Edit: Seems FileDocument.create() has also been removed. The new format, as I've been informed, is this:
new FileDocument(getContext());