<commit_before>var grunt = require( 'grunt' )
	, _ = require( 'underscore' )

module.exports = {

	level_calculator : function( diff ){
		var level = 0
		try {
			diff = diff.split( '\n' )
			_.each( diff, function( line ) {
				if ( _.startsWith( line, 'diff --git a/' ) ) {
					throw 1
				}
				if ( _.startsWith( line, 'Index: src/' ) ) {
					throw 1
				}
				if ( _.startsWith( line, '+++ src/' ) ) {
					throw 1
				}
			})<commit_msg>index: src/ actually means 0, not 1<commit_after>var grunt = require( 'grunt' )
	, _ = require( 'underscore' )

module.exports = {

	level_calculator : function( diff ){
		var level = 0
		try {
			diff = diff.split( '\n' )
			_.each( diff, function( line ) {
				if ( _.startsWith( line, 'diff --git a/' ) ) {
					throw 1
				}
				if ( _.startsWith( line, 'Index: src/' ) ) {
					throw 0
				}
				if ( _.startsWith( line, '+++ src/' ) ) {
					throw 1
				}
			})
{'fraction_non_alphanumeric': 0.17214912280701755, 'fraction_numerical': 0.010964912280701754, 'mean_word_length': 2.1267123287671232, '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': '1913871', 'n_tokens_mistral': 426, 'n_tokens_neox': 339, 'n_words': 90}