Here\'s the command to get teh DDL or the procedure and make it pretty:
EXEC DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM , \'PRETTY\' , TRUE