void (@NotNull Project project, @NotNull PsiElement startElement, @NotNull ModPsiUpdater updater) { final PsiConditionalExpression conditionalExpression = (PsiConditionalExpression)startElement; final PsiExpression thenExpression = conditionalExpression.getThenExpression(); if (thenExpression == null) { return; } final PsiExpression elseExpression = conditionalExpression.getElseExpression(); if (EquivalenceChecker.getCanonicalPsiEquivalence().expressionsAreEquivalent(thenExpression, elseExpression)) { CommentTracker commentTracker = new CommentTracker(); PsiReplacementUtil.replaceExpression(conditionalExpression, commentTracker.text(thenExpression), commentTracker); } }