Source:
<code>public ActionResult execute() throws EntityDoesNotExistException { String newCourseId = getRequestParamValue(Const.ParamsNames.COURSE_ID); Assumption.assertNotNull(newCourseId); String newCourseName = getRequestParamValue(Const.ParamsNames.COURSE_NAME); Assumption.assertNotNull(newCourseName); new GateKeeper().verifyInstructorPrivileges(account); data = new InstructorCoursesPageData(account); CourseAttributes newCourse = new CourseAttributes(newCourseId, newCourseName); createCourse(newCourse); <START> ArrayList<CourseDetailsBundle> allCourses = new ArrayList<CourseDetailsBundle>(logic.getCourseSummariesForInstructor( <END> data.account.googleId).values()); List<CourseDetailsBundle> activeCourses = logic.extractActiveCourses(allCourses, data.account.googleId); List<CourseDetailsBundle> archivedCourses = logic.extractArchivedCourses(allCourses, data.account.googleId); String CourseIdToShowParam = ""; String CourseNameToShowParam = ""; if (isError) { CourseIdToShowParam = Sanitizer.sanitizeForHtml(newCourse.id); CourseNameToShowParam = Sanitizer.sanitizeForHtml(newCourse.name); statusToAdmin = StringHelper.toString(statusToUser, "<br>"); } else { statusToAdmin = "Course added : " + newCourse.id; statusToAdmin += "<br>Total courses: " + allCourses.size(); } List<CourseAttributes> courseList = logic.getCoursesForInstructor(data.account.googleId); HashMap<String, InstructorAttributes> instructorsForCourses = new HashMap<String, InstructorAttributes>(); for (CourseAttributes course : courseList) { instructorsForCourses.put(course.id, logic.getInstructorForGoogleId(course.id, data.account.googleId)); } data.init(activeCourses, archivedCourses, instructorsForCourses, CourseIdToShowParam, CourseNameToShowParam); return createShowPageResult(Const.ViewURIs.INSTRUCTOR_COURSES, data); }</code><technical_language>good program interface well. (use List)</technical_language>

Target:
public ActionResult execute() throws EntityDoesNotExistException { String newCourseId = getRequestParamValue(Const.ParamsNames.COURSE_ID); Assumption.assertNotNull(newCourseId); String newCourseName = getRequestParamValue(Const.ParamsNames.COURSE_NAME); Assumption.assertNotNull(newCourseName); new GateKeeper().verifyInstructorPrivileges(account); data = new InstructorCoursesPageData(account); CourseAttributes newCourse = new CourseAttributes(newCourseId, newCourseName); createCourse(newCourse); List<CourseDetailsBundle> allCourses = new ArrayList<CourseDetailsBundle>(logic.getCourseSummariesForInstructor( data.account.googleId).values()); CourseDetailsBundle.sortDetailedCoursesByCourseId(allCourses); List<CourseDetailsBundle> activeCourses = logic.extractActiveCourses(allCourses, data.account.googleId); List<CourseDetailsBundle> archivedCourses = logic.extractArchivedCourses(allCourses, data.account.googleId); String CourseIdToShowParam = ""; String CourseNameToShowParam = ""; if (isError) { CourseIdToShowParam = Sanitizer.sanitizeForHtml(newCourse.id); CourseNameToShowParam = Sanitizer.sanitizeForHtml(newCourse.name); statusToAdmin = StringHelper.toString(statusToUser, "<br>"); } else { statusToAdmin = "Course added : " + newCourse.id; statusToAdmin += "<br>Total courses: " + allCourses.size(); } List<CourseAttributes> courseList = logic.getCoursesForInstructor(data.account.googleId); Map<String, InstructorAttributes> instructorsForCourses = new HashMap<String, InstructorAttributes>(); for (CourseAttributes course : courseList) { instructorsForCourses.put(course.id, logic.getInstructorForGoogleId(course.id, data.account.googleId)); } data.init(activeCourses, archivedCourses, instructorsForCourses, CourseIdToShowParam, CourseNameToShowParam); return createShowPageResult(Const.ViewURIs.INSTRUCTOR_COURSES, data); }