ConvertedSection.java

1
package edu.ucsb.cs156.courses.documents;
2
3
import lombok.AllArgsConstructor;
4
import lombok.Builder;
5
import lombok.Data;
6
import lombok.NoArgsConstructor;
7
import org.bson.types.ObjectId;
8
import org.springframework.data.mongodb.core.mapping.Document;
9
10
@Data
11
@Builder
12
@NoArgsConstructor
13
@AllArgsConstructor
14
@Document(collection = "courses")
15
public class ConvertedSection {
16
  private ObjectId _id;
17
  private CourseInfo courseInfo;
18
  private Section section;
19
  private FinalExam finalExam;
20
21
  @Override
22
  public Object clone() throws CloneNotSupportedException {
23
24
    ConvertedSection newConvertedSection = new ConvertedSection();
25
26 1 1. clone : removed call to edu/ucsb/cs156/courses/documents/ConvertedSection::set_id → KILLED
    newConvertedSection.set_id(this._id);
27
28
    CourseInfo newCourseInfo = (CourseInfo) this.getCourseInfo().clone();
29 1 1. clone : removed call to edu/ucsb/cs156/courses/documents/ConvertedSection::setCourseInfo → KILLED
    newConvertedSection.setCourseInfo(newCourseInfo);
30
31
    Section newSection = (Section) this.getSection().clone();
32 1 1. clone : removed call to edu/ucsb/cs156/courses/documents/ConvertedSection::setSection → KILLED
    newConvertedSection.setSection(newSection);
33
34 1 1. clone : negated conditional → KILLED
    if (this.getFinalExam() != null) {
35
      FinalExam newFinalExam = (FinalExam) this.getFinalExam().clone();
36 1 1. clone : removed call to edu/ucsb/cs156/courses/documents/ConvertedSection::setFinalExam → KILLED
      newConvertedSection.setFinalExam(newFinalExam);
37
    }
38
39 1 1. clone : replaced return value with null for edu/ucsb/cs156/courses/documents/ConvertedSection::clone → KILLED
    return newConvertedSection;
40
  }
41
}

Mutations

26

1.1
Location : clone
Killed by : edu.ucsb.cs156.courses.documents.ConvertedSectionTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.documents.ConvertedSectionTests]/[method:test_clone()]
removed call to edu/ucsb/cs156/courses/documents/ConvertedSection::set_id → KILLED

29

1.1
Location : clone
Killed by : edu.ucsb.cs156.courses.documents.ConvertedSectionTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.documents.ConvertedSectionTests]/[method:test_clone()]
removed call to edu/ucsb/cs156/courses/documents/ConvertedSection::setCourseInfo → KILLED

32

1.1
Location : clone
Killed by : edu.ucsb.cs156.courses.documents.ConvertedSectionTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.documents.ConvertedSectionTests]/[method:test_clone()]
removed call to edu/ucsb/cs156/courses/documents/ConvertedSection::setSection → KILLED

34

1.1
Location : clone
Killed by : edu.ucsb.cs156.courses.documents.ConvertedSectionTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.documents.ConvertedSectionTests]/[method:test_clone()]
negated conditional → KILLED

36

1.1
Location : clone
Killed by : edu.ucsb.cs156.courses.documents.ConvertedSectionTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.documents.ConvertedSectionTests]/[method:test_clone()]
removed call to edu/ucsb/cs156/courses/documents/ConvertedSection::setFinalExam → KILLED

39

1.1
Location : clone
Killed by : edu.ucsb.cs156.courses.documents.ConvertedSectionTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.documents.ConvertedSectionTests]/[method:test_clone()]
replaced return value with null for edu/ucsb/cs156/courses/documents/ConvertedSection::clone → KILLED

Active mutators

Tests examined


Report generated by PIT 1.7.3