<commit_before>steal("can/control", "can/util/function", function() {

	// Hang on to original action
	var originalAction = can.Control._action,
	    originalShifter = can.Control._shifter;

	// Redefine _isAction to handle new syntax
	can.extend( can.Control, {

		_action: function( methodName, options ) {

			var parts = methodName.split(":"),
			    name = parts.shift();

			return originalAction.apply( this, [ name, options ] );
		},

		_shifter: function( context, name ) {
			var fn = originalShifter.apply( this, arguments ),
			    parts = name.split(":"),
			    fnName, args, modifier;

			// If there's still a part left, this means we have a modifier
			if ( parts[1] ) {
				parts = parts.pop().match(/([\w]+)\((.+)\)/);

				fnName = parts[1];
				args = parts[2] ? parts[2].split(","): [];

				modifier = can.getObject( fnName, [ context.options, can, window ]);

				if ( modifier ) {
					args.unshift( fn );
					fn = modifier.apply( null, args );
				}
			}
			return fn;
		}
	});

});<commit_msg>Added null check around parts since the regex might not match anything<commit_after>steal("can/control", "can/util/function", function() {

	// Hang on to original action
	var originalAction = can.Control._action,
	    originalShifter = can.Control._shifter;

	// Redefine _isAction to handle new syntax
	can.extend( can.Control, {

		_action: function( methodName, options ) {

			var parts = methodName.split(":"),
			    name = parts.shift();

			return originalAction.apply( this, [ name, options ] );
		},

		_shifter: function( context, name ) {
			var fn = originalShifter.apply( this, arguments ),
			    parts = name.split(":"),
			    fnName, args, modifier;

			// If there's still a part left, this means we have a modifier
			if ( parts[1] ) {
				parts = parts.pop().match(/([\w]+)\((.+)\)/);

				if(parts){
					fnName = parts[1];
					args = parts[2] ? parts[2].split(","): [];

					modifier = can.getObject( fnName, [ context.options, can, window ]);

					if ( modifier ) {
						args.unshift( fn );
						fn = modifier.apply( null, args );
					}
				}
			}
			return fn;
		}
	});

});
{'fraction_non_alphanumeric': 0.1617301363422661, 'fraction_numerical': 0.0037611659614480487, 'mean_word_length': 2.8067978533094813, 'pattern_counts': {'":': 4, '<': 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': '3684468', 'n_tokens_mistral': 834, 'n_tokens_neox': 672, 'n_words': 184}