I believe you can simplify the logic of this function to this:
```
_setDefaultCodec: function(mLine, payload) {
	var elements = mLine.split(' ');

	var newLine = A.Array.filter(
		elements,
		function(item, index, collection) {
			return item !== payload;
		}
	);

	newLine.splice(3, 0, payload);

	return newLine.join(' ');
}
```