<commit_before>define(['dojo/_base/declare'], function(declare) {
    return declare(null, {

        constructor: function(){

        },

        handleQueryParams: function(config,queryParams) {
            var values, storeValue, valuesLabel ;
            var storeTracks = {};
            Object.keys(queryParams).forEach(function(queryParam){
                if(queryParam.indexOf('addStore\.')==0){
                    values = queryParam.split("\.");
                    storeValue = values[1];
                    valuesLabel = values[2];
                    if(!config.stores[storeValue]){
                        config.stores[storeValue] = {};
                    }
                    config.stores[storeValue][valuesLabel] = queryParams[queryParam];
                }
                else
                if(queryParam.indexOf('addTracks\.')==0){
                    values = queryParam.split("\.");
                    storeValue = values[1];
                    valuesLabel = values[2];

                    if(!storeTracks[storeValue]){
                        storeTracks[storeValue] = {};
                    }
                    storeTracks[storeValue][valuesLabel] = queryParams[queryParam];
                }
            });

            if(storeTracks){
                // add one for each
                for(track in storeTracks){
                    if(!config.tracks){
                        config.tracks = [] ;
                    }
                    var storeTrack = storeTracks[track];
                    storeTrack.store = track;
                    config.tracks.push(storeTrack);
                }
            }
        }
    });
});<commit_msg>added addBookmarks<commit_after>define(['dojo/_base/declare'], function(declare) {
    return declare(null, {

        constructor: function(){

        },

        handleQueryParams: function(config,queryParams) {
            var values, storeValue, valuesLabel ;
            var storeTracks = {};
            var storeBookmarks= {};
            Object.keys(queryParams).forEach(function(queryParam){
                if(queryParam.indexOf('addStore\.')==0){
                    values = queryParam.split("\.");
                    storeValue = values[1];
                    valuesLabel = values[2];
                    if(!config.stores[storeValue]){
                        config.stores[storeValue] = {};
                    }
                    config.stores[storeValue][valuesLabel] = queryParams[queryParam];
                }
                else
                if(queryParam.indexOf('addTracks\.')==0){
                    values = queryParam.split("\.");
                    storeValue = values[1];
                    valuesLabel = values[2];

                    if(!storeTracks[storeValue]){
                        storeTracks[storeValue] = {};
                    }
                    storeTracks[storeValue][valuesLabel] = queryParams[queryParam];
                }
                else
                if(queryParam.indexOf('addBookmarks\.')==0){
                    values = queryParam.split("\.");
                    storeValue = values[1];
                    valuesLabel = values[2];

                    if(!storeBookmarks[storeValue]){
                        storeBookmarks[storeValue] = {};
                    }
                    storeBookmarks[storeValue][valuesLabel] = queryParams[queryParam];
                }

                // implement addFeatures?
                // http://gmod.org/wiki/JBrowse_Configuration_Guide#addFeatures
            });

            if(storeTracks){
                // add one for each
                for(track in storeTracks){
                    if(!config.tracks){
                        config.tracks = [] ;
                    }
                    var storeTrack = storeTracks[track];
                    storeTrack.store = track;
                    config.tracks.push(storeTrack);
                }
            }

            if(storeBookmarks){
                // add one for each
                for(bookmark in storeBookmarks){
                    if(!config.bookmarks){
                        config.bookmarks = {} ;
                    }
                    if(!config.bookmarks.features){
                        config.bookmarks.features = [] ;
                    }
                    var storeBookmark = storeBookmarks[bookmark];
                    // explicitly try to handle loc strings?
                    config.bookmarks.features.push(storeBookmark);
                }
            }
        }
    });
});
{'fraction_non_alphanumeric': 0.10824967263203841, 'fraction_numerical': 0.003273679615888258, 'mean_word_length': 1.1455992509363295, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2540984', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1002, 'n_words': 148}