<commit_before>import xoCollection from './collection';

var co = new xoCollection.Collection();

co.begin();

co.insert('a', 1000);
console.log('a', co.get('a'));
co.update('a', 2000);
console.log('a', co.get('a'));
co.delete('a');
try {
console.log(co.get('a'));
} catch(e) {
	console.error(e);
}

console.log(co.commit());

console.log('=====');

co.insert('b', 100);
console.log('b', co.get('b'));
co.begin();
co.update('b', 200);
console.log('b', co.get('b'));
co.insert('c', 300);
co.update('b', 400);
console.log('b', co.get('b'), 'c', co.get('c'));
co.delete('b');
try {
console.log(co.get('b'));
} catch(e) {
	console.error(e);
}

co.rollback();

console.log('b', co.get('b'));
try {
console.log(co.get('c'));
} catch(e) {
	console.error(e);
}

console.log('=====');

var coa = new xoCollection.Collection();
coa.insert('x', 999);
coa.begin();
coa.insert('a', 100);
coa.update('a', 150);
coa.insert('b', 200);
console.log('a', coa.get('a'), 'b', coa.get('b'), 'x', coa.get('x'));
var log = coa.commit();
var cob = new xoCollection.Collection();
cob.replay(log);
console.log('a',  cob.get('a'), 'b',  cob.get('b'));
try {
console.log(cob.get('x'));
} catch(e) {
	console.error(e);
}

process.exit(0);
<commit_msg>Minor renaming<commit_after>import Collection from './collection';

var co = new Collection.Collection();

co.begin();

co.insert('a', 1000);
console.log('a', co.get('a'));
co.update('a', 2000);
console.log('a', co.get('a'));
co.delete('a');
try {
console.log(co.get('a'));
} catch(e) {
	console.error(e);
}

console.log(co.commit());

console.log('=====');

co.insert('b', 100);
console.log('b', co.get('b'));
co.begin();
co.update('b', 200);
console.log('b', co.get('b'));
co.insert('c', 300);
co.update('b', 400);
console.log('b', co.get('b'), 'c', co.get('c'));
co.delete('b');
try {
console.log(co.get('b'));
} catch(e) {
	console.error(e);
}

co.rollback();

console.log('b', co.get('b'));
try {
console.log(co.get('c'));
} catch(e) {
	console.error(e);
}

console.log('=====');

var coa = new Collection.Collection();
coa.insert('x', 999);
coa.begin();
coa.insert('a', 100);
coa.update('a', 150);
coa.insert('b', 200);
console.log('a', coa.get('a'), 'b', coa.get('b'), 'x', coa.get('x'));
var log = coa.commit();
var cob = new Collection.Collection();
cob.replay(log);
console.log('a',  cob.get('a'), 'b',  cob.get('b'));
try {
console.log(cob.get('x'));
} catch(e) {
	console.error(e);
}

process.exit(0);

{'fraction_non_alphanumeric': 0.3047227926078029, 'fraction_numerical': 0.027104722792607804, 'mean_word_length': 5.4787234042553195, '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': '4415672', 'n_tokens_mistral': 1084, 'n_tokens_neox': 1019, 'n_words': 181}