<commit_before>part of distributed_dart;

/// Represents a file in the tree.
class FileNode {
  /// File name of the Dart file the object represent.
  String get name => _name;
  String _name;
  
  /**
   *  Path to the Dart file the object represent. The path is made as short as
   *  possible.
   */
  Path get path => _path;
  Path _path;
  
  /// SHA1 checksum of the Dart file the object represent as a [String].
  String get fileHashString => _hashListToString(_fileHash);
  List<int> get fileHash => _fileHash.toList(growable: false);
  List<int> _fileHash;
  
  /// Create FileNode instance. Should only be used by [DartCodeDb].
  FileNode(this._name, this._path, this._fileHash);
  
  Set<FileNode> getFileNodes(Set<FileNode> set) {
    set.add(this);
    return set;
  }
  
  FileNode get copy => new FileNode(_name, _path, _fileHash);
  
  int get hashCode => _path.hashCode;
  
  bool operator ==(other) {
    if (identical(this, other)) {
      return true;
    }
    
    if (other is FileNode) {
      if (_name != other._name) return false;
      if (_path.toString() != other._path.toString()) return false;
      if (!_compareLists(this._fileHash, other._fileHash)) return false;
      
      return true;
    } else {
      return false;
    }
  }
}<commit_msg>Forgot getFileNodes in FileNode<commit_after>part of distributed_dart;

/// Represents a file in the tree without dependencies.
class FileNode {
  String _name;
  Path _path;
  List<int> _fileHash;
  
  /// File name of the Dart file the object represent.
  String get name => _name;
  
  /// [Path] to the Dart file the object represent.
  Path get path => _path;
  
  /// SHA1 checksum of the Dart file the object represent as a [String].
  String get fileHashString => _hashListToString(_fileHash);
  
  List<int> get fileHash => _fileHash.toList(growable: false);
  
  /// Create FileNode instance. Should only be used by [DartCodeDb].
  FileNode(this._name, this._path, this._fileHash);
  
  Set<FileNode> getFileNodes([Set<FileNode> set]) {
    if (set == null) {
      set = new Set<FileNode>();
    }
    
    set.add(this);
    return set;
  }
  
  FileNode get copy => new FileNode(_name, _path, _fileHash);
  
  int get hashCode => _path.hashCode;
  
  bool operator ==(other) {
    if (identical(this, other)) {
      return true;
    }
    
    if (other is FileNode) {
      if (_name != other._name) return false;
      if (_path.toString() != other._path.toString()) return false;
      if (!_compareLists(this._fileHash, other._fileHash)) return false;
      
      return true;
    } else {
      return false;
    }
  }
}
{'fraction_non_alphanumeric': 0.11255246089278902, 'fraction_numerical': 0.0007630675314765357, 'mean_word_length': 2.7835497835497836, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 24, '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': '5093890', 'n_tokens_mistral': 849, 'n_tokens_neox': 838, 'n_words': 267}