<commit_before>import React, { Component } from 'react';
import { browserHistory } from 'react-router';
import '../../styles/prepojenia.css';
import Info from '../info/Info';
import { searchEntity, connection, getInfo } from '../../actions/serverAPI';

class PrepojeniaPage extends Component {
  constructor(props) {
    super(props);
    this.state = {
      entitysearch1: props.location.query.eid1 || '',
      entitysearch2: props.location.query.eid2 || '',
    };
    this.searchOnClick = this.searchOnClick.bind(this);
    this.updateInputValue = this.updateInputValue.bind(this);

    this.searchOnClick();
  }

  updateInputValue(e) {
    this.setState({
      [e.target.id]: e.target.value,
    });
  }

  searchOnClick() {
    if (this.state.entitysearch1.trim() === '' || this.state.entitysearch2.trim() === '') {
      return;
    }<commit_msg>Small fix - since state was changed in constructor<commit_after>import React, { Component } from 'react';
import { browserHistory } from 'react-router';
import '../../styles/prepojenia.css';
import Info from '../info/Info';
import { searchEntity, connection, getInfo } from '../../actions/serverAPI';

class PrepojeniaPage extends Component {
  constructor(props) {
    super(props);
    this.state = {
      entitysearch1: props.location.query.eid1 || '',
      entitysearch2: props.location.query.eid2 || '',
    };
    this.searchOnClick = this.searchOnClick.bind(this);
    this.updateInputValue = this.updateInputValue.bind(this);
  }

  componentWillMount() {
    this.searchOnClick();
  }

  updateInputValue(e) {
    this.setState({
      [e.target.id]: e.target.value,
    });
  }

  searchOnClick() {
    if (this.state.entitysearch1.trim() === '' || this.state.entitysearch2.trim() === '') {
      return;
    }
{'fraction_non_alphanumeric': 0.16479190101237345, 'fraction_numerical': 0.006749156355455568, 'mean_word_length': 3.3284671532846715, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1364390', 'n_tokens_mistral': 553, 'n_tokens_neox': 549, 'n_words': 100}