<commit_before>define(['angular'], function (angular) {
'use strict';

var PREFIX_REGEXP = /^((?:x|data)[\:\-_])/i;
/**
 * Converts all accepted directives format into proper directive name.
 * @param name Name to normalize
 */
//FIXME: Use https://docs.angularjs.org/api/ng/type/$compile.directive.Attributes if accessible
function directiveNormalize(name) {
	return camelCase(name.replace(PREFIX_REGEXP, ''));
}

var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;

/**
 * Converts snake_case to camelCase.
 * Also there is special case for Moz prefix starting with upper case letter.
 * @param name Name to normalize
 */
function camelCase(name) {
	return name.
	replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
		return offset ? letter.toUpperCase() : letter;
	});
}


/**
 * @ngdoc directive
 * @name ngClick
 *
 * @description
 * The ngClick directive allows you to specify custom behavior when
 * an element is clicked.
 *
 * @element ANY
 * @priority 0
 * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon
 * click. ({@link guide/expression#-event- Event object is available as `$event`})
 *
 * @example
   <example>
	 <file name="index.html">
	  <button ng-click="count = count + 1" ng-init="count=0">
		Increment
	  </button>
	  <span>
		count: {{count}}
	  </span>
	 </file>
	 <file name="protractor.js" type="protractor">
	   it('should check ng-click', function() {
		 expect(element(by.binding('count')).getText()).toMatch('0');
		 element(by.css('button')).click();
		 expect(element(by.binding('count')).getText()).toMatch('1');
	   });
	 </file>
   </example>
 */
/*
 * A collection of directives that allows creation of custom event handlers that are defined as
 * angular expressions and are compiled and executed within the current scope.
 */
var ngEventDirectives = {};

function scopeToCallDigestIn(scope) {
	var digestScope = scope;
	while (digestScope.$parent) {
		if (scope.$stopDigestPropagation) {
			break;
		} else {
			digestScope = scope.$parent;
		}
	}
	return digestScope;<commit_msg>fix issue with inherited scopes<commit_after>define(['angular'], function (angular) {
'use strict';

var PREFIX_REGEXP = /^((?:x|data)[\:\-_])/i;
/**
 * Converts all accepted directives format into proper directive name.
 * @param name Name to normalize
 */
//FIXME: Use https://docs.angularjs.org/api/ng/type/$compile.directive.Attributes if accessible
function directiveNormalize(name) {
	return camelCase(name.replace(PREFIX_REGEXP, ''));
}

var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;

/**
 * Converts snake_case to camelCase.
 * Also there is special case for Moz prefix starting with upper case letter.
 * @param name Name to normalize
 */
function camelCase(name) {
	return name.
	replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
		return offset ? letter.toUpperCase() : letter;
	});
}


/**
 * @ngdoc directive
 * @name ngClick
 *
 * @description
 * The ngClick directive allows you to specify custom behavior when
 * an element is clicked.
 *
 * @element ANY
 * @priority 0
 * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon
 * click. ({@link guide/expression#-event- Event object is available as `$event`})
 *
 * @example
   <example>
	 <file name="index.html">
	  <button ng-click="count = count + 1" ng-init="count=0">
		Increment
	  </button>
	  <span>
		count: {{count}}
	  </span>
	 </file>
	 <file name="protractor.js" type="protractor">
	   it('should check ng-click', function() {
		 expect(element(by.binding('count')).getText()).toMatch('0');
		 element(by.css('button')).click();
		 expect(element(by.binding('count')).getText()).toMatch('1');
	   });
	 </file>
   </example>
 */
/*
 * A collection of directives that allows creation of custom event handlers that are defined as
 * angular expressions and are compiled and executed within the current scope.
 */
var ngEventDirectives = {};

function scopeToCallDigestIn(scope) {
	var digestScope = scope;
	while (digestScope.$parent) {
		if (scope.hasOwnProperty('$stopDigestPropagation')) {
			break;
		} else {
			digestScope = scope.$parent;
		}
	}
	return digestScope;
{'fraction_non_alphanumeric': 0.15033621517771373, 'fraction_numerical': 0.0024015369836695487, 'mean_word_length': 4.173913043478261, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 2, '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': '6176962', 'n_tokens_mistral': 1350, 'n_tokens_neox': 1259, 'n_words': 365}