It is often necessary to revert to a previous version if several people modify the stored procedure. Then you can use the following query. However, it is only possible with sufficient authority.
SELECT TEXT
FROM ALL_SOURCE AS OF TIMESTAMP TO_TIMESTAMP ('20180404', 'YYYYMMDD')
WHERE NAME = 'SAMPLE_STORED_PROCEDURE' AND TYPE = 'PROCEDURE';
This will retrieve the April 4, 2018 version of the procedure.