void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiMethodCallExpression substringCall = PsiTreeUtil.getParentOfType(element, PsiMethodCallExpression.class); if (substringCall == null) return; PsiExpression stringExpr = substringCall.getMethodExpression().getQualifierExpression(); if (stringExpr == null) return; PsiMethodCallExpression nextCall = ExpressionUtils.getCallForQualifier(substringCall); if (nextCall == null) return; PsiExpression[] args = substringCall.getArgumentList().getExpressions(); if (args.length == 0) return; CommentTracker ct = new CommentTracker(); if (!"endsWith".equals(myBindCallName) && !ExpressionUtils.isZero(args[0])) { nextCall.getArgumentList().add(ct.markUnchanged(args[0])); } ExpressionUtils.bindCallTo(nextCall, myBindCallName); ct.replaceAndRestoreComments(substringCall, stringExpr); }