Sorry for taking so long to get to this, but hopefully late is better than never.
I believe the second one is better supported by the EBTs. The factors of awakening are really about samÄdhi practice, including the factors that lead to samÄdhi. They are very close to the sequence of dependent liberation, found e.g. at AN 10.2 , both being causal sequences where one factor leads to the next. It is this causality, to my mind, which necessitates a fairly narrow definition for each term in the sequence.
Dhammavicaya (āinvestigation of mental qualitiesā) is supported on one side by mindfulness and on the other side it leads to energy (viriya) and joy (pÄ«ti). As has been pointed out above, mindfulness here seems to be used quite broadly, and the suttas specifically support interpreting it as either satipaį¹į¹hÄna or dhammÄnussatÄ«. When it refers to satipaį¹į¹hÄna, it makes good sense to equate dhammavicaya with dhammÄnupassanÄ, the last of the satipaį¹į¹hÄnas. Both have to do with understanding good and bad mental qualities, and both have samÄdhi as their aim. The purpose of investigating these mental qualities is obviously to enable you to let go of them. As you do so you are removing some of the last barriers to samÄdhi, and joy and energy will be the natural result. And this is what you see in the factors of awakening and also in dependent liberation.
When dhammavicaya refers to dhammÄnussatÄ«, the process is slightly different. In this case, the removal of the defilements is more automatic. As you reflect on the Dhamma, your mind turns away from the world and the defilements go (see e.g. AN 6.10). Joy and energy are the natural outcome, just as in the case of satipaį¹į¹hÄna. In this case the investigation of mental qualities is probably more to do with just observing the disappearance of defilements as you contemplate the Dhamma. You come to understand the process and what sort of contemplation works.
This is not to say, of course, that investigating āthe wholesome and the unwholesome, the blameable and the blameless, the inferior and the superiorā is not useful outside of this context. Obviously it is. The difference is that the removal of refined defilements takes more clarity and wisdom, and so happens at a later stage on the path.