Nice idea, but regarding your first examples, what language is that ? Java ?
Well as far as my own blunders, one of the top easiest mistakes to make is forgetting to end { with the obligatory } braces, whether it is Java, C#, Javascript, etc.
What helps there is to put the braces in every for every nest as you create the nest, including the closing }. It cuts down on that from reoccuring so much.
Another NON-syntax mistake TONS of people make is believing that Java = Javascript !!
Java is not Javascript, no way no how.
As I think of some coding mistakes per the original post, I will put them here. Great idea, kmote !