Refactoring of ConfusingTernaryCheck.java