Create the patch file. (There are a number of ways to do this, discussion will follow).
Submit the patch at the bug report, and also mention it in a comment (I don't know what technical purpose this serves, but it very well maybe just their way of doing things.)
Mention the root directory to which the patch applies, and the revision number of the project on which the patch was worked on.
Now, the patch code maybe put in a comment, but experience shows that seldom works. Another method is to include a zip file (or tar.gz, whichever the poster prefers), which has a complete package structure, for example:
org > apache > tools > ant > taskdefs > optional > clearcase > ClearCase.java
A third technique, which I suspect is the best one, is to include a .patch file. When I opened it in Notepad++, it identified the language to be "Diff". This file included an xml like structure, as well as a code part, with several lines starting from a "+" symbol. Also, several lines included an "Index:
Unfortunately, I haven't been able to find a way yet to convert my code into this .patch form. However I suspect that some sort of plugin must exist for Eclipse which tracks these changes and consolidates them into a single .patch file, because whatever creates the .patch file must track the changes while they are being made in order to reflect them accurately, and any such implementation would make sense to be associated with the IDE.
However, if I don't find this .patch method, I'll just upload my directory structure in a gzip.
The original post can be found here: https://anterence.blogspot.com/2010/05/submitting-patches.html