Refactoring2 of ConfusingTernaryCheck.java