<commit_before>var workspace = Blockly.inject('blocklyDiv', {
	media: 'node_modules/blockly/media/',
	toolbox: document.getElementById('toolbox')
});
Blockly.Xml.domToWorkspace(workspace,
	document.getElementById('startBlocks'));

var showXml = function showXml() {
	var xmlDom = Blockly.Xml.workspaceToDom(workspace);
	var xmlText = Blockly.Xml.domToPrettyText(xmlDom);
	alert(xmlText);
};

var saveXml = function saveXml() {
	var xmlDom = Blockly.Xml.workspaceToDom(workspace);
	Array.prototype.slice.apply(xmlDom.getElementsByTagName('field')).forEach(function(field){
		if ( field.getAttribute('name') === 'ACCOUNT_LIST' ) {
			field.childNodes[0].nodeValue = '';
		}
	});
	Array.prototype.slice.apply(xmlDom.getElementsByTagName('block')).forEach(function(block){
		switch(block.getAttribute('type')){
			case 'trade':
				block.setAttribute('id', 'trade');
				break;
			case 'procedures_defnoreturn':
				Array.prototype.slice.apply(block.childNodes).forEach(function(childNode){
					if ( childNode.getAttribute('name') === 'NAME' ) {
						if ( childNode.childNodes[0].nodeValue.indexOf('each tick') > -1 ) {
							block.setAttribute('id', 'strategy');
						} else if ( childNode.childNodes[0].nodeValue.indexOf('finished') > -1 ) {
							block.setAttribute('id', 'finish');
						}
					}
				});
				break;
			default:
				block.removeAttribute('id');
				break;
		}
	});
	xmlDom.getElementsByTagName('field')[0].childNodes[0].nodeValue = ''
	var xmlText = Blockly.Xml.domToPrettyText(xmlDom);
	var filename = 'binary-bot' + parseInt(new Date()
		.getTime() / 1000) + '.xml';
	var blob = new Blob([xmlText], {<commit_msg>Removed extra element cleaning code<commit_after>var workspace = Blockly.inject('blocklyDiv', {
	media: 'node_modules/blockly/media/',
	toolbox: document.getElementById('toolbox')
});
Blockly.Xml.domToWorkspace(workspace,
	document.getElementById('startBlocks'));

var showXml = function showXml() {
	var xmlDom = Blockly.Xml.workspaceToDom(workspace);
	var xmlText = Blockly.Xml.domToPrettyText(xmlDom);
	alert(xmlText);
};

var saveXml = function saveXml() {
	var xmlDom = Blockly.Xml.workspaceToDom(workspace);
	Array.prototype.slice.apply(xmlDom.getElementsByTagName('field')).forEach(function(field){
		if ( field.getAttribute('name') === 'ACCOUNT_LIST' ) {
			field.childNodes[0].nodeValue = '';
		}
	});
	Array.prototype.slice.apply(xmlDom.getElementsByTagName('block')).forEach(function(block){
		switch(block.getAttribute('type')){
			case 'trade':
				block.setAttribute('id', 'trade');
				break;
			case 'procedures_defnoreturn':
				Array.prototype.slice.apply(block.childNodes).forEach(function(childNode){
					if ( childNode.getAttribute('name') === 'NAME' ) {
						if ( childNode.childNodes[0].nodeValue.indexOf('each tick') > -1 ) {
							block.setAttribute('id', 'strategy');
						} else if ( childNode.childNodes[0].nodeValue.indexOf('finished') > -1 ) {
							block.setAttribute('id', 'finish');
						}
					}
				});
				break;
			default:
				block.removeAttribute('id');
				break;
		}
	});
	var xmlText = Blockly.Xml.domToPrettyText(xmlDom);
	var filename = 'binary-bot' + parseInt(new Date()
		.getTime() / 1000) + '.xml';
	var blob = new Blob([xmlText], {
{'fraction_non_alphanumeric': 0.16945996275605213, 'fraction_numerical': 0.006207324643078833, 'mean_word_length': 4.65438596491228, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 23}, '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': '5236962', 'n_tokens_mistral': 1189, 'n_tokens_neox': 1064, 'n_words': 157}