<commit_before>(function($) {
  $(document).ready(function(){
    $("#checkout_form_delivery").submit(function(){
      set_address_citybox($("#citybox_locations").val());
    });

    $("#use_citybox").change(function(){
      if(this.is(':checked')){
        set_address_dummy();
      } else {
        remove_address_dummy();
      }
    });

    if ($("#use_citybox").is(':checked')){
      set_address_dummy();
    } else {
      remove_address_dummy();
    }

    function remove_address_dummy(){
      if ($("#order_bill_address_attributes_address1").val() == 'dummy_address1'){
        $("#order_bill_address_attributes_address1").val('');
      }
        
      if ($("#order_bill_address_attributes_city").val() == 'dummy_city'){
        $("#order_bill_address_attributes_city").val('');
      }
              
      $(".citybox_hidden").show();
    }

    function set_address_citybox(address){<commit_msg>fix bug js<commit_after>(function($) {
  $(document).ready(function(){
    $("#checkout_form_delivery").submit(function(){
      set_address_citybox($("#citybox_locations").val());
    });

    $("#use_citybox").change(function(){
      if($(this).is(':checked')){
        set_address_dummy();
      } else {
        remove_address_dummy();
      }
    });

    if ($("#use_citybox").is(':checked')){
      set_address_dummy();
    } else {
      remove_address_dummy();
    }

    function remove_address_dummy(){
      if ($("#order_bill_address_attributes_address1").val() == 'dummy_address1'){
        $("#order_bill_address_attributes_address1").val('');
      }
        
      if ($("#order_bill_address_attributes_city").val() == 'dummy_city'){
        $("#order_bill_address_attributes_city").val('');
      }
              
      $(".citybox_hidden").show();
    }

    function set_address_citybox(address){
{'fraction_non_alphanumeric': 0.19029443838604143, 'fraction_numerical': 0.003271537622682661, 'mean_word_length': 3.1422121896162527, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7245214', 'n_tokens_mistral': 572, 'n_tokens_neox': 561, 'n_words': 55}