<commit_before>steal(function(){
	
	var table = document.createElement('table'),
    	tableRow = document.createElement('tr'),
		containers = {
		  'tr': document.createElement('tbody'),
		  'tbody': table, 'thead': table, 'tfoot': table,
		  'td': tableRow, 'th': tableRow,
		  '*': document.createElement('div')
		},
   		fragmentRE = /^\s*<(\w+)[^>]*>/,
   		fragment  = function(html, name) {
		    if (name === undefined) {
		    	name = fragmentRE.test(html) && RegExp.$1;
		    }
		    if (!(name in containers)) name = '*';
		    var container = containers[name];
		    container.innerHTML = '' + html;
		    return [].slice.call(container.childNodes);
		}
	
	can.buildFragment = function(htmls, nodes){
		var parts = fragment(htmls[0]),
			frag = document.createDocumentFragment();
		parts.forEach(function(part){
			frag.appendChild(part);
		})
		return {
			fragment: frag
		}
	};
	
})<commit_msg>Fixing IE can.buildFragment bug (MooTools)<commit_after>steal(function(){
	
	var table = document.createElement('table'),
    	tableRow = document.createElement('tr'),
		containers = {
		  'tr': document.createElement('tbody'),
		  'tbody': table, 'thead': table, 'tfoot': table,
		  'td': tableRow, 'th': tableRow,
		  '*': document.createElement('div')
		},
   		fragmentRE = /^\s*<(\w+)[^>]*>/,
   		fragment  = function(html, name) {
		    if (name === undefined) {
		    	name = fragmentRE.test(html) && RegExp.$1;
		    }
		    if (!(name in containers)) name = '*';
		    var container = containers[name];
		     /* 
			    IE's parser will strip any <tr><td> tags when innerHTML 
			    is called on a tbody. To get around this, we construct a 
			    valid table with a tbody that has the innerHTML we want. 
			    Then the container is the firstChild of the tbody
			    http://www.ericvasilik.com/2006/07/code-karma.html 
		    */
		    if(name === "tr") {
		    	var temp = document.createElement('div');
		    	temp.innerHTML = "<table><tbody>" + html + "</tbody></table>";
		    	container = temp.firstChild.firstChild;
		    } else {
		    	container.innerHTML = '' + html;
		    }
		    return [].slice.call(container.childNodes);
		}
	
	can.buildFragment = function(htmls, nodes){
		var parts = fragment(htmls[0]),
			frag = document.createDocumentFragment();
		parts.forEach(function(part){
			frag.appendChild(part);
		})
		return {
			fragment: frag
		}
	};
	
})
{'fraction_non_alphanumeric': 0.16645754914261815, 'fraction_numerical': 0.004182350480970306, 'mean_word_length': 2.947194719471947, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '7414463', 'n_tokens_mistral': 871, 'n_tokens_neox': 744, 'n_words': 170}