<commit_before>module.exports = function(babel) {
  var t = babel.types

  var types = [
    'ArrowFunctionExpression',
    'AssignmentPattern',
    'AssignmentExpression',
    'VariableDeclarator',
    'ReturnStatement',
    'ConditionalExpression'
  ]

  var isAllArrayExpression = function(constantViolations) {
    return constantViolations.length === 0 ||
      constantViolations.every(function(violation) {
        return violation.isAssignmentExpression() &&
          violation.get('right').isArrayExpression()
      })
  }

  return {
    visitor: {
      CallExpression: function(path) {
        var node = path.node
        var scope = path.scope
        var callee = node.callee

        if (
          !callee.property ||
          callee.property.name !== 'push' || 
          node.arguments > 1 ||
          callee.object.type !== 'Identifier'
        ) return

        var binding = scope.getBinding(callee.object.name)
        if (
          !binding.path.isVariableDeclarator() ||
          !isAllArrayExpression(binding.constantViolations) ||
          binding.path.get('init').type !== 'ArrayExpression'
        ) return
<commit_msg>Should be arguments.length !== 1<commit_after>module.exports = function(babel) {
  var t = babel.types

  var types = [
    'ArrowFunctionExpression',
    'AssignmentPattern',
    'AssignmentExpression',
    'VariableDeclarator',
    'ReturnStatement',
    'ConditionalExpression'
  ]

  var isAllArrayExpression = function(constantViolations) {
    return constantViolations.length === 0 ||
      constantViolations.every(function(violation) {
        return violation.isAssignmentExpression() &&
          violation.get('right').isArrayExpression()
      })
  }

  return {
    visitor: {
      CallExpression: function(path) {
        var node = path.node
        var scope = path.scope
        var callee = node.callee
        var arguments = node.arguments

        if (
          !callee.property ||
          callee.property.name !== 'push' || 
          (arguments && arguments.length !== 1) ||
          callee.object.type !== 'Identifier'
        ) return

        var binding = scope.getBinding(callee.object.name)
        if (
          !binding.path.isVariableDeclarator() ||
          !isAllArrayExpression(binding.constantViolations) ||
          binding.path.get('init').type !== 'ArrayExpression'
        ) return

{'fraction_non_alphanumeric': 0.11656184486373165, 'fraction_numerical': 0.0020964360587002098, 'mean_word_length': 2.473071324599709, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1280891', 'n_tokens_mistral': 656, 'n_tokens_neox': 654, 'n_words': 115}