#fixed code
                                private void hydrateCourses(Collection<Teacher> teachers) {

        session.loadAll(Course.class);
    }
#vulnerable code 
                                private void hydrateCourses(Collection<Teacher> teachers) {

        session.setDriver(new TeacherRequest());
        session.setDriver(new CoursesRequest());
        session.loadAll(Course.class);
    } 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK