There's an old rule in the computing business which says "If it ain't broke, don't fix it".
Even if you are completely certain that a particular feature is no longer in use, there is still a risk in removing it from the code. You might, for example, remove the "if (...) {" part and its associated code, and then remove the wrong closing brace. You would probably have to run the code through the
testing and acceptance process again (you said it was a large code base so I'm assuming you have that process).
As for automation: there isn't a program which can analyze a
Java class and tell you whether a particular if-clause will be executed. However if you have the same code copied-and-pasted in many places (which does happen even in Java), you could conceivably scan the source code looking for that. And there might be tools to scan the source code to look for frequently-duplicated code. In fact I'm fairly sure there must be, although I can't name them.