<commit_before>import React, { Component } from 'react'
import './App.sass'

const list = [
  {
    title: 'React',
    url: 'https://facebook.github.io/react/',
    author: '<NAME>',
    num_comments: 3,
    points: 4,
    objectID: 0,
  },
  {
    title: 'Redux',
    url: 'https://github.com/reactjs/redux',
    author: '<NAME>, <NAME>',
    num_comments: 2,
    points: 5,
    objectID: 1,
  },
  {
    title: 'HaNews',
    url: 'https://nayed.github.io/hanews',
    author: '<NAME>',
    num_comments: 6,
    points: 2,
    objectID: 2,
  },
]

class App extends Component {
  constructor(props) {
    super(props)

    this.state = {
      list
    }

    this.onDismiss = this.onDismiss.bind(this)
  }

  onDismiss(id) {
    const isNotId = item => item.objectID !== id
    const updatedList = this.state.list.filter(isNotId)
    this.setState({ list: updatedList })
  }

  render() {
    return (
      <div className="App">
        { this.state.list.map(item =>
          <div key={item.objectID}>
            <span>
              <a href={item.url}>{item.title}</a>
            </span>
            <span>{item.author}</span>
            <span>{item.num_comments}</span><commit_msg>search term<commit_after>import React, { Component } from 'react'
import './App.sass'

const list = [
  {
    title: 'React',
    url: 'https://facebook.github.io/react/',
    author: '<NAME>',
    num_comments: 3,
    points: 4,
    objectID: 0,
  },
  {
    title: 'Redux',
    url: 'https://github.com/reactjs/redux',
    author: '<NAME>, <NAME>',
    num_comments: 2,
    points: 5,
    objectID: 1,
  },
  {
    title: 'HaNews',
    url: 'https://nayed.github.io/hanews',
    author: '<NAME>',
    num_comments: 6,
    points: 2,
    objectID: 2,
  },
]

class App extends Component {
  constructor(props) {
    super(props)

    this.state = {
      list,
      searchTerm: ''
    }

    this.onDismiss = this.onDismiss.bind(this)
    this.onSearchChange = this.onSearchChange.bind(this)
  }

  onDismiss(id) {
    const isNotId = item => item.objectID !== id
    const updatedList = this.state.list.filter(isNotId)
    this.setState({ list: updatedList })
  }

  onSearchChange(event) {
    this.setState({ searchTerm: event.target.value })
  }

  render() {
    const isSearched = searchTerm => item =>
      !searchTerm || item.title.toLowerCase().includes(searchTerm.toLowerCase())

    const { searchTerm, list } = this.state
    return (
      <div className="App">
        <form>
          <input
            type="text"
            onChange={this.onSearchChange}
          />
        </form>
        { list.filter(isSearched(searchTerm)).map(item =>
          <div key={item.objectID}>
            <span>
              <a href={item.url}>{item.title}</a>
            </span>
            <span>{item.author}</span>
            <span>{item.num_comments}</span>
{'fraction_non_alphanumeric': 0.1631156129933636, 'fraction_numerical': 0.0062871114215857496, 'mean_word_length': 2.2179775280898877, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 40, 'https://': 6, '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': '6555085', 'n_tokens_mistral': 997, 'n_tokens_neox': 982, 'n_words': 184}