<commit_before>import React, { Component } from 'react';
import { Button, Col, ControlLabel, Form, FormControl, FormGroup, Panel } from 'react-bootstrap';
import classnames from 'classnames';
import firebase from 'firebase';
import logo from './logo.svg';
import './style.css';

class App extends Component {
  constructor(props) {
    // set props
    super(props);

    // set state
    this.state = { title: ''};

    // bind functions
    this.handleChange = this.handleChange.bind(this);
    this.handleFormSubmit = this.handleFormSubmit.bind(this);
  }

  createQwest() {
    // write to Firebase
    firebase.database().ref('test/1').set({
      title: this.state.title
    });
  }

  loginWithFacebook() {
    // Setup Firebase Facebook Auth Provider
    var provider = new firebase.auth.FacebookAuthProvider();
<commit_msg>updated createQwest() to test out bulk updating of the Firebase database<commit_after>import React, { Component } from 'react';
import { Button, Col, ControlLabel, Form, FormControl, FormGroup, Panel } from 'react-bootstrap';
import classnames from 'classnames';
import firebase from 'firebase';
import logo from './logo.svg';
import './style.css';

class App extends Component {
  constructor(props) {
    // set props
    super(props);

    // set state
    this.state = { title: ''};

    // bind functions
    this.handleChange = this.handleChange.bind(this);
    this.handleFormSubmit = this.handleFormSubmit.bind(this);
  }

  createQwest() {
    // Create a test user id
    const userId = '1';

    // Create Qwest object.
    const qwestData = {
      title: this.state.title
    };

    // Get a key for a new Qwest.
    var newQwestKey = firebase.database().ref().child('qwests').push().key;

    // Write the new Qwest's data simultaneously
    // in the Qwests list and the user's Qwest list.
    let updates = {};
    updates['/qwests/' + newQwestKey] = qwestData;
    updates['/user-qwests/' + userId + '/' + newQwestKey] = qwestData;

    // update the database
    return firebase.database().ref().update(updates);
  }

  loginWithFacebook() {
    // Setup Firebase Facebook Auth Provider
    var provider = new firebase.auth.FacebookAuthProvider();

{'fraction_non_alphanumeric': 0.1296043656207367, 'fraction_numerical': 0.0009095043201455207, 'mean_word_length': 3.21455938697318, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2732653', 'n_tokens_mistral': 658, 'n_tokens_neox': 641, 'n_words': 186}