I am just curious on how people solve this. I often write the same type of code all the time. For instance:
new Thread() { //... //... //... //Change
Well, I guess you could run your java files through the C preprocessor...