<commit_before>import {Component, NgClass, NgFor, NgIf, View} from 'angular2/angular2';
import {Router} from 'angular2/router';
import {HeroService} from './hero-service';
import {Hero} from './hero';
import {ROUTES} from './config';

@Component({
  selector: 'my-heroes'
})
@View({
  templateUrl: 'app/heroes-component.html',
  directives: [NgClass, NgFor, NgIf],
  styleUrls: ['app/heroes-component.css']
})
export class HeroesComponent {
  private _heroes: Hero[];
  currentHero: Hero;

  constructor(private _heroService: HeroService, private _router: Router) { }

  get heroes() {
    if (this._heroes) { return this._heroes; }

    this._heroService.getAllHeroes().then(heroes => this._heroes = heroes);
    return this._heroes;
  }

  onSelect(hero: Hero) { this.currentHero = hero; }

  getSelectedClass(hero: Hero) {
    return { 'selected': hero === this.currentHero };
  }

  goDetail() {
    this._router.navigate(`${ROUTES.detail}/${this.currentHero.id}`);
  }
}
<commit_msg>whitespace<commit_after>import {Component, NgClass, NgFor, NgIf, View} from 'angular2/angular2';
import {Router} from 'angular2/router';
import {HeroService} from './hero-service';
import {Hero} from './hero';
import {ROUTES} from './config';

@Component({selector: 'my-heroes'})
@View({
  templateUrl: 'app/heroes-component.html',
  directives: [NgClass, NgFor, NgIf],
  styleUrls: ['app/heroes-component.css']
})
export class HeroesComponent {
  private _heroes: Hero[];
  currentHero: Hero;

  constructor(private _heroService: HeroService, private _router: Router) { }

  get heroes() {
    if (this._heroes) { return this._heroes; }

    this._heroService.getAllHeroes().then(heroes => this._heroes = heroes);
    return this._heroes;
  }

  onSelect(hero: Hero) { this.currentHero = hero; }

  getSelectedClass(hero: Hero) {
    return { 'selected': hero === this.currentHero };
  }

  goDetail() {
    this._router.navigate(`${ROUTES.detail}/${this.currentHero.id}`);
  }
}

{'fraction_non_alphanumeric': 0.16251904520060945, 'fraction_numerical': 0.0030472320975114273, 'mean_word_length': 4.487465181058496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6245872', 'n_tokens_mistral': 686, 'n_tokens_neox': 675, 'n_words': 145}