<commit_before>import { Injectable } from '@angular/core';

@Injectable()
export class MessageCtxService {
  public static TYPE__ERROR: String = 'error';
  public static TYPE__WARNING: String = 'warning';
  public static TYPE__SUCCESS: String = 'success';

  public messages: Array<Message> = [];

  public addError(messageText: string): void {
    this.addMessage(messageText, MessageCtxService.TYPE__ERROR);
  }

  public addWarning(messageText: string): void {
    this.addMessage(messageText, MessageCtxService.TYPE__WARNING);
  }

  public addSuccess(messageText: string): void {
    this.addMessage(messageText, MessageCtxService.TYPE__SUCCESS);
  }

  public addMessage(messageText: string, type: string): void {
    let msg = new Message();
    msg.type = type;
    msg.message = messageText;
    this.add(msg);
  }

  public add(message: Message): void {
    this.messages.push(message);
  }

  public removeByIndex(index: number): void {
    this.messages.splice(index, 1);
  }

  public removeByMessage(message: Message): void {
    this.removeByIndex(this.messages.indexOf(message));
  }

  public clear(): void {<commit_msg>süntaksi parandused<commit_after>import { Injectable } from '@angular/core';

@Injectable()
export class MessageCtxService {
  public static TYPE__ERROR: String = 'error';
  public static TYPE__WARNING: String = 'warning';
  public static TYPE__SUCCESS: String = 'success';

  public messages: Array<Message> = [];

  public addError(messageText: String): void {
    this.addMessage(messageText, MessageCtxService.TYPE__ERROR);
  }

  public addWarning(messageText: String): void {
    this.addMessage(messageText, MessageCtxService.TYPE__WARNING);
  }

  public addSuccess(messageText: String): void {
    this.addMessage(messageText, MessageCtxService.TYPE__SUCCESS);
  }

  public addMessage(messageText: String, type: String): void {
    let msg = new Message();
    msg.type = type;
    msg.message = messageText;
    this.add(msg);
  }

  public add(message: Message): void {
    this.messages.push(message);
  }

  public removeByIndex(index: number): void {
    this.messages.splice(index, 1);
  }

  public removeByMessage(message: Message): void {
    this.removeByIndex(this.messages.indexOf(message));
  }

  public clear(): void {
{'fraction_non_alphanumeric': 0.11842105263157894, 'fraction_numerical': 0.0008771929824561404, 'mean_word_length': 4.456937799043062, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5929816', 'n_tokens_mistral': 688, 'n_tokens_neox': 677, 'n_words': 157}