void (@NotNull PsiLocalVariable target) { PsiElementFactory factory = JavaPsiFacade.getElementFactory(target.getProject()); target.getTypeElement().replace(factory.createTypeElementFromText(CommonClassNames.JAVA_LANG_STRING, target)); PsiExpression initializer = target.getInitializer(); String initialText = ConstructionUtils.getStringBuilderInitializerText(initializer); if (initialText != null) { initializer.replace(factory.createExpressionFromText("\"\"", target)); } }