<commit_before>import React from "react";

import SearchResult from "./SearchResult";
var $ = require('jquery');

/**
 * Panel with autocomplete suggestions that should appear right under
 * the input field as soon as the user types in a few letters.
 */
export default class Results extends React.Component {

  render() {
    var resArray = this.props.searchResults.res;
    var resultsDivs = [];
    if(resArray) {
      for (var i = 0; i < resArray.length; i++) {
        resultsDivs.push(
          <SearchResult
            id={"search-result-" + i}
            key={"search-result-" + i}
            link={resArray[i].link}
            title={resArray[i].title}
            text={resArray[i].text}
          />
        );
      }
    }
    return (
      resultsDivs.length > 0 ?
          <div className={"search-results"} id="results">
              {
                resultsDivs.map(
                  function(result){
                   return result;
                  }
                )
              }
          </div> : null
    );
  }
}<commit_msg>cleaner<commit_after>import React from "react";

import SearchResult from "./SearchResult";

/**
 * Panel with autocomplete suggestions that should appear right under
 * the input field as soon as the user types in a few letters.
 */
export default class Results extends React.Component {

  render() {
    var resArray = this.props.searchResults.res;
    var resultsDivs = [];
    if(resArray) {
      for (var i = 0; i < resArray.length; i++) {
        resultsDivs.push(
          <SearchResult
            id={"search-result-" + i}
            key={"search-result-" + i}
            link={resArray[i].link}
            title={resArray[i].title}
            text={resArray[i].text}
          />
        );
      }
    }
    return (
      resultsDivs.length > 0 ?
          <section className={"search-results"} id="results">
              {
                resultsDivs.map(
                  function(result){
                   return result;
                  }
                )
              }
          </section> : null
    );
  }
}
{'fraction_non_alphanumeric': 0.11912672045562411, 'fraction_numerical': 0.0018984337921214998, 'mean_word_length': 1.580171358629131, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '1436584', 'n_tokens_mistral': 590, 'n_tokens_neox': 566, 'n_words': 144}