Generalize caseTHESIS_PHD and caseTHESIS_MS to one method