<commit_before>import { Component, OnInit, OnDestroy } from "@angular/core";
import { Router, ActivatedRoute } from "@angular/router";

import { IBook } from "../model/book";
import { MockService } from "../service/mock.service";

@Component({
  selector: "book-detail",
  templateUrl: "app/component/book-detail.html",
  styleUrls: ["app/component/book-detail.css"]
})

export class BookDetailComponent implements OnInit, OnDestroy {
  book: IBook;
  private sub: any;

  constructor(
    private route: ActivatedRoute,
    private router: Router,
    private mockService: MockService) {}

  ngOnInit() {
    this.sub = this.route.params.subscribe(params => {
      let id = params["id"];
      this.mockService.getBook(id).then(book => this.book = book);
    });
  }

  ngOnDestroy() {
    this.sub.unsubscribe();
  }
}<commit_msg>Better variable naming mockService -> service.<commit_after>import { Component, OnInit, OnDestroy } from "@angular/core";
import { Router, ActivatedRoute } from "@angular/router";

import { IBook } from "../model/book";
import { MockService } from "../service/mock.service";

@Component({
  selector: "book-detail",
  templateUrl: "app/component/book-detail.html",
  styleUrls: ["app/component/book-detail.css"]
})

export class BookDetailComponent implements OnInit, OnDestroy {
  book: IBook;
  private sub: any;

  constructor(
    private route: ActivatedRoute,
    private router: Router,
    private service: MockService) {}

  ngOnInit() {
    this.sub = this.route.params.subscribe(params => {
      let id = params["id"];
      this.service.getBook(id).then(book => this.book = book);
    });
  }

  ngOnDestroy() {
    this.sub.unsubscribe();
  }
}
{'fraction_non_alphanumeric': 0.14961561206386753, 'fraction_numerical': 0.0, 'mean_word_length': 3.8068181818181817, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '5081355', 'n_tokens_mistral': 527, 'n_tokens_neox': 517, 'n_words': 120}