void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { if (!(element instanceof PsiAssignmentExpression assignmentExpression)) { return; } final PsiElement parent = assignmentExpression.getParent(); assert parent instanceof PsiStatement; final List<PsiExpression> sideEffects = SideEffectChecker.extractSideEffectExpressions(assignmentExpression.getLExpression()); final CommentTracker commentTracker = new CommentTracker(); for (PsiExpression sideEffect : sideEffects) { commentTracker.markUnchanged(sideEffect); } final PsiStatement[] statements = StatementExtractor.generateStatements(sideEffects, assignmentExpression); if (statements.length > 0) { BlockUtils.addBefore((PsiStatement)parent, statements); } commentTracker.deleteAndRestoreComments(parent); }