<commit_before>//
//  RepositoryCodeDirectoryViewController.swift
//  Freetime
//
//  Created by <NAME> on 10/8/17.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import UIKit
import IGListKit

final class RepositoryCodeDirectoryViewController: BaseListViewController<NSNumber>,
BaseListViewControllerDataSource,
ListSingleSectionControllerDelegate {

    private let client: GithubClient
    private let branch: String
    private let path: FilePath
    private let repo: RepositoryDetails
    private var files = [RepositoryFile]()

    init(
        client: GithubClient,
        repo: RepositoryDetails,
        branch: String,
        path: FilePath
        ) {
        self.client = client
        self.repo = repo
        self.branch = branch
        self.path = path

        super.init(
            emptyErrorMessage: NSLocalizedString("Cannot load issues.", comment: ""),
            dataSource: self
        )

        // set on init in case used by Tabman
        self.title = NSLocalizedString("Code", comment: "")
    }

    static func createRoot(
        client: GithubClient,
        repo: RepositoryDetails,
        branch: String
        ) -> RepositoryCodeDirectoryViewController {
        return RepositoryCodeDirectoryViewController(
            client: client,
            repo: repo,
            branch: branch,
            path: FilePath(components: [])
        )
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    override func viewDidLoad() {<commit_msg>error message for repo dir (#1350)<commit_after>//
//  RepositoryCodeDirectoryViewController.swift
//  Freetime
//
//  Created by <NAME> on 10/8/17.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import UIKit
import IGListKit

final class RepositoryCodeDirectoryViewController: BaseListViewController<NSNumber>,
BaseListViewControllerDataSource,
ListSingleSectionControllerDelegate {

    private let client: GithubClient
    private let branch: String
    private let path: FilePath
    private let repo: RepositoryDetails
    private var files = [RepositoryFile]()

    init(
        client: GithubClient,
        repo: RepositoryDetails,
        branch: String,
        path: FilePath
        ) {
        self.client = client
        self.repo = repo
        self.branch = branch
        self.path = path

        super.init(
            emptyErrorMessage: NSLocalizedString("Cannot load directory.", comment: ""),
            dataSource: self
        )

        // set on init in case used by Tabman
        self.title = NSLocalizedString("Code", comment: "")
    }

    static func createRoot(
        client: GithubClient,
        repo: RepositoryDetails,
        branch: String
        ) -> RepositoryCodeDirectoryViewController {
        return RepositoryCodeDirectoryViewController(
            client: client,
            repo: repo,
            branch: branch,
            path: FilePath(components: [])
        )
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    override func viewDidLoad() {
{'fraction_non_alphanumeric': 0.08359821996185633, 'fraction_numerical': 0.006993006993006993, 'mean_word_length': 2.3693790149892933, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '1461744', 'n_tokens_mistral': 844, 'n_tokens_neox': 795, 'n_words': 231}