<commit_before>var rePostcode     = /^[A-Z]{1,2}\d{1,2}[A-Z]?\s?\d[A-Z]{2}$/i;
var reLikePostcode = /^[A-Z]{1,2}\d{1,2}[A-Z]?\s?(\d([A-Z]{1,2})?)?$/i;

app.views.search = Backbone.View.extend({
  initialize: function() {
    _.bindAll(this, '_handleResponse', '_handleResponseError');
    this.$input = this.$el.find('.search-input');
    this.$useLocation = this.$el.find('.use-location');
  },
  events: {
    'input': '_onInput',
    'submit': '_onSubmit',
    'click .use-location': function(event) {
      this.$input.val("");
      this.byCurrentLocation();
      event.preventDefault();
    }
  },
  query: function(query) {
    this._update(query);
    var query = query.trim();
    if (rePostcode.test(query)) this.byPostcode(query);
    else if (!reLikePostcode.test(query)) this.byName(query);
  },<commit_msg>Search query reset via reset method<commit_after>var rePostcode     = /^[A-Z]{1,2}\d{1,2}[A-Z]?\s?\d[A-Z]{2}$/i;
var reLikePostcode = /^[A-Z]{1,2}\d{1,2}[A-Z]?\s?(\d([A-Z]{1,2})?)?$/i;

app.views.search = Backbone.View.extend({
  initialize: function() {
    _.bindAll(this, '_handleResponse', '_handleResponseError');
    this.$input = this.$el.find('.search-input');
    this.$useLocation = this.$el.find('.use-location');
  },
  events: {
    'input': '_onInput',
    'submit': '_onSubmit',
    'click .use-location': function(event) {
      this.query("");
      this.byCurrentLocation();
      event.preventDefault();
    }
  },
  query: function(query) {
    this._update(query);
    var query = query.trim();
    if (rePostcode.test(query)) this.byPostcode(query);
    else if (!reLikePostcode.test(query)) this.byName(query);
  },
{'fraction_non_alphanumeric': 0.22784810126582278, 'fraction_numerical': 0.013261000602772756, 'mean_word_length': 3.649859943977591, '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': '3720699', 'n_tokens_mistral': 624, 'n_tokens_neox': 623, 'n_words': 87}