void (@NotNull Project project, @NotNull PsiElement startElement, @NotNull ModPsiUpdater updater) { final PsiBinaryExpression expression = (PsiBinaryExpression)startElement; final PsiExpression lhs = PsiUtil.skipParenthesizedExprDown(expression.getLOperand()); final PsiExpression rhs = PsiUtil.skipParenthesizedExprDown(expression.getROperand()); CommentTracker tracker = new CommentTracker(); final String newExpressionText; if (lhs instanceof PsiMethodCallExpression) { final PsiMethodCallExpression callExpression = (PsiMethodCallExpression)lhs; newExpressionText = createContainsExpressionText(callExpression, false, expression.getOperationTokenType(), tracker); } else { final PsiMethodCallExpression callExpression = (PsiMethodCallExpression)rhs; assert callExpression != null; newExpressionText = createContainsExpressionText(callExpression, true, expression.getOperationTokenType(), tracker); } PsiReplacementUtil.replaceExpression(expression, newExpressionText, tracker); }