<commit_before>define([
  'react', 'underscore', 'buildpack_form/klass', 'buildpack_table/klass'
], function (React, _, BuildpackForm, BuildpackTable) {
  'use strict';

  return function (state, props, onUrlChange, createBuildpack,
                   updateBuildpack, onQueryChange) {

    var inputAttributes = {
      onChange: onQueryChange,
      type: 'text',
      value: state.query,
      className: 'form-control',
      placeholder: 'Find a buildpack (e.g. Ruby, Python, Java)'
    };

    var formAttributes = {
      createBuildpack: createBuildpack,
      onUrlChange: onUrlChange,
      buttonDisabled: state.createDisabled,
      url: state.inputUrl
    };

    var buildpacks = _.filter(state.buildpacks, queryFilter(state.query));
    var tableAttributes = {
      buildpacks: buildpacks,
      updateBuildpack: updateBuildpack
    };

    return React.DOM.div(null,
      React.DOM.input(inputAttributes),
      React.DOM.br(null),
      new BuildpackForm(formAttributes),
      React.DOM.br(null),
      new BuildpackTable(tableAttributes)
    );
  };

  function queryFilter(query) {
    var lowerCaseQuery = query.toLowerCase();
    return function (buildpack) {
      return buildpack.prettyName.toLowerCase().indexOf(lowerCaseQuery) >= 0;
    };
  }
});<commit_msg>Adjusted name in search<commit_after>define([
  'react', 'underscore', 'buildpack_form/klass', 'buildpack_table/klass'
], function (React, _, BuildpackForm, BuildpackTable) {
  'use strict';

  return function (state, props, onUrlChange, createBuildpack,
                   updateBuildpack, onQueryChange) {

    var inputAttributes = {
      onChange: onQueryChange,
      type: 'text',
      value: state.query,
      className: 'form-control',
      placeholder: 'Find a buildpack (e.g. Ruby, Python, Java)'
    };

    var formAttributes = {
      createBuildpack: createBuildpack,
      onUrlChange: onUrlChange,
      buttonDisabled: state.createDisabled,
      url: state.inputUrl
    };

    var buildpacks = _.filter(state.buildpacks, queryFilter(state.query));
    var tableAttributes = {
      buildpacks: buildpacks,
      updateBuildpack: updateBuildpack
    };

    return React.DOM.div(null,
      React.DOM.input(inputAttributes),
      React.DOM.br(null),
      new BuildpackForm(formAttributes),
      React.DOM.br(null),
      new BuildpackTable(tableAttributes)
    );
  };

  function queryFilter(query) {
    var lowerCaseQuery = query.toLowerCase();
    return function (buildpack) {
      var adjustedName = buildpack.prettyName.replace(/\s/g, '').toLowerCase();
      return adjustedName.indexOf(lowerCaseQuery) >= 0;
    };
  }
});
{'fraction_non_alphanumeric': 0.11678004535147392, 'fraction_numerical': 0.0007558578987150416, 'mean_word_length': 3.1554160125588697, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3613414', 'n_tokens_mistral': 787, 'n_tokens_neox': 788, 'n_words': 161}