<commit_before>import React, { Component } from 'react';
import { Table, Icon, Checkbox, Dimmer, Loader } from 'semantic-ui-react'
import logo from './airplane.svg';
import './App.css';
import 'semantic-ui-css/semantic.min.css';
import sortResult from './service/sort-results';
import axios from 'axios';

class FlightResults extends Component {

constructor(props){
  super(props);
  console.log('PROPS',props)
  this.state = {
    results : []
  }

  this.props.resultsObservable.then(axios.spread((viancaResult, chanResult, topaResult, ibaResult) => {

    if(viancaResult &&
     viancaResult.status === 200){
    this.setState({
      results: sortResult(this.state.results, viancaResult.data)
    });
  }
  if(chanResult && chanResult.status === 200){
    this.setState({
      results: sortResult(this.state.results, chanResult.data)
    });
  }
  if(topaResult && topaResult.status === 200){
    this.setState({
      results: sortResult(this.state.results, topaResult.data)
    });
  }
    if(ibaResult && ibaResult.status === 200){
      this.setState({
        results: sortResult(this.state.results, ibaResult.data)
      });
    }
  }))
}

  render() {
    var id = 0;
    if(this.state.loading){
      return (
              <Dimmer active>
                <Loader>Loading</Loader>
              </Dimmer>
      )
    }
    return (
     <div className="content">
       <img src={logo} className="App-logo" alt="logo" />
          <h2>Desvolar.com</h2>
          <h3 className="title">Vuelo {this.props.origin} <Icon name='arrow right'/> {this.props.destination}
            <br/><br/>{this.props.departureDate} - {this.props.arrivalDate}
           </h3>
          <Table celled textAlign='center' size="medium" className="table">
              <Table.Header className="header">
                <Table.Row>
                  <Table.HeaderCell >
                    <Icon name='plane' size='large'/><commit_msg>This close #11<commit_after>import React, { Component } from 'react';
import { Table, Icon, Checkbox, Dimmer, Loader } from 'semantic-ui-react'
import logo from './airplane.svg';
import './App.css';
import 'semantic-ui-css/semantic.min.css';
import sortResult from './service/sort-results';
import axios from 'axios';

class FlightResults extends Component {

constructor(props){
  super(props);
  console.log('PROPS',props)
  this.state = {
    results : []
  }

  this.props.resultsObservable.then(axios.spread((viancaResult, chanResult, topaResult, ibaResult) => {

    if(viancaResult &&
     viancaResult.status === 200){
    this.setState({
      results: sortResult(this.state.results, viancaResult.data)
    });
  }
  if(chanResult && chanResult.status === 200){
    this.setState({
      results: sortResult(this.state.results, chanResult.data)
    });
  }
  if(topaResult && topaResult.status === 200){
    this.setState({
      results: sortResult(this.state.results, topaResult.data)
    });
  }
    if(ibaResult && ibaResult.status === 200){
      this.setState({
        results: sortResult(this.state.results, ibaResult.data)
      });
    }
  }))
}

  render() {
    var id = 0;
    if(this.state.loading){
      return (
              <Dimmer active>
                <Loader>Loading</Loader>
              </Dimmer>
      )
    }
    return (
     <div className="content">
       <img src={logo} className="App-logo" alt="logo" />
          <h2>Desvolar.com</h2>
          <h3 className="title">Resultados {this.props.origin} <Icon name='arrow right'/> {this.props.destination}
            <br/><br/>{this.props.departureDate} - {this.props.arrivalDate}
           </h3>
          <Table celled textAlign='center' size="medium" className="table">
              <Table.Header className="header">
                <Table.Row>
                  <Table.HeaderCell >
                    <Icon name='plane' size='large'/>
{'fraction_non_alphanumeric': 0.15370658372213583, 'fraction_numerical': 0.00933125972006221, 'mean_word_length': 2.6099158091674464, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 41, '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': '2317600', 'n_tokens_mistral': 1252, 'n_tokens_neox': 1205, 'n_words': 221}