<commit_before>addConcept = function () {
    if (viewMode) return;
    var addOrSearch = $("#sidebarAddCompetencies").val();
    if (addOrSearch == "search") {
        showPage("#findCompetencySection", framework);
    } else if (addOrSearch == "new") {
        previousSelectedCompetency = selectedCompetency;
        var c = new EcConcept();
        c.generateId(repo.selectedServer);
        if (EcIdentityManager.ids.length > 0)
            c.addOwner(EcIdentityManager.ids[0].ppk.toPk());
        c["skos:definition"] = "New Concept";
        c["skos:inScheme"] = framework.shortId();
        if (selectedCompetency != null) {
            if (selectedCompetency["skos:narrower"] == null)
                selectedCompetency["skos:narrower"] = [];
            EcArray.setAdd(selectedCompetency["skos:narrower"], c.shortId());
            if (c["skos:broader"] == null)
                c["skos:broader"] = [];
            EcArray.setAdd(c["skos:broader"], selectedCompetency.shortId());
            EcRepository.save(c, function () {
                EcRepository.save(selectedCompetency, function () {
                    selectedCompetency = c;
                    refreshSidebar();
                    editSidebar();
                    $("#sidebarNameInput").focus();
                    afterSave();
                }, error);
            }, error);
        } else {
            if (framework["skos:hasTopConcept"] == null)
                framework["skos:hasTopConcept"] = [];
            EcArray.setAdd(framework["skos:hasTopConcept"], c.shortId());
            c.topConceptOf = framework.shortId();
            EcRepository.save(c, function () {
                EcRepository.save(framework, function () {
                    selectedCompetency = c;<commit_msg>#72, considering the updates to #76.<commit_after>addConcept = function () {
    if (viewMode) return;
    var addOrSearch = $("#sidebarAddCompetencies").val();
    if (addOrSearch == "search") {
        showPage("#findCompetencySection", framework);
    } else if (addOrSearch == "new") {
        previousSelectedCompetency = selectedCompetency;
        var c = new EcConcept();
        c.generateId(repo.selectedServer);
        if (EcIdentityManager.ids.length > 0)
            c.addOwner(EcIdentityManager.ids[0].ppk.toPk());
        c["skos:prefLabel"] = "New Concept";
        c["skos:inScheme"] = framework.shortId();
        if (selectedCompetency != null) {
            if (selectedCompetency["skos:narrower"] == null)
                selectedCompetency["skos:narrower"] = [];
            EcArray.setAdd(selectedCompetency["skos:narrower"], c.shortId());
            if (c["skos:broader"] == null)
                c["skos:broader"] = [];
            EcArray.setAdd(c["skos:broader"], selectedCompetency.shortId());
            EcRepository.save(c, function () {
                EcRepository.save(selectedCompetency, function () {
                    selectedCompetency = c;
                    refreshSidebar();
                    editSidebar();
                    $("#sidebarNameInput").focus();
                    afterSave();
                }, error);
            }, error);
        } else {
            if (framework["skos:hasTopConcept"] == null)
                framework["skos:hasTopConcept"] = [];
            EcArray.setAdd(framework["skos:hasTopConcept"], c.shortId());
            c.topConceptOf = framework.shortId();
            EcRepository.save(c, function () {
                EcRepository.save(framework, function () {
                    selectedCompetency = c;
{'fraction_non_alphanumeric': 0.14149354295339697, 'fraction_numerical': 0.0022459292532285235, 'mean_word_length': 2.090199479618387, 'pattern_counts': {'":': 0, '<': 3, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4465931', 'n_tokens_mistral': 1006, 'n_tokens_neox': 972, 'n_words': 154}