<commit_before>import React, { Component } from 'react';
import {
  StyleSheet,
  Text,
  TextInput,
  View,
  Image,
  TouchableHighlight,
  ListView,
} from 'react-native';

import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as ActionCreators from './actions';

class App extends Component {
  constructor(props) {
    super(props);
    const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
    this.state = {
      todoTitle: '',
      dataSource: ds.cloneWithRows(this.props.todos),
    };
  }

  addTodoPressed() {
    const todo = {
      id: Math.random().toString(36),
      title: this.state.todoTitle,
    };
    // call action
    this.props.actions.addTodo(todo);

    // clear text input
    this.setState({ todoTitle: '' });
  }

  renderRow(rowData) {
    var icon = rowData.completed ? require('./img/complete-icon.png') : require('./img/incomplete-icon.png');
    return (
      <View style={styles.todoItem}>
        <View style={styles.todoItemLeft}><commit_msg>blank checking added<commit_after>import React, { Component } from 'react';
import {
  StyleSheet,
  Text,
  TextInput,
  View,
  Image,
  TouchableHighlight,
  ListView,
} from 'react-native';

import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as ActionCreators from './actions';

class App extends Component {
  constructor(props) {
    super(props);
    const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
    this.state = {
      todoTitle: '',
      dataSource: ds.cloneWithRows(this.props.todos),
    };
  }

  addTodoPressed() {
    // check blank
    if (!this.state.todoTitle) {
      return;
    }

    const todo = {
      id: Math.random().toString(36),
      title: this.state.todoTitle,
    };
    // call action
    this.props.actions.addTodo(todo);

    // clear text input
    this.setState({ todoTitle: '' });
  }

  renderRow(rowData) {
    var icon = rowData.completed ? require('./img/complete-icon.png') : require('./img/incomplete-icon.png');
    return (
      <View style={styles.todoItem}>
        <View style={styles.todoItemLeft}>
{'fraction_non_alphanumeric': 0.14944649446494465, 'fraction_numerical': 0.005535055350553505, 'mean_word_length': 3.0166666666666666, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '1585007', 'n_tokens_mistral': 717, 'n_tokens_neox': 705, 'n_words': 150}