private void declareNecessaryVariablesInsideBody(PsiCodeBlock body) throws IncorrectOperationException {
    Set<PsiVariable> effectivelyLocal = getEffectivelyLocalVariables();
    for (PsiVariable variable : effectivelyLocal) {
      String name = variable.getName();
      LOG.assertTrue(name != null, "variable name is null");
      PsiDeclarationStatement statement = myElementFactory.createVariableDeclarationStatement(name, variable.getType(), null);
      body.add(statement);
    }
  }
private void declareNecessaryVariablesInsideBody(PsiCodeBlock body)