PSCourseController.java

1
package edu.ucsb.cs156.courses.controllers;
2
3
import com.fasterxml.jackson.databind.JsonNode;
4
import com.fasterxml.jackson.databind.ObjectMapper;
5
import edu.ucsb.cs156.courses.entities.PSCourse;
6
import edu.ucsb.cs156.courses.entities.PersonalSchedule;
7
import edu.ucsb.cs156.courses.entities.User;
8
import edu.ucsb.cs156.courses.errors.BadEnrollCdException;
9
import edu.ucsb.cs156.courses.errors.EntityNotFoundException;
10
import edu.ucsb.cs156.courses.models.CurrentUser;
11
import edu.ucsb.cs156.courses.repositories.PSCourseRepository;
12
import edu.ucsb.cs156.courses.repositories.PersonalScheduleRepository;
13
import edu.ucsb.cs156.courses.services.UCSBCurriculumService;
14
import io.swagger.v3.oas.annotations.Operation;
15
import io.swagger.v3.oas.annotations.Parameter;
16
import io.swagger.v3.oas.annotations.tags.Tag;
17
import java.util.ArrayList;
18
import java.util.Iterator;
19
import java.util.Optional;
20
import javax.validation.Valid;
21
import lombok.extern.slf4j.Slf4j;
22
import org.springframework.beans.factory.annotation.Autowired;
23
import org.springframework.security.access.prepost.PreAuthorize;
24
import org.springframework.web.bind.annotation.DeleteMapping;
25
import org.springframework.web.bind.annotation.GetMapping;
26
import org.springframework.web.bind.annotation.PostMapping;
27
import org.springframework.web.bind.annotation.PutMapping;
28
import org.springframework.web.bind.annotation.RequestBody;
29
import org.springframework.web.bind.annotation.RequestMapping;
30
import org.springframework.web.bind.annotation.RequestParam;
31
import org.springframework.web.bind.annotation.RestController;
32
33
@Tag(name = "PSCourse")
34
@RequestMapping("/api/courses")
35
@RestController
36
@Slf4j
37
public class PSCourseController extends ApiController {
38
39
  @Autowired PSCourseRepository coursesRepository;
40
  @Autowired PersonalScheduleRepository personalScheduleRepository;
41
  @Autowired UCSBCurriculumService ucsbCurriculumService;
42
  @Autowired ObjectMapper mapper;
43
44
  @Operation(summary = "List all courses (admin)")
45
  @PreAuthorize("hasRole('ROLE_ADMIN')")
46
  @GetMapping("/admin/all")
47
  public Iterable<PSCourse> allUsersCourses() {
48
    Iterable<PSCourse> courses = coursesRepository.findAll();
49 1 1. allUsersCourses : replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/controllers/PSCourseController::allUsersCourses → KILLED
    return courses;
50
  }
51
52
  @Operation(summary = "List all courses (user)")
53
  @PreAuthorize("hasRole('ROLE_USER')")
54
  @GetMapping("/user/all")
55
  public Iterable<PSCourse> thisUsersCourses() {
56
    CurrentUser currentUser = getCurrentUser();
57
    Iterable<PSCourse> courses = coursesRepository.findAllByUserId(currentUser.getUser().getId());
58 1 1. thisUsersCourses : replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/controllers/PSCourseController::thisUsersCourses → KILLED
    return courses;
59
  }
60
61
  @Operation(summary = "List all courses for a specified psId (admin)")
62
  @PreAuthorize("hasRole('ROLE_ADMIN')")
63
  @GetMapping("/admin/psid/all")
64
  public Iterable<PSCourse> allCoursesForPsId(@Parameter(name = "psId") @RequestParam Long psId) {
65
    Iterable<PSCourse> courses = coursesRepository.findAllByPsId(psId);
66 1 1. allCoursesForPsId : replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/controllers/PSCourseController::allCoursesForPsId → KILLED
    return courses;
67
  }
68
69
  @Operation(summary = "List all courses for a specified psId (user)")
70
  @PreAuthorize("hasRole('ROLE_USER')")
71
  @GetMapping("/user/psid/all")
72
  public Iterable<PSCourse> thisUsersCoursesForPsId(
73
      @Parameter(name = "psId") @RequestParam Long psId) {
74
    User currentUser = getCurrentUser().getUser();
75
    Iterable<PSCourse> courses = coursesRepository.findAllByPsIdAndUser(psId, currentUser);
76 1 1. thisUsersCoursesForPsId : replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/controllers/PSCourseController::thisUsersCoursesForPsId → KILLED
    return courses;
77
  }
78
79
  @Operation(summary = "Get a single course (admin)")
80
  @PreAuthorize("hasRole('ROLE_ADMIN')")
81
  @GetMapping("/admin")
82
  public PSCourse getCourseById_admin(@Parameter(name = "id") @RequestParam Long id) {
83
    PSCourse courses =
84
        coursesRepository
85
            .findById(id)
86 1 1. lambda$getCourseById_admin$0 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$getCourseById_admin$0 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PSCourse.class, id));
87
88 1 1. getCourseById_admin : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::getCourseById_admin → KILLED
    return courses;
89
  }
90
91
  @Operation(summary = "Get a single course (user)")
92
  @PreAuthorize("hasRole('ROLE_USER')")
93
  @GetMapping("/user")
94
  public PSCourse getCourseById(@Parameter(name = "id") @RequestParam Long id) {
95
    User currentUser = getCurrentUser().getUser();
96
    PSCourse courses =
97
        coursesRepository
98
            .findByIdAndUser(id, currentUser)
99 1 1. lambda$getCourseById$1 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$getCourseById$1 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PSCourse.class, id));
100
101 1 1. getCourseById : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::getCourseById → KILLED
    return courses;
102
  }
103
104
  @Operation(summary = "Create a new course")
105
  @PreAuthorize("hasRole('ROLE_USER')")
106
  @PostMapping("/post")
107
  public ArrayList<PSCourse> postCourses(
108
      @Parameter(name = "enrollCd") @RequestParam String enrollCd,
109
      @Parameter(name = "psId") @RequestParam Long psId)
110
      throws Exception {
111
    CurrentUser currentUser = getCurrentUser();
112
    log.info("currentUser={}", currentUser);
113
114
    PersonalSchedule checkPsId =
115
        personalScheduleRepository
116
            .findByIdAndUser(psId, currentUser.getUser())
117 1 1. lambda$postCourses$2 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$postCourses$2 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PersonalSchedule.class, psId));
118
119
    String body = ucsbCurriculumService.getAllSections(enrollCd, checkPsId.getQuarter());
120 1 1. postCourses : negated conditional → KILLED
    if (body.equals("{\"error\": \"401: Unauthorized\"}")
121 1 1. postCourses : negated conditional → KILLED
        || body.equals("{\"error\": \"Enroll code doesn't exist in that quarter.\"}")) {
122
      throw new BadEnrollCdException(enrollCd);
123
    }
124
125
    // may cause significant slowdowns if there are very large sections
126
    String enrollCdPrimary = null;
127
    String enrollCdPreviousSecondary = null;
128
    boolean hasSecondary = false;
129
    boolean hasPreviousSecondary = false;
130
    Iterator<JsonNode> it = mapper.readTree(body).path("classSections").elements();
131 1 1. postCourses : negated conditional → KILLED
    while (it.hasNext()) {
132
      JsonNode classSection = it.next();
133
      String section = classSection.path("section").asText();
134
      String currentEnrollCd = classSection.path("enrollCode").asText();
135
136 1 1. postCourses : negated conditional → KILLED
      if (section.endsWith("00")) {
137
        enrollCdPrimary = currentEnrollCd;
138 1 1. postCourses : negated conditional → KILLED
      } else if (coursesRepository.findByPsIdAndEnrollCd(psId, currentEnrollCd).isPresent()) {
139
        enrollCdPreviousSecondary = currentEnrollCd;
140
        hasPreviousSecondary = true;
141
      } else {
142
        hasSecondary = true;
143
      }
144
    }
145
146 1 1. postCourses : negated conditional → KILLED
    if (enrollCdPrimary == null) {
147
      enrollCdPrimary = enrollCd;
148
      hasSecondary = false;
149
      hasPreviousSecondary = false;
150
    }
151
152 1 1. postCourses : negated conditional → KILLED
    if (!hasPreviousSecondary
153 1 1. postCourses : negated conditional → KILLED
        && coursesRepository.findByPsIdAndEnrollCd(psId, enrollCdPrimary).isPresent()) {
154
      throw new IllegalArgumentException("class exists in schedule");
155
    }
156
157
    ArrayList<PSCourse> savedCourses = new ArrayList<>();
158
159 1 1. postCourses : negated conditional → KILLED
    if (hasPreviousSecondary) {
160
      Optional<PSCourse> secondaryOptional =
161
          coursesRepository.findByPsIdAndEnrollCd(psId, enrollCdPreviousSecondary);
162
      PSCourse secondary = secondaryOptional.get();
163
164
      PSCourse oldSection = new PSCourse();
165 1 1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setUser → KILLED
      oldSection.setUser(currentUser.getUser());
166 1 1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED
      oldSection.setEnrollCd(secondary.getEnrollCd());
167 1 1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED
      oldSection.setPsId(secondary.getPsId());
168
169 1 1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED
      secondary.setEnrollCd(enrollCd);
170
      PSCourse newSection = coursesRepository.save(secondary);
171
172
      PSCourse primary = new PSCourse();
173 1 1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setUser → KILLED
      primary.setUser(currentUser.getUser());
174 1 1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED
      primary.setEnrollCd(enrollCdPrimary);
175 1 1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED
      primary.setPsId(psId);
176
177
      savedCourses.add(primary);
178
      savedCourses.add(newSection);
179
      savedCourses.add(oldSection);
180 1 1. postCourses : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::postCourses → KILLED
      return savedCourses;
181
    }
182
183 1 1. postCourses : negated conditional → KILLED
    if (!enrollCdPrimary.equals(enrollCd)) {
184
      String enrollCdSecondary = enrollCd;
185
      PSCourse secondary = new PSCourse();
186 1 1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setUser → KILLED
      secondary.setUser(currentUser.getUser());
187 1 1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED
      secondary.setEnrollCd(enrollCdSecondary);
188 1 1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED
      secondary.setPsId(psId);
189
      coursesRepository.save(secondary);
190
      savedCourses.add(secondary);
191 1 1. postCourses : negated conditional → KILLED
    } else if (hasSecondary) {
192
      throw new IllegalArgumentException(
193
          enrollCd
194
              + " is for a course with sections; please add a specific section and the lecture will be automatically added");
195
    }
196
197
    PSCourse primary = new PSCourse();
198 1 1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setUser → KILLED
    primary.setUser(currentUser.getUser());
199 1 1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED
    primary.setEnrollCd(enrollCdPrimary);
200 1 1. postCourses : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED
    primary.setPsId(psId);
201
    coursesRepository.save(primary);
202
    savedCourses.add(primary);
203
204 1 1. postCourses : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::postCourses → KILLED
    return savedCourses;
205
  }
206
207
  @Operation(summary = "Delete a course (admin)")
208
  @PreAuthorize("hasRole('ROLE_ADMIN')")
209
  @DeleteMapping("/admin")
210
  public Object deleteCourses_Admin(@Parameter(name = "id") @RequestParam Long id) {
211
    PSCourse courses =
212
        coursesRepository
213
            .findById(id)
214 1 1. lambda$deleteCourses_Admin$3 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses_Admin$3 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PSCourse.class, id));
215
216 1 1. deleteCourses_Admin : removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED
    coursesRepository.delete(courses);
217
218 1 1. deleteCourses_Admin : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_Admin → KILLED
    return genericMessage("PSCourse with id %s deleted".formatted(id));
219
  }
220
221
  @Operation(summary = "Delete a course (user)")
222
  @PreAuthorize("hasRole('ROLE_USER')")
223
  @DeleteMapping("/user")
224
  public Object deleteCourses(@Parameter(name = "id") @RequestParam Long id) throws Exception {
225
    User currentUser = getCurrentUser().getUser();
226
    PSCourse psCourse =
227
        coursesRepository
228
            .findByIdAndUser(id, currentUser)
229 1 1. lambda$deleteCourses$4 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses$4 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PSCourse.class, id));
230
    long psId = psCourse.getPsId();
231
    PersonalSchedule checkPsId =
232
        personalScheduleRepository
233
            .findByIdAndUser(psId, currentUser)
234 1 1. lambda$deleteCourses$5 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses$5 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PersonalSchedule.class, psId));
235
236
    String body =
237
        ucsbCurriculumService.getAllSections(psCourse.getEnrollCd(), checkPsId.getQuarter());
238 1 1. deleteCourses : negated conditional → KILLED
    if (body.equals("{\"error\": \"401: Unauthorized\"}")
239 1 1. deleteCourses : negated conditional → KILLED
        || body.equals("{\"error\": \"Enroll code doesn't exist in that quarter.\"}")) {
240 1 1. deleteCourses : removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED
      coursesRepository.delete(psCourse);
241 1 1. deleteCourses : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses → KILLED
      return genericMessage("PSCourse with id %s deleted".formatted(id));
242
    }
243
244
    Iterator<JsonNode> it = mapper.readTree(body).path("classSections").elements();
245
    Optional<Long> primaryId = Optional.empty();
246
    Optional<Long> secondaryId = Optional.empty();
247 1 1. deleteCourses : negated conditional → KILLED
    while (it.hasNext()) {
248
      JsonNode classSection = it.next();
249
      String section = classSection.path("section").asText();
250
      String currentEnrollCd = classSection.path("enrollCode").asText();
251
      Optional<PSCourse> currentPsCourse =
252
          coursesRepository.findByPsIdAndEnrollCd(psId, currentEnrollCd);
253 1 1. deleteCourses : negated conditional → KILLED
      if (!currentPsCourse.isPresent()) continue;
254
      Optional<Long> idOpt = Optional.of(currentPsCourse.get().getId());
255 1 1. deleteCourses : negated conditional → KILLED
      if (section.endsWith("00")) primaryId = idOpt;
256
      else secondaryId = idOpt;
257 1 1. deleteCourses : removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED
      coursesRepository.delete(currentPsCourse.get());
258
    }
259
260 2 1. deleteCourses : negated conditional → KILLED
2. deleteCourses : negated conditional → KILLED
    if (primaryId.isPresent() && secondaryId.isPresent()) {
261 1 1. deleteCourses : negated conditional → KILLED
      if (primaryId.get() == id)
262 1 1. deleteCourses : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses → KILLED
        return genericMessage(
263
            "PSCourse with id %s and matching secondary with id %s deleted"
264
                .formatted(id, secondaryId.get()));
265
      else
266 1 1. deleteCourses : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses → KILLED
        return genericMessage(
267
            "PSCourse with id %s and matching primary with id %s deleted"
268
                .formatted(id, primaryId.get()));
269
    }
270
271 1 1. deleteCourses : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses → KILLED
    return genericMessage("PSCourse with id %s deleted".formatted(id));
272
  }
273
274
  @Operation(summary = "Delete a course with psid and enroll code (user)")
275
  @PreAuthorize("hasRole('ROLE_USER')")
276
  @DeleteMapping("/user/psid")
277
  public Object deleteCourses_PSID(
278
      @Parameter(name = "enrollCd") @RequestParam String enrollCd,
279
      @Parameter(name = "psId") @RequestParam Long psId)
280
      throws Exception {
281
    User currentUser = getCurrentUser().getUser();
282
283
    PSCourse psCourse =
284
        coursesRepository
285
            .findByPsIdAndEnrollCd(psId, enrollCd)
286
            .orElseThrow(
287
                () ->
288 1 1. lambda$deleteCourses_PSID$6 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses_PSID$6 → KILLED
                    new EntityNotFoundException(
289
                        PSCourse.class, "psId", psId, "enrollCode", enrollCd));
290
    long id = psCourse.getId();
291
    PersonalSchedule checkPsId =
292
        personalScheduleRepository
293
            .findByIdAndUser(psId, currentUser)
294 1 1. lambda$deleteCourses_PSID$7 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses_PSID$7 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PersonalSchedule.class, psId));
295
296
    String body =
297
        ucsbCurriculumService.getAllSections(psCourse.getEnrollCd(), checkPsId.getQuarter());
298 1 1. deleteCourses_PSID : negated conditional → KILLED
    if (body.equals("{\"error\": \"401: Unauthorized\"}")
299 1 1. deleteCourses_PSID : negated conditional → KILLED
        || body.equals("{\"error\": \"Enroll code doesn't exist in that quarter.\"}")) {
300 1 1. deleteCourses_PSID : removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED
      coursesRepository.delete(psCourse);
301 1 1. deleteCourses_PSID : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_PSID → KILLED
      return genericMessage(
302
          "PSCourse with psId %s and enroll code %s deleted".formatted(psId, enrollCd));
303
    }
304
305
    Iterator<JsonNode> it = mapper.readTree(body).path("classSections").elements();
306
    Optional<Long> primaryId = Optional.empty();
307
    Optional<Long> secondaryId = Optional.empty();
308 1 1. deleteCourses_PSID : negated conditional → KILLED
    while (it.hasNext()) {
309
      JsonNode classSection = it.next();
310
      String section = classSection.path("section").asText();
311
      String currentEnrollCd = classSection.path("enrollCode").asText();
312
      Optional<PSCourse> currentPsCourse =
313
          coursesRepository.findByPsIdAndEnrollCd(psId, currentEnrollCd);
314 1 1. deleteCourses_PSID : negated conditional → KILLED
      if (!currentPsCourse.isPresent()) continue;
315
      Optional<Long> idOpt = Optional.of(currentPsCourse.get().getId());
316 1 1. deleteCourses_PSID : negated conditional → KILLED
      if (section.endsWith("00")) primaryId = idOpt;
317
      else secondaryId = idOpt;
318 1 1. deleteCourses_PSID : removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED
      coursesRepository.delete(currentPsCourse.get());
319
    }
320
321 2 1. deleteCourses_PSID : negated conditional → KILLED
2. deleteCourses_PSID : negated conditional → KILLED
    if (primaryId.isPresent() && secondaryId.isPresent()) {
322 1 1. deleteCourses_PSID : negated conditional → KILLED
      if (primaryId.get() == id)
323 1 1. deleteCourses_PSID : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_PSID → KILLED
        return genericMessage(
324
            "PSCourse with id %s and matching secondary with id %s deleted"
325
                .formatted(id, secondaryId.get()));
326
      else
327 1 1. deleteCourses_PSID : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_PSID → KILLED
        return genericMessage(
328
            "PSCourse with id %s and matching primary with id %s deleted"
329
                .formatted(id, primaryId.get()));
330
    }
331
332 1 1. deleteCourses_PSID : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_PSID → KILLED
    return genericMessage(
333
        "PSCourse with psId %s and enroll code %s deleted".formatted(psId, enrollCd));
334
  }
335
336
  @Operation(summary = "Update a single Course (admin)")
337
  @PreAuthorize("hasRole('ROLE_ADMIN')")
338
  @PutMapping("/admin")
339
  public PSCourse putCourseById_admin(
340
      @Parameter(name = "id") @RequestParam Long id, @RequestBody @Valid PSCourse incomingCourses) {
341
    PSCourse courses =
342
        coursesRepository
343
            .findById(id)
344 1 1. lambda$putCourseById_admin$8 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$putCourseById_admin$8 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PSCourse.class, id));
345
346 1 1. putCourseById_admin : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED
    courses.setEnrollCd(incomingCourses.getEnrollCd());
347 1 1. putCourseById_admin : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED
    courses.setPsId(incomingCourses.getPsId());
348
349
    coursesRepository.save(courses);
350
351 1 1. putCourseById_admin : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::putCourseById_admin → KILLED
    return courses;
352
  }
353
354
  @Operation(summary = "Update a single course (user)")
355
  @PreAuthorize("hasRole('ROLE_USER')")
356
  @PutMapping("/user")
357
  public PSCourse putCoursesById(
358
      @Parameter(name = "id") @RequestParam Long id, @RequestBody @Valid PSCourse incomingCourses) {
359
    User currentUser = getCurrentUser().getUser();
360
    PSCourse courses =
361
        coursesRepository
362
            .findByIdAndUser(id, currentUser)
363 1 1. lambda$putCoursesById$9 : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$putCoursesById$9 → KILLED
            .orElseThrow(() -> new EntityNotFoundException(PSCourse.class, id));
364
365 1 1. putCoursesById : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED
    courses.setEnrollCd(incomingCourses.getEnrollCd());
366 1 1. putCoursesById : removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED
    courses.setPsId(incomingCourses.getPsId());
367
368
    coursesRepository.save(courses);
369
370 1 1. putCoursesById : replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::putCoursesById → KILLED
    return courses;
371
  }
372
}

Mutations

49

1.1
Location : allUsersCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_admin_all__admin_logged_in__returns_all_courses()]
replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/controllers/PSCourseController::allUsersCourses → KILLED

58

1.1
Location : thisUsersCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_all__user_logged_in__returns_only_courses_for_user()]
replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/controllers/PSCourseController::thisUsersCourses → KILLED

66

1.1
Location : allCoursesForPsId
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__admin_logged_in__returns_a_courses_that_exists_using_psid()]
replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/controllers/PSCourseController::allCoursesForPsId → KILLED

76

1.1
Location : thisUsersCoursesForPsId
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__returns_a_courses_that_exists_using_psid()]
replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/controllers/PSCourseController::thisUsersCoursesForPsId → KILLED

86

1.1
Location : lambda$getCourseById_admin$0
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__admin_logged_in__search_for_course_that_does_not_exist()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$getCourseById_admin$0 → KILLED

88

1.1
Location : getCourseById_admin
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__admin_logged_in__search_for_course_that_belongs_to_another_user()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::getCourseById_admin → KILLED

99

1.1
Location : lambda$getCourseById$1
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__search_for_courses_that_belongs_to_another_user()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$getCourseById$1 → KILLED

101

1.1
Location : getCourseById
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__returns_a_courses_that_exists()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::getCourseById → KILLED

117

1.1
Location : lambda$postCourses$2
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:apiCoursesUserCreatesCourseWithInvalidPSID()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$postCourses$2 → KILLED

120

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:apiCoursesUserCreatesCourseWithInvalidEnrollCd2()]
negated conditional → KILLED

121

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:apiCoursesUserCreatesCourseWithInvalidEnrollCd()]
negated conditional → KILLED

131

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__secondary_enroll_code_adds_secondary_and_primary()]
negated conditional → KILLED

136

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__secondary_enroll_code_adds_secondary_and_primary()]
negated conditional → KILLED

138

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__secondary_enroll_code_adds_secondary_and_primary()]
negated conditional → KILLED

146

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__secondary_enroll_code_adds_secondary_and_primary()]
negated conditional → KILLED

152

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__primary_enroll_code_already_exists()]
negated conditional → KILLED

153

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__primary_enroll_code_already_exists()]
negated conditional → KILLED

159

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__primary_enroll_code()]
negated conditional → KILLED

165

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__replaces_previous_secondary_section()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setUser → KILLED

166

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__replaces_previous_secondary_section()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED

167

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__replaces_previous_secondary_section()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED

169

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__replaces_previous_secondary_section()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED

173

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__replaces_previous_secondary_section()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setUser → KILLED

174

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__replaces_previous_secondary_section()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED

175

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__replaces_previous_secondary_section()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED

180

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__replaces_previous_secondary_section()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::postCourses → KILLED

183

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__primary_enroll_code()]
negated conditional → KILLED

186

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__secondary_enroll_code_adds_secondary_and_primary()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setUser → KILLED

187

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__secondary_enroll_code_adds_secondary_and_primary()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED

188

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__secondary_enroll_code_adds_secondary_and_primary()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED

191

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__primary_enroll_code()]
negated conditional → KILLED

198

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__primary_enroll_code()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setUser → KILLED

199

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__primary_enroll_code()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED

200

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__primary_enroll_code()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED

204

1.1
Location : postCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses_post__user_logged_in__primary_enroll_code()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::postCourses → KILLED

214

1.1
Location : lambda$deleteCourses_Admin$3
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__admin_logged_in__cannot_delete_course_that_does_not_exist()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses_Admin$3 → KILLED

216

1.1
Location : deleteCourses_Admin
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__admin_logged_in__delete_course()]
removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED

218

1.1
Location : deleteCourses_Admin
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__admin_logged_in__delete_course()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_Admin → KILLED

229

1.1
Location : lambda$deleteCourses$4
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course_that_does_not_exist()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses$4 → KILLED

234

1.1
Location : lambda$deleteCourses$5
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course_with_personal_schedule_that_does_not_exist()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses$5 → KILLED

238

1.1
Location : deleteCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course__ucsb_api__unauthorized_error__treat_as_primary()]
negated conditional → KILLED

239

1.1
Location : deleteCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course__ucsb_api__enroll_code_does_not_exist_error__treat_as_primary()]
negated conditional → KILLED

240

1.1
Location : deleteCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course__ucsb_api__enroll_code_does_not_exist_error__treat_as_primary()]
removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED

241

1.1
Location : deleteCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course__ucsb_api__enroll_code_does_not_exist_error__treat_as_primary()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses → KILLED

247

1.1
Location : deleteCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course__primary_with_no_secondary()]
negated conditional → KILLED

253

1.1
Location : deleteCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course__primary_with_no_secondary()]
negated conditional → KILLED

255

1.1
Location : deleteCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course__primary_with_secondary()]
negated conditional → KILLED

257

1.1
Location : deleteCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course__primary_with_no_secondary()]
removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED

260

1.1
Location : deleteCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course__primary_with_secondary()]
negated conditional → KILLED

2.2
Location : deleteCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course__primary_with_no_secondary()]
negated conditional → KILLED

261

1.1
Location : deleteCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course__primary_with_secondary()]
negated conditional → KILLED

262

1.1
Location : deleteCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course__primary_with_secondary()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses → KILLED

266

1.1
Location : deleteCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course__secondary_with_primary()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses → KILLED

271

1.1
Location : deleteCourses
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_course__primary_with_no_secondary()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses → KILLED

288

1.1
Location : lambda$deleteCourses_PSID$6
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course_that_does_not_exist()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses_PSID$6 → KILLED

294

1.1
Location : lambda$deleteCourses_PSID$7
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course_with_personal_schedule_that_does_not_exist()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses_PSID$7 → KILLED

298

1.1
Location : deleteCourses_PSID
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course__ucsb_api__unauthorized_error__treat_as_primary()]
negated conditional → KILLED

299

1.1
Location : deleteCourses_PSID
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course__primary_with_no_secondary()]
negated conditional → KILLED

300

1.1
Location : deleteCourses_PSID
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course__ucsb_api__unauthorized_error__treat_as_primary()]
removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED

301

1.1
Location : deleteCourses_PSID
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course__ucsb_api__unauthorized_error__treat_as_primary()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_PSID → KILLED

308

1.1
Location : deleteCourses_PSID
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course__primary_with_no_secondary()]
negated conditional → KILLED

314

1.1
Location : deleteCourses_PSID
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course__primary_with_no_secondary()]
negated conditional → KILLED

316

1.1
Location : deleteCourses_PSID
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course__primary_with_multiple_secondaries()]
negated conditional → KILLED

318

1.1
Location : deleteCourses_PSID
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course__primary_with_no_secondary()]
removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED

321

1.1
Location : deleteCourses_PSID
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course__primary_with_no_secondary()]
negated conditional → KILLED

2.2
Location : deleteCourses_PSID
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course__primary_with_multiple_secondaries()]
negated conditional → KILLED

322

1.1
Location : deleteCourses_PSID
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course__primary_with_multiple_secondaries()]
negated conditional → KILLED

323

1.1
Location : deleteCourses_PSID
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course__primary_with_multiple_secondaries()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_PSID → KILLED

327

1.1
Location : deleteCourses_PSID
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course__secondary_with_primary()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_PSID → KILLED

332

1.1
Location : deleteCourses_PSID
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__delete_by_psid_course__primary_with_no_secondary()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses_PSID → KILLED

344

1.1
Location : lambda$putCourseById_admin$8
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__admin_logged_in__cannot_put_course_that_does_not_exist()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$putCourseById_admin$8 → KILLED

346

1.1
Location : putCourseById_admin
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_schedules__admin_logged_in__put_schedule()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED

347

1.1
Location : putCourseById_admin
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_schedules__admin_logged_in__put_schedule()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED

351

1.1
Location : putCourseById_admin
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_schedules__admin_logged_in__put_schedule()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::putCourseById_admin → KILLED

363

1.1
Location : lambda$putCoursesById$9
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__cannot_put_course_that_does_not_exist()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$putCoursesById$9 → KILLED

365

1.1
Location : putCoursesById
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__put_course()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED

366

1.1
Location : putCoursesById
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__put_course()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED

370

1.1
Location : putCoursesById
Killed by : edu.ucsb.cs156.courses.controllers.PSCourseControllerTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.controllers.PSCourseControllerTests]/[method:api_courses__user_logged_in__put_course()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::putCoursesById → KILLED

Active mutators

Tests examined


Report generated by PIT 1.17.0