@Override
  @Nullable
  public PsiStatement createReplacement(@NotNull final PsiMethod extractedMethod, @NotNull final PsiMethodCallExpression methodCallExpression, @Nullable final PsiType returnType) throws IncorrectOperationException {
    final PsiDeclarationStatement statement;

    Project project = methodCallExpression.getProject();
    final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project);
    final CodeStyleManager styleManager = CodeStyleManager.getInstance(project);
    JavaCodeStyleManager javaStyleManager = JavaCodeStyleManager.getInstance(project);
    PsiType type = returnType != null && returnType.isValid() ? returnType : myVariable.getType();
    statement = (PsiDeclarationStatement)styleManager.reformat(
      javaStyleManager.shortenClassReferences(
        elementFactory.createVariableDeclarationStatement(myVariable.getName(), type, methodCallExpression)));
    ((PsiVariable)statement.getDeclaredElements()[0]).getModifierList().replace(myVariable.getModifierList());
    return statement;
  }
@Override
  @Nullable
  public PsiStatement createReplacement(@NotNull final PsiMethod extractedMethod, @NotNull final PsiMethodCallExpression methodCallExpression, @Nullable final PsiType returnType)