<commit_before>exports._params = function (node, print) {
  this.push("(");
  this.printJoin(print, node.params, ", ");
  this.push(")");
};

exports._method = function (kind, key, value, print) {
  if (value.async) {
    this.push("async ");
  }

  if (!kind || kind === "init") {
    if (value.generator) {
      this.push("*");
    }
  } else {
    assert.ok(kind === "get" || kind === "set");
    this.push(kind + " ");
  }

  print(key);
  this._params(value, print);
  print(value.body);
};

exports.MethodDefinition = function (node, print) {
  if (node.static) {
    this.push("static ");
  }

  this._method(
    node.kind,
    node.key,
    node.value,
    print
  );
};

exports.ReturnStatement = function (node, print) {
  this.push("return");
  if (node.argument) {
    this.push(" ");
    print(node.argument);
  }
  this.push(";");
};

exports.FunctionDeclaration =
exports.FunctionExpression = function (node, print) {
  if (node.async) this.push("async ");
  this.push("function");
  if (node.generator) this.push("*");
  if (node.id) {
    this.push(" ");
    print(node.id);
    this.push(" ");
  }
  this._params(node, print);
  this.push(" ");
  print(node.body);
};

exports.ArrowFunctionExpression = function (node, print) {
  if (node.async) this.push("async ");
  if (node.params.length === 1) {
    print(node.params[0]);
  } else {
    this._params(node, print);
  }
  this.push(" => ");
  print(node.body);
};<commit_msg>generator: remove redundant async tests<commit_after>exports._params = function (node, print) {
  var self = this;

  this.push("(");

  this.printJoin(print, node.params, ", ", {
    iterator: function (param, i) {
      print(param);

      var def = node.defaults && node.defaults[i];
      if (def) {
        self.push(" = ");
        print(def);
      }
    }
  });

  if (node.rest) {
    if (node.params.length) {
      this.push(", ");
    }

    this.push("...");
    print(node.rest);
  }

  this.push(")");
};

exports._method = function (node, print) {
  var value = node.value;
  var kind  = node.kind;
  var key   = node.key;

  if (!kind || kind === "init") {
    if (value.generator) {
      this.push("*");
    }
  } else {
    this.push(kind + " ");
  }

  if (node.computed) {
    this.push("[");
    print(key);
    this.push("]");
  } else {
    print(key);
  }

  this._params(value, print);
  print(value.body);
};

exports.MethodDefinition = function (node, print) {
  if (node.static) {
    this.push("static ");
  }

  this._method(node, print);
};

exports.ReturnStatement = function (node, print) {
  this.push("return");
  if (node.argument) {
    this.push(" ");
    print(node.argument);
  }
  this.semicolon();
};

exports.FunctionDeclaration =
exports.FunctionExpression = function (node, print) {
  this.push("function");
  if (node.generator) this.push("*");
  if (node.id) {
    this.push(" ");
    print(node.id);
    this.push(" ");
  }
  this._params(node, print);
  this.push(" ");
  print(node.body);
};

exports.ArrowFunctionExpression = function (node, print) {
  if (node.params.length === 1 && !node.defaults.length && !node.rest && node.params[0].type === "Identifier") {
    print(node.params[0]);
  } else {
    this._params(node, print);
  }

  this.push(" => ");
  print(node.body);
};
{'fraction_non_alphanumeric': 0.20523751522533495, 'fraction_numerical': 0.0015225334957369061, 'mean_word_length': 2.9153754469606676, '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': '3078168', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1154, 'n_words': 214}