<commit_before>import { Component, OnDestroy, OnInit } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { Store } from '@ngrx/store';
import { Actions } from '@ngrx/effects';
import { Subject } from 'rxjs/Subject';

import * as fromRoot from '../../store';
import * as authAction from '../../store/auth/auth.actions';
import * as errorAction from '../../store/error/error.actions';
import { Subscription } from 'rxjs/Subscription';

export interface ILoginComponent {
  login(): void;
  removeError(err: Error): void;
}

@Component({
  selector: 'app-login',
  templateUrl: './login.component.html',
  styleUrls: ['./login.component.scss']
})
export class LoginComponent implements OnInit, OnDestroy, ILoginComponent {
  errors$: Observable<Error[]>;
  loginForm: FormGroup;
  private _destroyed$ = new Subject<boolean>();
  private _errors: Error[];
  private _errorsSubscription: Subscription;
  constructor(private _store: Store<fromRoot.State>,
              private _router: Router,
              private _fb: FormBuilder,
              private _actions$: Actions) {
    this.errors$ = this._store.select(fromRoot.getErrors);
    this._errorsSubscription = this.errors$.subscribe(errors => this._errors = errors);
    this.loginForm = this._fb.group({
      username: ['', Validators.required],
      password: ['', Validators.required],
      rememberMe: [true],
    });
  }

  ngOnInit(): void {<commit_msg>feat(client/login): remember me default state<commit_after>import { Component, OnDestroy, OnInit } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { Store } from '@ngrx/store';
import { Actions } from '@ngrx/effects';
import { Subject } from 'rxjs/Subject';

import * as fromRoot from '../../store';
import * as authAction from '../../store/auth/auth.actions';
import * as errorAction from '../../store/error/error.actions';
import { Subscription } from 'rxjs/Subscription';

export interface ILoginComponent {
  login(): void;
  removeError(err: Error): void;
}

@Component({
  selector: 'app-login',
  templateUrl: './login.component.html',
  styleUrls: ['./login.component.scss']
})
export class LoginComponent implements OnInit, OnDestroy, ILoginComponent {
  errors$: Observable<Error[]>;
  loginForm: FormGroup;
  private _destroyed$ = new Subject<boolean>();
  private _errors: Error[];
  private _errorsSubscription: Subscription;
  constructor(private _store: Store<fromRoot.State>,
              private _router: Router,
              private _fb: FormBuilder,
              private _actions$: Actions) {
    this.errors$ = this._store.select(fromRoot.getErrors);
    this._errorsSubscription = this.errors$.subscribe(errors => this._errors = errors);
    this.loginForm = this._fb.group({
      username: ['', Validators.required],
      password: ['', Validators.required],
      rememberMe: [false],
    });
  }

  ngOnInit(): void {
{'fraction_non_alphanumeric': 0.1467304625199362, 'fraction_numerical': 0.0, 'mean_word_length': 4.0095846645367414, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '5820759', 'n_tokens_mistral': 882, 'n_tokens_neox': 897, 'n_words': 234}