<commit_before>define(function(require) {

  var _ = require('nodash');

  // TextEncoder and TextDecoder will either already be present, or use this shim.
  // Because of the way the spec is defined, we need to get them off the global.
  require('encoding');

  var normalize = require('src/path').normalize;
  var dirname = require('src/path').dirname;
  var basename = require('src/path').basename;
  var isAbsolutePath = require('src/path').isAbsolute;
  var isNullPath = require('src/path').isNull;

  var guid = require('src/shared').guid;
  var hash = require('src/shared').hash;
  var nop = require('src/shared').nop;

  var EExists = require('src/error').EExists;
  var EIsDirectory = require('src/error').EIsDirectory;
  var ENoEntry = require('src/error').ENoEntry;
  var EBusy = require('src/error').EBusy;
  var ENotEmpty = require('src/error').ENotEmpty;
  var ENotDirectory = require('src/error').ENotDirectory;
  var EBadFileDescriptor = require('src/error').EBadFileDescriptor;
  var ENotImplemented = require('src/error').ENotImplemented;
  var ENotMounted = require('src/error').ENotMounted;
  var EInvalid = require('src/error').EInvalid;
  var EIO = require('src/error').EIO;
  var ELoop = require('src/error').ELoop;
  var EFileSystemError = require('src/error').EFileSystemError;
  var ENoAttr = require('src/error').ENoAttr;

  var FILE_SYSTEM_NAME = require('src/constants').FILE_SYSTEM_NAME;
  var FS_FORMAT = require('src/constants').FS_FORMAT;
  var MODE_FILE = require('src/constants').MODE_FILE;
  var MODE_DIRECTORY = require('src/constants').MODE_DIRECTORY;
  var MODE_SYMBOLIC_LINK = require('src/constants').MODE_SYMBOLIC_LINK;
  var MODE_META = require('src/constants').MODE_META;
  var ROOT_DIRECTORY_NAME = require('src/constants').ROOT_DIRECTORY_NAME;
  var SUPER_NODE_ID = require('src/constants').SUPER_NODE_ID;
  var SYMLOOP_MAX = require('src/constants').SYMLOOP_MAX;
  var FS_READY = require('src/constants').FS_READY;
  var FS_PENDING = require('src/constants').FS_PENDING;
  var FS_ERROR = require('src/constants').FS_ERROR;
  var O_READ = require('src/constants').O_READ;
  var O_WRITE = require('src/constants').O_WRITE;
  var O_CREATE = require('src/constants').O_CREATE;
  var O_EXCLUSIVE = require('src/constants').O_EXCLUSIVE;
  var O_TRUNCATE = require('src/constants').O_TRUNCATE;
  var O_APPEND = require('src/constants').O_APPEND;
  var O_FLAGS = require('src/constants').O_FLAGS;
  var XATTR_CREATE = require('src/constants').XATTR_CREATE;
  var XATTR_REPLACE = require('src/constants').XATTR_REPLACE;
  var FS_NOMTIME = require('src/constants').FS_NOMTIME;
  var FS_NOCTIME = require('src/constants').FS_NOCTIME;

  var providers = require('src/providers/providers');
  var adapters = require('src/adapters/adapters');
  var Shell = require('src/shell');

  /*
   * DirectoryEntry
   */

  function DirectoryEntry(id, type) {
    this.id = id;
    this.type = type || MODE_FILE;
  }

  /*
   * OpenFileDescription
   */

  function OpenFileDescription(path, id, flags, position) {
    this.path = path;
    this.id = id;
    this.flags = flags;
    this.position = position;
  }

  /*
   * SuperNode
   */

  function SuperNode(atime, ctime, mtime) {
    var now = Date.now();

    this.id = SUPER_NODE_ID;
    this.mode = MODE_META;
    this.atime = atime || now;
    this.ctime = ctime || now;
    this.mtime = mtime || now;
    this.rnode = guid(); // root node id (randomly generated)
  }

  /*
   * Node
   */

  function Node(id, mode, size, atime, ctime, mtime, flags, xattrs, nlinks, version) {
    var now = Date.now();

    this.id = id || guid();
    this.mode = mode || MODE_FILE;  // node type (file, directory, etc)
    this.size = size || 0; // size (bytes for files, entries for directories)
    this.atime = atime || now; // access time (will mirror ctime after creation)
    this.ctime = ctime || now; // creation/change time
    this.mtime = mtime || now; // modified time
    this.flags = flags || []; // file flags
    this.xattrs = xattrs || {}; // extended attributes
    this.nlinks = nlinks || 0; // links count
    this.version = version || 0; // node version
    this.blksize = undefined; // block size
    this.nblocks = 1; // blocks count
    this.data = guid(); // id for data object
  }

  /*
   * Stats
   */

  function Stats(fileNode, devName) {
    this.node = fileNode.id;
    this.dev = devName;
    this.size = fileNode.size;
    this.nlinks = fileNode.nlinks;
    this.atime = fileNode.atime;
    this.mtime = fileNode.mtime;
    this.ctime = fileNode.ctime;
    this.type = fileNode.mode;
  }

  Stats.prototype.isFile = function() {
    return this.type === MODE_FILE;
  };

  Stats.prototype.isDirectory = function() {
    return this.type === MODE_DIRECTORY;
  };

  Stats.prototype.isBlockDevice = function() {
    return false;
  };

  Stats.prototype.isCharacterDevice = function() {
    return false;
  };

  Stats.prototype.isSymbolicLink = function() {
    return this.type === MODE_SYMBOLIC_LINK;
  };

  /*
   * Update node times. Only passed times are modified (undefined times are ignored)
   * and filesystem flags are examined in order to override update logic.
   */
  function update_node_times(context, path, node, times, callback) {
    // Honour mount flags for how we update times
    var flags = context.flags;
    if(_(flags).contains(FS_NOCTIME)) {
      delete times.ctime;
    }
    if(_(flags).contains(FS_NOMTIME)) {
      delete times.mtime;
    }

    // Only do the update if required (i.e., times are still present)
    var update = false;
    if(times.ctime) {
      node.ctime = times.ctime;
      // We don't do atime tracking for perf reasons, but do mirror ctime
      node.atime = times.ctime;
      update = true;
    }
    if(times.atime) {
      // The only time we explicitly pass atime is when utimes(), futimes() is called.
      // Override ctime mirror here if so
      node.atime = times.atime;
      update = true;
    }<commit_msg>Rebase conflict resolution removed two methods accidentally, replaced them<commit_after>define(function(require) {

  var _ = require('nodash');

  // TextEncoder and TextDecoder will either already be present, or use this shim.
  // Because of the way the spec is defined, we need to get them off the global.
  require('encoding');

  var normalize = require('src/path').normalize;
  var dirname = require('src/path').dirname;
  var basename = require('src/path').basename;
  var isAbsolutePath = require('src/path').isAbsolute;
  var isNullPath = require('src/path').isNull;

  var guid = require('src/shared').guid;
  var hash = require('src/shared').hash;
  var nop = require('src/shared').nop;

  var EExists = require('src/error').EExists;
  var EIsDirectory = require('src/error').EIsDirectory;
  var ENoEntry = require('src/error').ENoEntry;
  var EBusy = require('src/error').EBusy;
  var ENotEmpty = require('src/error').ENotEmpty;
  var ENotDirectory = require('src/error').ENotDirectory;
  var EBadFileDescriptor = require('src/error').EBadFileDescriptor;
  var ENotImplemented = require('src/error').ENotImplemented;
  var ENotMounted = require('src/error').ENotMounted;
  var EInvalid = require('src/error').EInvalid;
  var EIO = require('src/error').EIO;
  var ELoop = require('src/error').ELoop;
  var EFileSystemError = require('src/error').EFileSystemError;
  var ENoAttr = require('src/error').ENoAttr;

  var FILE_SYSTEM_NAME = require('src/constants').FILE_SYSTEM_NAME;
  var FS_FORMAT = require('src/constants').FS_FORMAT;
  var MODE_FILE = require('src/constants').MODE_FILE;
  var MODE_DIRECTORY = require('src/constants').MODE_DIRECTORY;
  var MODE_SYMBOLIC_LINK = require('src/constants').MODE_SYMBOLIC_LINK;
  var MODE_META = require('src/constants').MODE_META;
  var ROOT_DIRECTORY_NAME = require('src/constants').ROOT_DIRECTORY_NAME;
  var SUPER_NODE_ID = require('src/constants').SUPER_NODE_ID;
  var SYMLOOP_MAX = require('src/constants').SYMLOOP_MAX;
  var FS_READY = require('src/constants').FS_READY;
  var FS_PENDING = require('src/constants').FS_PENDING;
  var FS_ERROR = require('src/constants').FS_ERROR;
  var O_READ = require('src/constants').O_READ;
  var O_WRITE = require('src/constants').O_WRITE;
  var O_CREATE = require('src/constants').O_CREATE;
  var O_EXCLUSIVE = require('src/constants').O_EXCLUSIVE;
  var O_TRUNCATE = require('src/constants').O_TRUNCATE;
  var O_APPEND = require('src/constants').O_APPEND;
  var O_FLAGS = require('src/constants').O_FLAGS;
  var XATTR_CREATE = require('src/constants').XATTR_CREATE;
  var XATTR_REPLACE = require('src/constants').XATTR_REPLACE;
  var FS_NOMTIME = require('src/constants').FS_NOMTIME;
  var FS_NOCTIME = require('src/constants').FS_NOCTIME;

  var providers = require('src/providers/providers');
  var adapters = require('src/adapters/adapters');
  var Shell = require('src/shell');

  /*
   * DirectoryEntry
   */

  function DirectoryEntry(id, type) {
    this.id = id;
    this.type = type || MODE_FILE;
  }

  /*
   * OpenFileDescription
   */

  function OpenFileDescription(path, id, flags, position) {
    this.path = path;
    this.id = id;
    this.flags = flags;
    this.position = position;
  }

  /*
   * SuperNode
   */

  function SuperNode(atime, ctime, mtime) {
    var now = Date.now();

    this.id = SUPER_NODE_ID;
    this.mode = MODE_META;
    this.atime = atime || now;
    this.ctime = ctime || now;
    this.mtime = mtime || now;
    this.rnode = guid(); // root node id (randomly generated)
  }

  /*
   * Node
   */

  function Node(id, mode, size, atime, ctime, mtime, flags, xattrs, nlinks, version) {
    var now = Date.now();

    this.id = id || guid();
    this.mode = mode || MODE_FILE;  // node type (file, directory, etc)
    this.size = size || 0; // size (bytes for files, entries for directories)
    this.atime = atime || now; // access time (will mirror ctime after creation)
    this.ctime = ctime || now; // creation/change time
    this.mtime = mtime || now; // modified time
    this.flags = flags || []; // file flags
    this.xattrs = xattrs || {}; // extended attributes
    this.nlinks = nlinks || 0; // links count
    this.version = version || 0; // node version
    this.blksize = undefined; // block size
    this.nblocks = 1; // blocks count
    this.data = guid(); // id for data object
  }

  /*
   * Stats
   */

  function Stats(fileNode, devName) {
    this.node = fileNode.id;
    this.dev = devName;
    this.size = fileNode.size;
    this.nlinks = fileNode.nlinks;
    this.atime = fileNode.atime;
    this.mtime = fileNode.mtime;
    this.ctime = fileNode.ctime;
    this.type = fileNode.mode;
  }

  Stats.prototype.isFile = function() {
    return this.type === MODE_FILE;
  };

  Stats.prototype.isDirectory = function() {
    return this.type === MODE_DIRECTORY;
  };

  Stats.prototype.isBlockDevice = function() {
    return false;
  };

  Stats.prototype.isCharacterDevice = function() {
    return false;
  };

  Stats.prototype.isSymbolicLink = function() {
    return this.type === MODE_SYMBOLIC_LINK;
  };

  Stats.prototype.isFIFO = function() {
    return false;
  };

  Stats.prototype.isSocket = function() {
    return false;
  };

  /*
   * Update node times. Only passed times are modified (undefined times are ignored)
   * and filesystem flags are examined in order to override update logic.
   */
  function update_node_times(context, path, node, times, callback) {
    // Honour mount flags for how we update times
    var flags = context.flags;
    if(_(flags).contains(FS_NOCTIME)) {
      delete times.ctime;
    }
    if(_(flags).contains(FS_NOMTIME)) {
      delete times.mtime;
    }

    // Only do the update if required (i.e., times are still present)
    var update = false;
    if(times.ctime) {
      node.ctime = times.ctime;
      // We don't do atime tracking for perf reasons, but do mirror ctime
      node.atime = times.ctime;
      update = true;
    }
    if(times.atime) {
      // The only time we explicitly pass atime is when utimes(), futimes() is called.
      // Override ctime mirror here if so
      node.atime = times.atime;
      update = true;
    }
{'fraction_non_alphanumeric': 0.1352820090572252, 'fraction_numerical': 0.0006587072869493619, 'mean_word_length': 3.3927667269439423, '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': '1711476', 'n_tokens_mistral': 4054, 'n_tokens_neox': 3984, 'n_words': 938}