<commit_before>!function(window, angular, undefined) {
  'use strict';
  angular.module('angular.password', [])
  .directive('matchPassword', function() {

    function link(scope, element, attrs, ctrls) {
      var formController = ctrls[1];
      var ngModel = ctrls[0];
      var otherPasswordModel = formController[attrs.matchPassword];

      ngModel.$parsers.push(function(value) {
        if (value === otherPasswordModel.$viewValue) {
          ngModel.$setValidity('passwordMatch', true);
          return value;
        }
        ngModel.$setValidity('passwordMatch', false);
      });

      otherPasswordModel.$parsers.push(function(value) {
        ngModel.$setValidity('passwordMatch', value === ngModel.$viewValue);
        return value;
      });

    }
    var controllers = ['^ngModel', '^form'];

    return {
      restrict: 'A',
      require: controllers,
      link: link
    }; // end return
  });

}(window, window.angular);<commit_msg>fix: confirm password is unset when != password<commit_after>!function(window, angular, undefined) {
  'use strict';
  angular.module('angular.password', [])
  .directive('matchPassword', function() {

    function link(scope, element, attrs, ctrls) {
      var formController = ctrls[1];
      var ngModel = ctrls[0];
      var otherPasswordModel = formController[attrs.matchPassword];

      ngModel.$parsers.push(function(value) {
        if (value === otherPasswordModel.$viewValue) {
          ngModel.$setValidity('passwordMatch', true);
        }
        else{
          ngModel.$setValidity('passwordMatch', false);
        }
        return value;
      });

      otherPasswordModel.$parsers.push(function(value) {
        ngModel.$setValidity('passwordMatch', value === ngModel.$viewValue);
        return value;
      });

    }
    var controllers = ['^ngModel', '^form'];

    return {
      restrict: 'A',
      require: controllers,
      link: link
    }; // end return
  });

}(window, window.angular);
{'fraction_non_alphanumeric': 0.14494949494949494, 'fraction_numerical': 0.00202020202020202, 'mean_word_length': 2.869140625, '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': '1312578', 'n_tokens_mistral': 574, 'n_tokens_neox': 564, 'n_words': 112}