void (@NotNull PsiLocalVariable var) { PsiExpression initializer = Objects.requireNonNull(var.getInitializer()); Branched branched = Objects.requireNonNull(extractInitMode(var)); PsiStatement statement = JavaPsiFacade.getElementFactory(var.getProject()) .createStatementFromText(var.getName() + "=" + initializer.getText() + ";", null); branched.addInitializer(statement); initializer.delete(); }