<commit_before>/*jshint laxbreak: true*/
/*jslint node: true, for: true*/
(function biddle() {
    "use strict";
    var child     = require("child_process").exec,
        path      = require("path"),
        fs        = require("fs"),
        http      = require("http"),
        https     = require("https"),
        errout    = function biddle_errout(errData) {
            var error = (typeof errData.error !== "string" || errData.error.toString().indexOf("Error: ") === 0)
                ? errData.error
                : "Error: " + errData.error;
            console.log("Function: " + errData.name);
            console.log(error);
            process.exit(1);
        },
        input     = (function biddle_input() {
            var a = [],
                b = 0,
                c = process.argv.length,
                paths = process.argv[0].split(path.sep);
            if (paths[paths.length - 1] === "node") {
                b = 1;
            }
            do {
                a.push(process.argv[b]);
                b += 1;
            } while (b < c);
            if (a.length < 1) {
                a = ["", "", ""];
            }
            a[0] = a[0].toLowerCase();
            return a;
        }()),
        data      = {
            abspath  : (function biddle_abspath() {
                var absarr  = input[0].split(path.sep);
                absarr.pop();
                return absarr.join(path.sep) + path.sep;
            }()),
            address  : {},
            command  : (input.length > 1)
                ? input[1].toLowerCase()
                : "",
            fileName : "",
            hashFile : "",
            hashZip  : "",
            installed: {},
            platform : process
                .platform
                .replace(/\s+/g, "")
                .toLowerCase(),
            packjson : {},
            published: {}
        },
        apps      = {
            commas   : function biddle_commas(number) {
                var str = String(number),
                    arr = [],
                    a   = str.length;
                if (a < 4) {
                    return str;
                }
                arr = String(number).split("");
                a   = arr.length;
                do {
                    a      -= 3;
                    arr[a] = "," + arr[a];
                } while (a > 3);
                return arr.join("");
            },
            getFileName: function biddle_getFileName() {
                var paths = [];
                if (input[2] === undefined) {
                    return "download.xxx";
                }
                paths = input[2].split(path.sep);
                if (paths[paths.length - 1].length > 0) {
                    return paths[paths.length - 1];
                }
                do {
                    paths.pop();
                } while (paths.length > 0 && paths[paths.length - 1] === "");
                if (paths.length < 1) {
                    return "download.xxx";
                }
                return paths[paths.length - 1];
            },
            getpjson : function biddle_getpjson(callback) {
                var file = input[2].replace(/(\/|\\)$/, "") + path.sep + "package.json";
                fs.readFile(file, "utf8", function biddle_getpjson_readfile(err, fileData) {
                    if (err !== null && err !== undefined) {
                        return errout({
                            name: "biddle_getpjson_callback",
                            error: err
                        });
                    }
                    data.packjson = JSON.parse(fileData);
                    if (data.packjson.name === undefined) {
                        return errout({
                            name: "biddle_getpjson_readfile",
                            error: "The package.json file is missing the required \x1B[31mname\x1B[39m property."
                        });
                    }
                    if (data.packjson.version === undefined) {
                        return errout({
                            name: "biddle_getpjson_readfile",
                            error: "The package.json file is missing the required \x1B[31mversion\x1B[39m property."
                        });
                    }
                    if (typeof data.packjson.name !== "string") {
                        if (typeof data.packjson.name === "object" && data.packjson.name !== null) {
                            data.packjson.name = JSON.stringify(data.packjson.name);
                        } else {
                            data.packjson.name = String(data.packjson.name);
                        }
                    }
                    if (typeof data.packjson.version !== "string") {
                        if (typeof data.packjson.version === "object" && data.packjson.version !== null) {
                            data.packjson.version = JSON.stringify(data.packjson.version);<commit_msg>correcting a file name<commit_after>/*jshint laxbreak: true*/
/*jslint node: true, for: true*/
(function biddle() {
    "use strict";
    var child     = require("child_process").exec,
        path      = require("path"),
        fs        = require("fs"),
        http      = require("http"),
        https     = require("https"),
        errout    = function biddle_errout(errData) {
            var error = (typeof errData.error !== "string" || errData.error.toString().indexOf("Error: ") === 0)
                ? errData.error
                : "Error: " + errData.error;
            console.log("Function: " + errData.name);
            console.log(error);
            process.exit(1);
        },
        input     = (function biddle_input() {
            var a = [],
                b = 0,
                c = process.argv.length,
                paths = process.argv[0].split(path.sep);
            if (paths[paths.length - 1] === "node") {
                b = 1;
            }
            do {
                a.push(process.argv[b]);
                b += 1;
            } while (b < c);
            if (a.length < 1) {
                a = ["", "", ""];
            }
            a[0] = a[0].toLowerCase();
            return a;
        }()),
        data      = {
            abspath  : (function biddle_abspath() {
                var absarr  = input[0].split(path.sep);
                absarr.pop();
                return absarr.join(path.sep) + path.sep;
            }()),
            address  : {},
            command  : (input.length > 1)
                ? input[1].toLowerCase()
                : "",
            fileName : "",
            hashFile : "",
            hashZip  : "",
            installed: {},
            platform : process
                .platform
                .replace(/\s+/g, "")
                .toLowerCase(),
            packjson : {},
            published: {}
        },
        apps      = {
            commas   : function biddle_commas(number) {
                var str = String(number),
                    arr = [],
                    a   = str.length;
                if (a < 4) {
                    return str;
                }
                arr = String(number).split("");
                a   = arr.length;
                do {
                    a      -= 3;
                    arr[a] = "," + arr[a];
                } while (a > 3);
                return arr.join("");
            },
            getFileName: function biddle_getFileName() {
                var paths = [];
                if (input[2] === undefined) {
                    return "download.xxx";
                }
                paths = input[2].split(path.sep);
                if (paths[paths.length - 1].length > 0) {
                    return paths[paths.length - 1];
                }
                do {
                    paths.pop();
                } while (paths.length > 0 && paths[paths.length - 1] === "");
                if (paths.length < 1) {
                    return "download.xxx";
                }
                return paths[paths.length - 1];
            },
            getpjson : function biddle_getpjson(callback) {
                var file = input[2].replace(/(\/|\\)$/, "") + path.sep + "package.json";
                fs.readFile(file, "utf8", function biddle_getpjson_readfile(err, fileData) {
                    if (err !== null && err !== undefined) {
                        return errout({
                            name: "biddle_getpjson_readFile",
                            error: err
                        });
                    }
                    data.packjson = JSON.parse(fileData);
                    if (data.packjson.name === undefined) {
                        return errout({
                            name: "biddle_getpjson_readfile",
                            error: "The package.json file is missing the required \x1B[31mname\x1B[39m property."
                        });
                    }
                    if (data.packjson.version === undefined) {
                        return errout({
                            name: "biddle_getpjson_readfile",
                            error: "The package.json file is missing the required \x1B[31mversion\x1B[39m property."
                        });
                    }
                    if (typeof data.packjson.name !== "string") {
                        if (typeof data.packjson.name === "object" && data.packjson.name !== null) {
                            data.packjson.name = JSON.stringify(data.packjson.name);
                        } else {
                            data.packjson.name = String(data.packjson.name);
                        }
                    }
                    if (typeof data.packjson.version !== "string") {
                        if (typeof data.packjson.version === "object" && data.packjson.version !== null) {
                            data.packjson.version = JSON.stringify(data.packjson.version);
{'fraction_non_alphanumeric': 0.12783835150545164, 'fraction_numerical': 0.007802340702210663, 'mean_word_length': 0.9988004798080767, 'pattern_counts': {'":': 0, '<': 11, '<?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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3035291', 'n_tokens_mistral': 2640, 'n_tokens_neox': 2479, 'n_words': 500}