After more than a century of the dominance of this theory in Old Testament studies, today there is no longer a consensus among scholars on the reliability and soundness of the theory.
Some scholars propose to cancel out this theory for good, others continue to defend it, some modify it, while still others suggest alternative models.
To say that there are separate stories that come from J (Yahwist source), E (Elohist source), P (Priestly source), and D (Deuteronomic source) which formed the so-called Pentateuch after the Babylonian exile (around 538-334 BC), as students were taught in the past, should now be stated with extra caution, not taking for granted the present serious criticisms aimed at this theory.
For reader-friendly introduction to this problem, see Jean-Louis Ska, “The Pentateuch”, in The International Bible Commentary, pp. 335-343 (especially p. 340).