Today, after half an hour of searching for a bug, I discovered that it is possible to put a semicolon after an if statement instead of code, like this:
if(a
Java Language Specification says that:
The Empty Statement
An empty statement does nothing.
EmptyStatement: ;Execution of an empty statement always completes normally
It essentially means that you want to execute empty statement if a==b
if(a == b);
There are two main solutions to this problem:
You can avoid problems with empty statement by using code formatter
and surrounding stuff inside if with { and }. By doing this
Your empty statement will be much more readable.
if(a == b){
;
}
You can also check tools used for static code analysis such as:

They can instantly highlight problems such as this one.
I would recommend to combine both solutions.