<commit_before>var assert = require("assert");
var types = require("./types");
var isArray = types.builtInTypes.array;
var isObject = types.builtInTypes.object;
var linesModule = require("./lines");
var fromString = linesModule.fromString;
var Lines = linesModule.Lines;
var concat = linesModule.concat;
var comparePos = require("./util").comparePos;

exports.add = function(ast, lines) {
    var comments = ast.comments;
    assert.ok(comments instanceof Array);
    delete ast.comments;

    assert.ok(lines instanceof Lines);

    var pt = new PosTracker,<commit_msg>Don't try to relocate comments if there aren't any.<commit_after>var assert = require("assert");
var types = require("./types");
var isArray = types.builtInTypes.array;
var isObject = types.builtInTypes.object;
var linesModule = require("./lines");
var fromString = linesModule.fromString;
var Lines = linesModule.Lines;
var concat = linesModule.concat;
var comparePos = require("./util").comparePos;

exports.add = function(ast, lines) {
    var comments = ast.comments;
    if (!isArray.check(comments)) {
        return;
    }
    delete ast.comments;

    assert.ok(lines instanceof Lines);

    var pt = new PosTracker,
{'fraction_non_alphanumeric': 0.1273031825795645, 'fraction_numerical': 0.0, 'mean_word_length': 4.382882882882883, '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': '2589644', 'n_tokens_mistral': 352, 'n_tokens_neox': 342, 'n_words': 97}