<commit_before>
var SimpleAutoCompleteComponent = BaseComponent.extend({

    ph: undefined,
    completionCallback: undefined,

    update: function() {
      var myself = this;
      this.ph = $("#" + this.htmlObject).empty();
      this.input = $("<input type='text'>").appendTo(this.ph);
      this.query = new Query(this.queryDefinition);
      var myself = this;
      this.input.autocomplete({
        source:function(obj,callback){return myself.triggerQuery(obj.term,callback);}
      });
      this.input.change(function(){
        Dashboards.processChange(myself.name);
      }).keyup(function(event){
        if (event.keyCode == 13) {
          Dashboards.processChange(myself.name);
        }
      });
    },

    handleQuery: function(callback) {
      var myself = this;<commit_msg>Added if clause in update of simple autocomplete presenting re-update if the component is already builded<commit_after>
var SimpleAutoCompleteComponent = BaseComponent.extend({

    ph: undefined,
    completionCallback: undefined,

    update: function() {
      var myself = this;
      if(this.ph == undefined) {
      this.ph = $("#" + this.htmlObject).empty();
      this.input = $("<input type='text'>").appendTo(this.ph);
      this.query = new Query(this.queryDefinition);
      var myself = this;
      this.input.autocomplete({
        source:function(obj,callback){return myself.triggerQuery(obj.term,callback);}
      });
      this.input.change(function(){
        Dashboards.processChange(myself.name);
      }).keyup(function(event){
        if (event.keyCode == 13) {
          Dashboards.processChange(myself.name);
        }
      });
}
    },

    handleQuery: function(callback) {
      var myself = this;
{'fraction_non_alphanumeric': 0.13929193267556586, 'fraction_numerical': 0.0023215322112594312, 'mean_word_length': 2.891647855530474, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3434300', 'n_tokens_mistral': 498, 'n_tokens_neox': 483, 'n_words': 94}