<commit_before>'use strict';

import Mutant from '../Mutant';


abstract class BaseMutation {
  _name: string;
  _types: string[];
    
  /**
   * Represents a base class for all mutations.
   * @class
   * @param {String} name - The name of the mutation.
   * @param {String[]} types - The types of mutation as expected by the parser.
   */
  constructor(name: string, types: string[]) {
    this._name = name;
    this._types = types;
  }

  /**
   * Applies this mutation on the Abstract Syntax Tree and generates one or more Mutants.
   * @function
   * @param {String} filename - The name of the file which will be mutated.
   * @param {String} originalCode - The original content of the file which has not been mutated.
   * @param {Object} node - The part of the abstract syntax tree which has to be mutated.
   * @param {Object} ast - The complete abstract syntax tree.
   * @returns {Mutant[]} The generated Mutants.
   */
  abstract applyMutation(filename: string, originalCode: string, node, ast): Mutant[];

  /**
   * Checks if this mutation can be applied to the provided node.
   * @function
   * @param {Object} node - A part of the abstract syntax tree.
   * @returns {Boolean} True if the mutation can be applied.
   */
  abstract canMutate(node): boolean;

  /**
   * Gets the name of the mutation.
   * @function
   * @returns {String} The name of the mutation.
   */
  getName(): string {
    return this._name;
  }

  /**
   * Gets the types of the mutation.
   * @function
   * @returns {String[]} The types of the mutation.
   */
  getTypes(): string[] {<commit_msg>Removed implic any's from BaseMutation<commit_after>'use strict';

import Mutant from '../Mutant';


abstract class BaseMutation {
  _name: string;
  _types: string[];
    
  /**
   * Represents a base class for all mutations.
   * @class
   * @param {String} name - The name of the mutation.
   * @param {String[]} types - The types of mutation as expected by the parser.
   */
  constructor(name: string, types: string[]) {
    this._name = name;
    this._types = types;
  }

  /**
   * Applies this mutation on the Abstract Syntax Tree and generates one or more Mutants.
   * @function
   * @param {String} filename - The name of the file which will be mutated.
   * @param {String} originalCode - The original content of the file which has not been mutated.
   * @param {Object} node - The part of the abstract syntax tree which has to be mutated.
   * @param {Object} ast - The complete abstract syntax tree.
   * @returns {Mutant[]} The generated Mutants.
   */
  abstract applyMutation(filename: string, originalCode: string, node: ESTree.Node, ast: ESTree.Program): Mutant[];

  /**
   * Checks if this mutation can be applied to the provided node.
   * @function
   * @param {Object} node - A part of the abstract syntax tree.
   * @returns {Boolean} True if the mutation can be applied.
   */
  abstract canMutate(node: ESTree.Node): boolean;

  /**
   * Gets the name of the mutation.
   * @function
   * @returns {String} The name of the mutation.
   */
  getName(): string {
    return this._name;
  }

  /**
   * Gets the types of the mutation.
   * @function
   * @returns {String[]} The types of the mutation.
   */
  getTypes(): string[] {
{'fraction_non_alphanumeric': 0.1099476439790576, 'fraction_numerical': 0.0, 'mean_word_length': 2.9274486094316807, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '494477', 'n_tokens_mistral': 979, 'n_tokens_neox': 939, 'n_words': 395}