<commit_before>import { Accounts } from 'meteor/accounts-base';
import React, { Component } from 'react';
import Row from 'react-bootstrap/lib/Row';
import Col from 'react-bootstrap/lib/Col';
import Alert from 'react-bootstrap/lib/Alert';
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
import AutoForm from 'uniforms-bootstrap3/AutoForm';
import { SubmitField } from 'uniforms-bootstrap3';
import RecoverPasswordSchema from '/imports/modules/app/lib/recoverPasswordSchema';

class RecoverPassword extends Component {
  constructor() {
    super();
    this.state = {
      recoverPasswordSuccess: false,
      recoverPasswordError: null,
    };
    this.onChange = this.onChange.bind(this);
    this.onSubmit = this.onSubmit.bind(this);
    this.onSubmitFailure = this.onSubmitFailure.bind(this);
    this.onSubmitSuccess = this.onSubmitSuccess.bind(this);
  }

  onChange() {
    this.setState({ recoverPasswordError: null });
  }

  onSubmit({ email }) {
    return new Promise((resolve, reject) =>
      Accounts.forgotPassword({ email: email }, error =>
        error ? reject(error) : resolve(),
      ),
    );
  }

  onSubmitFailure(error) {
    this.setState({ recoverPasswordError: error });
  }

  onSubmitSuccess() {
    this.setState({ recoverPasswordSuccess: true });<commit_msg>Update APP module, RecoverPassword component fix import and spaces<commit_after>import React, { Component } from 'react';
import { Accounts } from 'meteor/accounts-base';
import Row from 'react-bootstrap/lib/Row';
import Col from 'react-bootstrap/lib/Col';
import Alert from 'react-bootstrap/lib/Alert';
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
import AutoForm from 'uniforms-bootstrap3/AutoForm';
import SubmitField from 'uniforms-bootstrap3/SubmitField';
import RecoverPasswordSchema from '/imports/modules/app/lib/recoverPasswordSchema';

class RecoverPassword extends Component {
  constructor() {
    super();

    this.state = {
      recoverPasswordSuccess: false,
      recoverPasswordError: null,
    };

    this.onChange = this.onChange.bind(this);
    this.onSubmit = this.onSubmit.bind(this);
    this.onSubmitFailure = this.onSubmitFailure.bind(this);
    this.onSubmitSuccess = this.onSubmitSuccess.bind(this);
  }

  onChange() {
    this.setState({ recoverPasswordError: null });
  }

  onSubmit({ email }) {
    return new Promise((resolve, reject) =>
      Accounts.forgotPassword({ email: email }, error =>
        error ? reject(error) : resolve(),
      ),
    );
  }

  onSubmitFailure(error) {
    this.setState({ recoverPasswordError: error });
  }

  onSubmitSuccess() {
    this.setState({ recoverPasswordSuccess: true });
{'fraction_non_alphanumeric': 0.12542245587683065, 'fraction_numerical': 0.0015020653398422831, 'mean_word_length': 4.103448275862069, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1685752', 'n_tokens_mistral': 776, 'n_tokens_neox': 772, 'n_words': 170}