<commit_before> /**
 * address
 * @author <NAME>, 2013
 */
define([
	'jquery', 'ang/app'
], function( $, app ) {
	'use strict';

	function makeSource( alias, domain ) {
		return alias + '@' + domain;
	}

	function splitSource( address ) {
		var tmp = address.source.split('@');
		address.alias = tmp[0];
		address.domain = tmp[1];
	}

	return app.controller('AddressController', [
		'$scope',
		'AddressServiceData',
		'AddressService',
		'UserServiceData',
		'DomainServiceData',

		function(
			$scope,
			addresses,
			AddressService,
			users,
			domains
		) {

			$scope.meta = {};
			$scope.addresses = addresses;
			$scope.address = new AddressService();
			$scope.users = users;
			$scope.domains = domains;

			$scope.save = function( address ) {

				address.source = makeSource( address.alias, address.domain );
				address.$save( function() {
					
					if ( !address._update )
						$scope.addresses.push( address );
				});
				$scope.address = new AddressService();
			};

			$scope.edit = function( address ) {
<commit_msg>feat(greylisting by default)<commit_after> /**
 * address
 * @author <NAME>, 2013
 */
define([
	'jquery', 'ang/app'
], function( $, app ) {
	'use strict';

	function makeSource( alias, domain ) {
		return alias + '@' + domain;
	}

	function splitSource( address ) {
		var tmp = address.source.split('@');
		address.alias = tmp[0];
		address.domain = tmp[1];
	}

	return app.controller('AddressController', [
		'$scope',
		'AddressServiceData',
		'AddressService',
		'UserServiceData',
		'DomainServiceData',

		function(
			$scope,
			addresses,
			AddressService,
			users,
			domains
		) {

			function newAddress() {
				var address = new AddressService();
				address.enable_greylisting = true;
				return address;
			}

			$scope.meta = {};
			$scope.addresses = addresses;
			$scope.address = newAddress();
			$scope.users = users;
			$scope.domains = domains;

			$scope.save = function( address ) {

				address.source = makeSource( address.alias, address.domain );
				address.$save( function() {
					
					if ( !address._update )
						$scope.addresses.push( address );
				});
				$scope.address = newAddress();
			};

			$scope.edit = function( address ) {

{'fraction_non_alphanumeric': 0.15753734721593482, 'fraction_numerical': 0.005432322317790856, 'mean_word_length': 3.130841121495327, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6528023', 'n_tokens_mistral': 868, 'n_tokens_neox': 696, 'n_words': 152}