<commit_before>Meteor.methods({
	startEmailIntercepter() {
		if (RocketChat.settings.get('Direct_Reply_Enable') && RocketChat.settings.get('Direct_Reply_Protocol') && RocketChat.settings.get('Direct_Reply_Host') && RocketChat.settings.get('Direct_Reply_Port') && RocketChat.settings.get('Direct_Reply_Username') && RocketChat.settings.get('Direct_Reply_Password')) {
			if (RocketChat.settings.get('Direct_Reply_Protocol') === 'IMAP') {
				// stop already running instance
				if(RocketChat.IMAP && RocketChat.IMAP.isActive()) {
					RocketChat.IMAP.stop();
				}
				// start new instance
				if (!RocketChat.IMAP || !RocketChat.IMAP.isActive()) {
					RocketChat.IMAP = new RocketChat.IMAPIntercepter({
						user: RocketChat.settings.get('Direct_Reply_Username'),
						password: <PASSWORD>('Direct_Reply_Password'),
						host: RocketChat.settings.get('Direct_Reply_Host'),
						port: RocketChat.settings.get('Direct_Reply_Port'),
						debug: RocketChat.settings.get('Direct_Reply_Debug') ? console.log : false,
						tls: !RocketChat.settings.get('Direct_Reply_IgnoreTLS'),
						connTimeout: 30000,
						keepalive: true
					});
					RocketChat.IMAP.start();
					return {
						message: 'Direct_Reply_Started'
					};
				} else {
					throw new Meteor.Error('IMAP_intercepter_already_running');
				}
			}
		} else {
			throw new Meteor.Error('Please_fill_all_the_information');
		}
	}
});
<commit_msg>fix start<commit_after>Meteor.methods({
	startEmailIntercepter() {
		if (RocketChat.settings.get('Direct_Reply_Enable') && RocketChat.settings.get('Direct_Reply_Protocol') && RocketChat.settings.get('Direct_Reply_Host') && RocketChat.settings.get('Direct_Reply_Port') && RocketChat.settings.get('Direct_Reply_Username') && RocketChat.settings.get('Direct_Reply_Password')) {
			if (RocketChat.settings.get('Direct_Reply_Protocol') === 'IMAP') {
				// stop already running instance
				if (RocketChat.IMAP && RocketChat.IMAP.isActive()) {
					RocketChat.IMAP.stop(Meteor.bindEnvironment(function() {
						RocketChat.IMAP = new RocketChat.IMAPIntercepter({
							user: RocketChat.settings.get('Direct_Reply_Username'),
							password: <PASSWORD>('Direct_Reply_Password'),
							host: RocketChat.settings.get('Direct_Reply_Host'),
							port: RocketChat.settings.get('Direct_Reply_Port'),
							debug: RocketChat.settings.get('Direct_Reply_Debug') ? console.log : false,
							tls: !RocketChat.settings.get('Direct_Reply_IgnoreTLS'),
							connTimeout: 30000,
							keepalive: true
						});
						RocketChat.IMAP.start();
						return {
							message: 'Direct_Reply_Started'
						};
					}));
				} else if (!RocketChat.IMAP || !RocketChat.IMAP.isActive()) {
					RocketChat.IMAP = new RocketChat.IMAPIntercepter({
						user: RocketChat.settings.get('Direct_Reply_Username'),
						password: <PASSWORD>('Direct_<PASSWORD>'),
						host: RocketChat.settings.get('Direct_Reply_Host'),
						port: RocketChat.settings.get('Direct_Reply_Port'),
						debug: RocketChat.settings.get('Direct_Reply_Debug') ? console.log : false,
						tls: !RocketChat.settings.get('Direct_Reply_IgnoreTLS'),
						connTimeout: 30000,
						keepalive: true
					});
					RocketChat.IMAP.start();
					return {
						message: 'Direct_Reply_Started'
					};
				} else {
					throw new Meteor.Error('IMAP_intercepter_already_running');
				}
			}
		} else {
			throw new Meteor.Error('Please_fill_all_the_information');
		}
	}
});

{'fraction_non_alphanumeric': 0.14073426573426573, 'fraction_numerical': 0.004370629370629371, 'mean_word_length': 4.116244411326378, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6742915', 'n_tokens_mistral': 1411, 'n_tokens_neox': 1106, 'n_words': 141}