<commit_before>define([
        '../Core/defined',
        '../Core/DeveloperError',
    ], function(
        defined,
        DeveloperError) {
    'use strict';

    // Note that this fails if your string looks like
    // searchString[singleCharacter]searchString
    function replaceInSourceString(str, replacement, splitSource) {
        var regexStr = '(^|[^\\w])(' + str + ')($|[^\\w])';
        var regex = new RegExp(regexStr, 'g');

        for (var number = 0; number < splitSource.length; ++number) {
            var line = splitSource[number];
            splitSource[number] = line.replace(regex, '$1' + replacement + '$3');
        }
    }

    function replaceInSourceRegex(regex, replacement, splitSource) {
        for (var number = 0; number < splitSource.length; ++number) {
            var line = splitSource[number];
            splitSource[number] = line.replace(regex, replacement);
        }
    }

    function findInSource(str, splitSource) {
        var regexStr = '(^|[^\\w])(' + str + ')($|[^\\w])';
        var regex = new RegExp(regexStr, 'g');
        for (var number = 0; number < splitSource.length; ++number) {
            var line = splitSource[number];
            if (regex.test(line)) {
                return true;
            }
        }
        return false;
    }

    function compileSource(splitSource) {
        var wholeSource = '';
        for (var number = 0; number < splitSource.length; ++number) {
            wholeSource += splitSource[number] + '\n';
        }
        return wholeSource;
    }

    function setAdd(variable, set1) {
        if (set1.indexOf(variable) === -1) {
            set1.push(variable);
        }
    }

    function getVariablePreprocessorBranch(variablesThatWeCareAbout, splitSource) {
        var variableMap = {};
        var negativeMap = {};

        var numVariablesWeCareAbout = variablesThatWeCareAbout.length;
        for (var a = 0; a < numVariablesWeCareAbout; ++a) {
            var variableThatWeCareAbout = variablesThatWeCareAbout[a];
            variableMap[variableThatWeCareAbout] = [null];
        }

        var stack = [];
        for (var i = 0; i < splitSource.length; ++i) {
            var line = splitSource[i];
            var hasIF = /(#ifdef|#if)/g.test(line);
            var hasELSE = /#else/g.test(line);
            var hasENDIF = /#endif/g.test(line);

            if (hasIF) {
                stack.push(line);
            } else if (hasELSE) {
                var top = stack[stack.length - 1];
                var op = top.replace('ifdef', 'ifndef');
                if (/if/g.test(op)) {
                    op = op.replace(/(#if\s+)(\S*)([^]*)/, '$1!($2)$3');
                }
                stack.pop();
                stack.push(op);

                negativeMap[top] = op;
                negativeMap[op] = top;
            } else if (hasENDIF) {
                stack.pop();
            } else if (!/layout/g.test(line)) {
                for (var varIndex = 0; varIndex < numVariablesWeCareAbout; ++varIndex) {
                    var varName = variablesThatWeCareAbout[varIndex];
                    if (line.indexOf(varName) !== -1) {
                        if (variableMap[varName].length === 1 && variableMap[varName][0] === null) {
                            variableMap[varName] = stack.slice();
                        } else {
                            variableMap[varName] = variableMap[varName].filter(function(x) {
                                return stack.indexOf(x) >= 0;
                            });
                        }
                    }
                }
            }
        }

        for (var care in variableMap) {
            if (variableMap.hasOwnProperty(care)) {
                if (variableMap.length === 1 && variableMap[0] === null) {
                    variableMap.splice(0, 1);
                }
            }<commit_msg>Removes negativeMap<commit_after>define([
        '../Core/defined',
        '../Core/DeveloperError',
    ], function(
        defined,
        DeveloperError) {
    'use strict';

    // Note that this fails if your string looks like
    // searchString[singleCharacter]searchString
    function replaceInSourceString(str, replacement, splitSource) {
        var regexStr = '(^|[^\\w])(' + str + ')($|[^\\w])';
        var regex = new RegExp(regexStr, 'g');

        for (var number = 0; number < splitSource.length; ++number) {
            var line = splitSource[number];
            splitSource[number] = line.replace(regex, '$1' + replacement + '$3');
        }
    }

    function replaceInSourceRegex(regex, replacement, splitSource) {
        for (var number = 0; number < splitSource.length; ++number) {
            var line = splitSource[number];
            splitSource[number] = line.replace(regex, replacement);
        }
    }

    function findInSource(str, splitSource) {
        var regexStr = '(^|[^\\w])(' + str + ')($|[^\\w])';
        var regex = new RegExp(regexStr, 'g');
        for (var number = 0; number < splitSource.length; ++number) {
            var line = splitSource[number];
            if (regex.test(line)) {
                return true;
            }
        }
        return false;
    }

    function compileSource(splitSource) {
        var wholeSource = '';
        for (var number = 0; number < splitSource.length; ++number) {
            wholeSource += splitSource[number] + '\n';
        }
        return wholeSource;
    }

    function setAdd(variable, set1) {
        if (set1.indexOf(variable) === -1) {
            set1.push(variable);
        }
    }

    function getVariablePreprocessorBranch(variablesThatWeCareAbout, splitSource) {
        var variableMap = {};

        var numVariablesWeCareAbout = variablesThatWeCareAbout.length;
        for (var a = 0; a < numVariablesWeCareAbout; ++a) {
            var variableThatWeCareAbout = variablesThatWeCareAbout[a];
            variableMap[variableThatWeCareAbout] = [null];
        }

        var stack = [];
        for (var i = 0; i < splitSource.length; ++i) {
            var line = splitSource[i];
            var hasIF = /(#ifdef|#if)/g.test(line);
            var hasELSE = /#else/g.test(line);
            var hasENDIF = /#endif/g.test(line);

            if (hasIF) {
                stack.push(line);
            } else if (hasELSE) {
                var top = stack[stack.length - 1];
                var op = top.replace('ifdef', 'ifndef');
                if (/if/g.test(op)) {
                    op = op.replace(/(#if\s+)(\S*)([^]*)/, '$1!($2)$3');
                }
                stack.pop();
                stack.push(op);
            } else if (hasENDIF) {
                stack.pop();
            } else if (!/layout/g.test(line)) {
                for (var varIndex = 0; varIndex < numVariablesWeCareAbout; ++varIndex) {
                    var varName = variablesThatWeCareAbout[varIndex];
                    if (line.indexOf(varName) !== -1) {
                        if (variableMap[varName].length === 1 && variableMap[varName][0] === null) {
                            variableMap[varName] = stack.slice();
                        } else {
                            variableMap[varName] = variableMap[varName].filter(function(x) {
                                return stack.indexOf(x) >= 0;
                            });
                        }
                    }
                }
            }
        }

        for (var care in variableMap) {
            if (variableMap.hasOwnProperty(care)) {
                if (variableMap.length === 1 && variableMap[0] === null) {
                    variableMap.splice(0, 1);
                }
            }
{'fraction_non_alphanumeric': 0.13723196881091618, 'fraction_numerical': 0.00649772579597141, 'mean_word_length': 1.5679012345679013, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 5, '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': '909027', 'n_tokens_mistral': 2216, 'n_tokens_neox': 2099, 'n_words': 457}