PSCourseController.java

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

Mutations

50

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 null for edu/ucsb/cs156/courses/controllers/PSCourseController::allUsersCourses → KILLED

59

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 null for edu/ucsb/cs156/courses/controllers/PSCourseController::thisUsersCourses → KILLED

67

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 null for edu/ucsb/cs156/courses/controllers/PSCourseController::allCoursesForPsId → KILLED

77

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 null for edu/ucsb/cs156/courses/controllers/PSCourseController::thisUsersCoursesForPsId → KILLED

87

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

89

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

100

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_does_not_exist()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$getCourseById$1 → KILLED

102

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

118

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

121

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

122

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

130

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_has_one_secondary_reversed()]
negated conditional → KILLED

133

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_has_one_secondary_reversed()]
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__primary_enroll_code_has_one_secondary()]
negated conditional → KILLED

142

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_has_one_secondary_reversed()]
negated conditional → KILLED

147

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_has_one_secondary_reversed()]
negated conditional → KILLED

155

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_has_one_secondary_reversed()]
Replaced integer subtraction with addition → 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_has_one_secondary_reversed()]
negated conditional → KILLED

162

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

163

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

164

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

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__secondary_enroll_code_adds_secondary_and_primary()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsName → 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__secondary_enroll_code_adds_secondary_and_primary()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setCourseName → 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__secondary_enroll_code_adds_secondary_and_primary()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setQuarter → KILLED

170

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_has_one_secondary_reversed()]
negated conditional → KILLED

177

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__post_course_from_spring()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setUser → KILLED

178

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__post_course_from_spring()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED

179

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__post_course_from_spring()]
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__post_course_from_spring()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsName → KILLED

181

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__post_course_from_spring()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setCourseName → KILLED

182

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__post_course_from_spring()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setQuarter → KILLED

185

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__post_course_from_spring()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::postCourses → KILLED

195

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

197

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

199

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

211

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__cannot_delete_delete_belonging_to_another_user()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourses$4 → KILLED

216

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

220

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__primary_not_found__treat_as_primary()]
negated conditional → KILLED

221

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

222

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

223

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

229

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

235

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

237

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

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__primary_with_no_secondary()]
removed call to edu/ucsb/cs156/courses/repositories/PSCourseRepository::delete → KILLED

242

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__primary_not_found__treat_as_primary()]
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

243

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

244

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

248

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

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()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::deleteCourses → KILLED

267

1.1
Location : lambda$deleteCourseByPsIdAndEnrollCd$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__cannot_delete_delete_belonging_to_another_user()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourseByPsIdAndEnrollCd$6 → KILLED

274

1.1
Location : lambda$deleteCourseByPsIdAndEnrollCd$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_course_with_personal_schedule_that_does_not_exist()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::lambda$deleteCourseByPsIdAndEnrollCd$7 → KILLED

278

1.1
Location : deleteCourseByPsIdAndEnrollCd
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

279

1.1
Location : deleteCourseByPsIdAndEnrollCd
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

280

1.1
Location : deleteCourseByPsIdAndEnrollCd
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

281

1.1
Location : deleteCourseByPsIdAndEnrollCd
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::deleteCourseByPsIdAndEnrollCd → KILLED

287

1.1
Location : deleteCourseByPsIdAndEnrollCd
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

293

1.1
Location : deleteCourseByPsIdAndEnrollCd
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

295

1.1
Location : deleteCourseByPsIdAndEnrollCd
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

297

1.1
Location : deleteCourseByPsIdAndEnrollCd
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

300

1.1
Location : deleteCourseByPsIdAndEnrollCd
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__primary_not_found__treat_as_primary()]
negated conditional → KILLED

2.2
Location : deleteCourseByPsIdAndEnrollCd
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

301

1.1
Location : deleteCourseByPsIdAndEnrollCd
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

302

1.1
Location : deleteCourseByPsIdAndEnrollCd
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::deleteCourseByPsIdAndEnrollCd → KILLED

306

1.1
Location : deleteCourseByPsIdAndEnrollCd
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::deleteCourseByPsIdAndEnrollCd → KILLED

311

1.1
Location : deleteCourseByPsIdAndEnrollCd
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::deleteCourseByPsIdAndEnrollCd → KILLED

322

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

324

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_change_fields()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setEnrollCd → KILLED

325

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_change_fields()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsId → KILLED

326

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_change_fields()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setPsName → KILLED

327

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_change_fields()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setCourseName → KILLED

328

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_change_fields()]
removed call to edu/ucsb/cs156/courses/entities/PSCourse::setQuarter → KILLED

332

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_change_fields()]
replaced return value with null for edu/ucsb/cs156/courses/controllers/PSCourseController::putCourseById_admin → KILLED

344

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

346

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

347

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

348

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::setPsName → KILLED

349

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::setCourseName → KILLED

350

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::setQuarter → KILLED

354

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.7.3