Hi,
as noted in README, dia2code won't generate operation return types, if the operation type is empty. This works for constructors but breaks ordinary functions. I don't think this is the right choice, as one needs to rework many function in order to get the code to compile.
Therefore I changed the implementation for the java code generator to generate a void return type, if the operation is no constructor. Unfortunally I don't have time to fix this in all languages, but maybe you're nevertheless interested in the change.
New version of the patch attached, there were issues with the diff.
Thanks for your patch, I applied it in commit ff451b4.