Refactoring3 of ConfusingTernaryCheck.java