<commit_before>class MyComponent
  include VoiceForm

  delegate :play, :speak, :to => :call_context

  voice_form do      
    field(:age, :max_length => 3, :attempts => 3) do
      prompt :speak => "Please enter your age", :timeout => 2, :repeats => 2
      reprompt :speak => "Enter your age in years", :timeout => 2
      
      setup { @max_age = 110 }
              
      validate { @age.to_i < @max_age }
      
      invalid do
        speak "Your age must be less than #{@max_age}. Try again."
      end
      
      success do
        speak "You are #{@age} years old."
      end
      
      failure do
        speak "You could not enter your age. Thats a bad sign."
      end
    end
    
    do_block do
      speak "Get ready for the next question."
    end
    
    field(:postcode, :length => 4, :attempts => 5) do
      prompt :speak => "Please enter your 4 digit post code", :timeout => 3
      
      validate { @postcode[0..0] != '0' }
      
      invalid do
        if @postcode.size < 4
          speak "Your postcode must 4 digits."
        else
          speak "Your postcode cannot start with a 0."
        end
      end
      
      success do
        speak "Your postcode is #{@postcode.scan(/\d/).join(', ')}."
      end
      
      failure do
        if @age.empty?
          speak "Lets start over shall we."
          form.restart
        end
      end
    end
    
  end
end
<commit_msg>fix example rename call_context to call<commit_after>class MyComponent
  include VoiceForm

  delegate :play, :speak, :to => :call

  voice_form do      
    field(:age, :max_length => 3, :attempts => 3) do
      prompt :speak => "Please enter your age", :timeout => 2, :repeats => 2
      reprompt :speak => "Enter your age in years", :timeout => 2
      
      setup { @max_age = 110 }
              
      validate { @age.to_i < @max_age }
      
      invalid do
        speak "Your age must be less than #{@max_age}. Try again."
      end
      
      success do
        speak "You are #{@age} years old."
      end
      
      failure do
        speak "You could not enter your age. Thats a bad sign."
      end
    end
    
    do_block do
      speak "Get ready for the next question."
    end
    
    field(:postcode, :length => 4, :attempts => 5) do
      prompt :speak => "Please enter your 4 digit post code", :timeout => 3
      
      validate { @postcode[0..0] != '0' }
      
      invalid do
        if @postcode.size < 4
          speak "Your postcode must 4 digits."
        else
          speak "Your postcode cannot start with a 0."
        end
      end
      
      success do
        speak "Your postcode is #{@postcode.scan(/\d/).join(', ')}."
      end
      
      failure do
        if @age.empty?
          speak "Lets start over shall we."
          form.restart
        end
      end
    end
    
  end
end

{'fraction_non_alphanumeric': 0.0992313067784766, 'fraction_numerical': 0.012578616352201259, 'mean_word_length': 1.5839350180505416, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5968605', 'n_tokens_mistral': 901, 'n_tokens_neox': 875, 'n_words': 317}