<commit_before>/**
 * @fileoverview Utilities for working with ESLint AST nodes and tokens.
 */
goog.module('googlejs.utils');

const types = goog.require('googlejs.types');

/**
 * Returns true iff the end of the left node is the same as the start of the
 * right node.
 * @param {!Espree.Node} left The left token object.
 * @param {!Espree.Node} right The right token object.
 * @return {boolean} Whether or not the tokens are on the same line.
 */
function nodesShareOneLine(left, right) {
  return left.loc.end.line === right.loc.start.line;
}


/**
 * Returns true iff a node exists entirely on one line.
 * @param {!Espree.Node} node
 * @return {boolean} Whether or not the tokens are on the same line.
 */
function isNodeOneLine(node) {
  return nodesShareOneLine(node, node);
}

/**
 * Returns true iff both tokens start on the same line.
 * @param {!Espree.Node} node1
 * @param {!Espree.Node} node2
 * @return {boolean}
 */
function nodesStartOnSameLine(node1, node2) {
  return node1.loc.start.line === node2.loc.start.line;<commit_msg>chore: change iff to if<commit_after>/**
 * @fileoverview Utilities for working with ESLint AST nodes and tokens.
 */
goog.module('googlejs.utils');

const types = goog.require('googlejs.types');

/**
 * Returns true if the end of the left node is the same as the start of the
 * right node.
 * @param {!Espree.Node} left The left token object.
 * @param {!Espree.Node} right The right token object.
 * @return {boolean} Whether or not the tokens are on the same line.
 */
function nodesShareOneLine(left, right) {
  return left.loc.end.line === right.loc.start.line;
}


/**
 * Returns true if a node exists entirely on one line.
 * @param {!Espree.Node} node
 * @return {boolean} Whether or not the tokens are on the same line.
 */
function isNodeOneLine(node) {
  return nodesShareOneLine(node, node);
}

/**
 * Returns true if both tokens start on the same line.
 * @param {!Espree.Node} node1
 * @param {!Espree.Node} node2
 * @return {boolean}
 */
function nodesStartOnSameLine(node1, node2) {
  return node1.loc.start.line === node2.loc.start.line;
{'fraction_non_alphanumeric': 0.12505943889681406, 'fraction_numerical': 0.005706134094151213, 'mean_word_length': 3.9044289044289044, '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': '6071932', 'n_tokens_mistral': 671, 'n_tokens_neox': 667, 'n_words': 243}