<commit_before>define(
	[
		"./meta",
		"./implementation-not-found"
	],
	function (meta, ImplementationNotFound) {
		"use strict";

		meta({
			"entity": "class",
			"name": "Invocation"
		});

		function Invocation () {
			this.reset();
		}

		Invocation.prototype.reset = function () {
			this.signature = null;
			this.router = null;
			if (!this.nonmatchingImplementationSignatures || !this.nonmatchingImplementationSignatures.length) {
				this.nonmatchingImplementationSignatures = [];
			}
		};

		Invocation.prototype.needsSignature = function (router) {
			return this.router !== router || null === signature;
		};

		Invocation.prototype.implementationNotFound = function (functionName) {
			var error = new ImplementationNotFound(
				functionName,
				this.signature,
				this.nonmatchingImplementationSignatures
			);
			this.reset();
			throw error;
		};

		return Invocation;
	}
);<commit_msg>fixing test for nonmatchingImplementationSignatures array length in Invocation reset method<commit_after>define(
	[
		"./meta",
		"./implementation-not-found"
	],
	function (meta, ImplementationNotFound) {
		"use strict";

		meta({
			"entity": "class",
			"name": "Invocation"
		});

		function Invocation () {
			this.reset();
		}

		Invocation.prototype.reset = function () {
			this.signature = null;
			this.router = null;

			if (!this.nonmatchingImplementationSignatures || this.nonmatchingImplementationSignatures.length) {
				this.nonmatchingImplementationSignatures = [];
			}
		};

		Invocation.prototype.needsSignature = function (router) {
			return this.router !== router || null === signature;
		};

		Invocation.prototype.implementationNotFound = function (functionName) {
			var error = new ImplementationNotFound(
				functionName,
				this.signature,
				this.nonmatchingImplementationSignatures
			);
			this.reset();
			throw error;
		};

		return Invocation;
	}
);
{'fraction_non_alphanumeric': 0.1281645569620253, 'fraction_numerical': 0.0, 'mean_word_length': 3.80253164556962, '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': '2177900', 'n_tokens_mistral': 678, 'n_tokens_neox': 545, 'n_words': 107}