@NotNull
    @Override
    PsiStatement getStatementToPutBeforeIf(PsiElementFactory factory, @NotNull PsiIfStatement ifStatement) {
      if (isEquivalent()) {
        return getThenStatement();
      }
      String thenVariableTypeText = myThenVariable.getType().getCanonicalText();
      PsiModifierList thenModifierList = myThenVariable.getModifierList();
      String modifiers = thenModifierList == null || thenModifierList.getText().isEmpty() ? "" : thenModifierList.getText() + " ";
      return factory.createStatementFromText(modifiers + thenVariableTypeText + " " + myNewVariableName + ";", ifStatement.getParent());
    }
@NotNull
    @Override
    PsiStatement getStatementToPutBeforeIf(PsiElementFactory factory, @NotNull PsiIfStatement ifStatement)