<commit_before>function bigtreeOpen(e) {
    //console.log(e.node);
    
    // Loop through all the children, and if they are directories
    // we should refresh them 3 deep
    var node = e.node;
    for (var i=0;i<node.children.length;i++)
    {
	var url = "http://bigtree.projfinder.com/api/bigtree?root="+e.node.children[i].path+"&depth=3"
	url = url + "&callback=?";
	//$.getJSON(url, function(databack) {
	//	$('#tree').tree('loadData', databack.data);
	//});
	$.getJSON(url,(function(thisnode) {
	    return function(databack) {
		var ids = Array();
		for (var ii=0;ii<thisnode.children.length;ii++)
		{
		    ids.push(thisnode.children[ii].id)
		}
		for (var iii=0;iii<ids.length;iii++)
		{
		    $('#tree').tree('removeNode', $('#tree').tree('getNodeById', ids[iii]));
		}
		$('#tree').tree('loadData', databack.data, thisnode);
		1+1;
	    };
	}(node.children[i]))); // calling the function with the current value
    }
}

function init(){
    var url = "http://bigtree.projfinder.com/api/bigtree?root=D0&depth=3"
    url = url + "&callback=?";
    $.getJSON(url, function(databack) {
	// First just 2 levels
	$('#tree').tree({
	    data: databack.data
	});
    });

    $('#tree').bind(
	'tree.open',
	bigtreeOpen
    );

    // Hook up to the button to query
    $("#myButton").click(function(){
	var url = "http://bigtree.projfinder.com/api/bigtree?root=D0&depth=2"
	url = url + "&callback=?";
	$.getJSON(url, function(databack) {
	    $('#tree').tree('loadData', databack.data);<commit_msg>Only send down requests to the server for Dxxx nodes... not Lxxx nodes<commit_after>function bigtreeOpen(e) {
    //console.log(e.node);
    
    // Loop through all the children, and if they are directories
    // we should refresh them 3 deep
    var node = e.node;
    for (var i=0;i<node.children.length;i++)
    {
	// Only fetch new data for directories... not layers
	if (e.node.children[i].path.match(/.*\.D\d+$/)) {
	    var url = "http://bigtree.projfinder.com/api/bigtree?root="+e.node.children[i].path+"&depth=3"
	    url = url + "&callback=?";
	    //$.getJSON(url, function(databack) {
	    //	$('#tree').tree('loadData', databack.data);
	    //});
	    $.getJSON(url,(function(thisnode) {
		return function(databack) {
		    var ids = Array();
		    for (var ii=0;ii<thisnode.children.length;ii++)
		    {
			ids.push(thisnode.children[ii].id)
		    }
		    for (var iii=0;iii<ids.length;iii++)
		    {
			$('#tree').tree('removeNode', $('#tree').tree('getNodeById', ids[iii]));
		    }
		    $('#tree').tree('loadData', databack.data, thisnode);
		    1+1;
		};
	    }(node.children[i]))); // calling the function with the current value
	}
    }
}

function init(){
    var url = "http://bigtree.projfinder.com/api/bigtree?root=D0&depth=3"
    url = url + "&callback=?";
    $.getJSON(url, function(databack) {
	// First just 2 levels
	$('#tree').tree({
	    data: databack.data
	});
    });

    $('#tree').bind(
	'tree.open',
	bigtreeOpen
    );

    // Hook up to the button to query
    $("#myButton").click(function(){
	var url = "http://bigtree.projfinder.com/api/bigtree?root=D0&depth=2"
	url = url + "&callback=?";
	$.getJSON(url, function(databack) {
	    $('#tree').tree('loadData', databack.data);
{'fraction_non_alphanumeric': 0.2059461133477857, 'fraction_numerical': 0.007432641684732115, 'mean_word_length': 3.189364461738003, 'pattern_counts': {'":': 0, '<': 9, '<?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': '3473739', 'n_tokens_mistral': 1220, 'n_tokens_neox': 1155, 'n_words': 223}