Quarter.java

1
package edu.ucsb.cs156.courses.models;
2
3
import java.util.ArrayList;
4
import java.util.List;
5
import java.util.Objects;
6
7
/**
8
 * Represents a UCSB quarter. Allows easy conversion between QYY alphanumeric format (F19, W20, S20,
9
 * M20) and YYYYQ numerical format (20194, 20201, 20202, 20203) as well as incrementing and
10
 * decrementing.
11
 */
12
public class Quarter {
13
14
  private int yyyyq; // YYYYQ where Q = 1, 2, 3 or 4
15
16
  public Quarter(int yyyyq) {
17 1 1. <init> : removed call to edu/ucsb/cs156/courses/models/Quarter::setValue → KILLED
    setValue(yyyyq);
18
  }
19
20
  public int getValue() {
21 1 1. getValue : replaced int return with 0 for edu/ucsb/cs156/courses/models/Quarter::getValue → KILLED
    return this.yyyyq;
22
  }
23
24
  public void setValue(int yyyyq) {
25 1 1. setValue : negated conditional → KILLED
    if (invalidQtr(yyyyq))
26
      throw new IllegalArgumentException(
27
          "Quarter constructor requires a integer ending in 1,2,3 or 4");
28
    this.yyyyq = yyyyq;
29
  }
30
31
  /**
32
   * Construct a Quarter object from a string s, either in QYY or YYYYQ format. If s is of length
33
   * three, QYY format is expected, if 5 then YYYYQ format is expected. Otherwise an
34
   * IllegalArgumentException is thrown.
35
   *
36
   * @param s Quarter either in QYY or YYYYQ format
37
   */
38
  public Quarter(String s) {
39
40
    switch (s.length()) {
41
      case 3:
42
        this.yyyyq = qyyToyyyyQ(s);
43
        return;
44
      case 5:
45
        this.yyyyq = yyyyqToInt(s);
46
        return;
47
      default:
48
        throw new IllegalArgumentException("Quarter should be in QYY or YYYYQ format");
49
    }
50
  }
51
52
  public String getYY() {
53 1 1. getYY : replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::getYY → KILLED
    return getYY(this.yyyyq);
54
  }
55
56
  public String getYYYY() {
57 1 1. getYYYY : replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::getYYYY → KILLED
    return getYYYY(this.yyyyq);
58
  }
59
60
  public String getYYYYQ() {
61 1 1. getYYYYQ : replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::getYYYYQ → KILLED
    return String.format("%d", this.yyyyq);
62
  }
63
64
  public String toString() {
65 1 1. toString : replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::toString → KILLED
    return yyyyqToQyy(this.yyyyq);
66
  }
67
68
  public String getQ() {
69 1 1. getQ : replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::getQ → KILLED
    return getQ(this.yyyyq);
70
  }
71
72
  private static boolean invalidQtr(int value) {
73 1 1. invalidQtr : Replaced integer modulus with multiplication → KILLED
    int index = value % 10;
74 5 1. invalidQtr : changed conditional boundary → KILLED
2. invalidQtr : negated conditional → KILLED
3. invalidQtr : replaced boolean return with true for edu/ucsb/cs156/courses/models/Quarter::invalidQtr → KILLED
4. invalidQtr : negated conditional → KILLED
5. invalidQtr : changed conditional boundary → KILLED
    return (index < 1) || (index > 4);
75
  }
76
77
  /**
78
   * Advance to the next quarter, and return the value of that quarter as an int.
79
   *
80
   * @return the new getValue() for the quarter, i.e. quarter as in in yyyyq format
81
   */
82
  public int increment() {
83 1 1. increment : Replaced integer modulus with multiplication → KILLED
    int q = this.yyyyq % 10;
84 1 1. increment : Replaced integer division with multiplication → KILLED
    int yyyy = this.yyyyq / 10;
85
86 6 1. increment : Replaced integer addition with subtraction → KILLED
2. increment : Replaced integer addition with subtraction → KILLED
3. increment : negated conditional → KILLED
4. increment : Replaced integer addition with subtraction → KILLED
5. increment : removed call to edu/ucsb/cs156/courses/models/Quarter::setValue → KILLED
6. increment : Replaced integer multiplication with division → KILLED
    setValue((q == 4) ? (((yyyy + 1) * 10) + 1) : (this.yyyyq + 1));
87 1 1. increment : replaced int return with 0 for edu/ucsb/cs156/courses/models/Quarter::increment → KILLED
    return this.yyyyq;
88
  }
89
90
  /**
91
   * Subtract one from current quarter, and return the value of that quarter as an int.
92
   *
93
   * @return the new getValue() for the quarter, i.e. quarter as in in yyyyq format
94
   */
95
  public int decrement() {
96 1 1. decrement : Replaced integer modulus with multiplication → KILLED
    int q = this.yyyyq % 10;
97 1 1. decrement : Replaced integer division with multiplication → KILLED
    int yyyy = this.yyyyq / 10;
98
99 6 1. decrement : removed call to edu/ucsb/cs156/courses/models/Quarter::setValue → KILLED
2. decrement : Replaced integer subtraction with addition → KILLED
3. decrement : Replaced integer addition with subtraction → KILLED
4. decrement : negated conditional → KILLED
5. decrement : Replaced integer multiplication with division → KILLED
6. decrement : Replaced integer subtraction with addition → KILLED
    setValue((q == 1) ? (((yyyy - 1) * 10) + 4) : (this.yyyyq - 1));
100 1 1. decrement : replaced int return with 0 for edu/ucsb/cs156/courses/models/Quarter::decrement → KILLED
    return this.yyyyq;
101
  }
102
103
  /**
104
   * Convert yyyyq as string to int, throwing exception if format is incorrect
105
   *
106
   * @param yyyyq String in yyyyq format (e.g. 20194 for F19 (Fall 2019))
107
   * @throws IllegalArgumentException
108
   * @return int representation of quarter
109
   */
110
  public static int yyyyqToInt(String yyyyq) {
111
    String errorMsg =
112
        "Argument should be a string representation of a five digit integer yyyyq ending in 1,2,3 or 4";
113
    int result = 0;
114
    try {
115
      result = Integer.parseInt(yyyyq);
116
    } catch (Exception e) {
117
      throw new IllegalArgumentException(errorMsg);
118
    }
119 1 1. yyyyqToInt : negated conditional → KILLED
    if (invalidQtr(result)) {
120
      throw new IllegalArgumentException(errorMsg);
121
    }
122 1 1. yyyyqToInt : replaced int return with 0 for edu/ucsb/cs156/courses/models/Quarter::yyyyqToInt → KILLED
    return result;
123
  }
124
125
  /**
126
   * Convert yyyyq int format to Yqq String format throwing exception if format is incorrect
127
   *
128
   * @param yyyyq int (e.g. 20194 for Fall 2019
129
   * @throws IllegalArgumentException
130
   * @return Qyy representation (e.g. F19)
131
   */
132
  public static String yyyyqToQyy(int yyyyq) {
133 1 1. yyyyqToQyy : negated conditional → KILLED
    if (invalidQtr(yyyyq)) {
134
      throw new IllegalArgumentException(
135
          "Argument should be a five digit integer in qqqqy format ending in 1,2,3 or 4");
136
    }
137 1 1. yyyyqToQyy : replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::yyyyqToQyy → KILLED
    return String.format("%s%s", getQ(yyyyq), getYY(yyyyq));
138
  }
139
140
  /**
141
   * Take yyyyq int format and return single character for quarter, either "W", "S", "M", or "F" for
142
   * last digit 1, 2, 3, 4, respectively. Throw illegal argument exception if not in yyyyq format.
143
   *
144
   * @param yyyyq int (e.g. 20194 for Fall 2019)
145
   * @throws IllegalArgumentException
146
   * @return single char string for quarter (e.g. "F")
147
   */
148
  public static String getQ(int yyyyq) {
149 1 1. getQ : negated conditional → KILLED
    if (invalidQtr(yyyyq)) {
150
      throw new IllegalArgumentException(
151
          "Argument should be a five digit integer in qqqqy format ending in 1,2,3 or 4");
152
    }
153
    String[] quarters = new String[] {"W", "S", "M", "F"};
154 1 1. getQ : Replaced integer modulus with multiplication → KILLED
    int index = yyyyq % 10;
155 2 1. getQ : replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::getQ → KILLED
2. getQ : Replaced integer subtraction with addition → KILLED
    return quarters[index - 1];
156
  }
157
158
  /**
159
   * Take yyyyq int format and return two digit year as a String Throw illegal argument exception if
160
   * not in yyyyq format.
161
   *
162
   * @param yyyyq int (e.g. 20194 for Fall 2019)
163
   * @throws IllegalArgumentException
164
   * @return two char string for year (e.g. "19")
165
   */
166
  public static String getYY(int yyyyq) {
167 1 1. getYY : negated conditional → KILLED
    if (invalidQtr(yyyyq)) {
168
      throw new IllegalArgumentException(
169
          "Argument should be a five digit integer in qqqqy format ending in 1,2,3 or 4");
170
    }
171 3 1. getYY : Replaced integer division with multiplication → KILLED
2. getYY : replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::getYY → KILLED
3. getYY : Replaced integer modulus with multiplication → KILLED
    return String.format("%02d", (yyyyq / 10) % 100);
172
  }
173
174
  /**
175
   * Take yyyyq int format and return four digit year as a String Throw illegal argument exception
176
   * if not in yyyyq format.
177
   *
178
   * @param yyyyq int (e.g. 20194 for Fall 2019)
179
   * @throws IllegalArgumentException
180
   * @return four char string for year (e.g. "2019")
181
   */
182
  public static String getYYYY(int yyyyq) {
183 1 1. getYYYY : negated conditional → KILLED
    if (invalidQtr(yyyyq)) {
184
      throw new IllegalArgumentException(
185
          "Argument should be a five digit integer in qqqqy format ending in 1,2,3 or 4");
186
    }
187 2 1. getYYYY : Replaced integer division with multiplication → KILLED
2. getYYYY : replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::getYYYY → KILLED
    return String.format("%04d", (yyyyq / 10));
188
  }
189
190
  public static int qyyToyyyyQ(String qyy) {
191 1 1. qyyToyyyyQ : negated conditional → KILLED
    if (qyy.length() != 3) throw new IllegalArgumentException("Argument should be in QYY format");
192
193
    char q = qyy.charAt(0);
194
    String yy = qyy.substring(1, 3);
195
    String legalQuarters = "WSMF";
196 1 1. qyyToyyyyQ : Replaced integer addition with subtraction → KILLED
    int qInt = legalQuarters.indexOf(q) + 1;
197 1 1. qyyToyyyyQ : negated conditional → KILLED
    if (invalidQtr(qInt)) {
198
      throw new IllegalArgumentException("First char should be one of " + legalQuarters);
199
    }
200
    int yyInt = Integer.parseInt(yy);
201 2 1. qyyToyyyyQ : negated conditional → KILLED
2. qyyToyyyyQ : changed conditional boundary → KILLED
    int century = (yyInt > 50) ? 1900 : 2000;
202 4 1. qyyToyyyyQ : Replaced integer multiplication with division → KILLED
2. qyyToyyyyQ : Replaced integer addition with subtraction → KILLED
3. qyyToyyyyQ : Replaced integer addition with subtraction → KILLED
4. qyyToyyyyQ : replaced int return with 0 for edu/ucsb/cs156/courses/models/Quarter::qyyToyyyyQ → KILLED
    return (century + yyInt) * 10 + qInt;
203
  }
204
205
  @Override
206
  public boolean equals(Object o) {
207 2 1. equals : negated conditional → KILLED
2. equals : replaced boolean return with false for edu/ucsb/cs156/courses/models/Quarter::equals → KILLED
    if (o == this) return true;
208 1 1. equals : negated conditional → KILLED
    if (!(o instanceof Quarter)) {
209 1 1. equals : replaced boolean return with true for edu/ucsb/cs156/courses/models/Quarter::equals → KILLED
      return false;
210
    }
211
    Quarter quarter = (Quarter) o;
212 2 1. equals : negated conditional → KILLED
2. equals : replaced boolean return with true for edu/ucsb/cs156/courses/models/Quarter::equals → KILLED
    return yyyyq == quarter.yyyyq;
213
  }
214
215
  @Override
216
  public int hashCode() {
217 1 1. hashCode : replaced int return with 0 for edu/ucsb/cs156/courses/models/Quarter::hashCode → KILLED
    return Objects.hashCode(yyyyq);
218
  }
219
220
  /**
221
   * return a list of Quarters starting with the start parameter and ending with the end parameter,
222
   * inclusive.
223
   *
224
   * <p>The result will automatically go in chronological or reverse chronological order, depending
225
   * on the order of the parameters.
226
   *
227
   * @param start
228
   * @param end
229
   * @return list of quarters in specified order
230
   */
231
  public static List<Quarter> quarterList(String start, String end) {
232
    List<Quarter> result = new ArrayList<Quarter>();
233
234
    int startInt = Quarter.yyyyqToInt(start);
235
    int endInt = Quarter.yyyyqToInt(end);
236
237 2 1. quarterList : changed conditional boundary → KILLED
2. quarterList : negated conditional → KILLED
    if (startInt < endInt) {
238 2 1. quarterList : changed conditional boundary → KILLED
2. quarterList : negated conditional → KILLED
      for (Quarter iter = new Quarter(startInt); iter.getValue() <= endInt; iter.increment()) {
239
        Quarter q = new Quarter(iter.getValue());
240
        result.add(q);
241
      }
242
    }
243 2 1. quarterList : negated conditional → KILLED
2. quarterList : changed conditional boundary → KILLED
    if (startInt >= endInt) {
244 2 1. quarterList : changed conditional boundary → KILLED
2. quarterList : negated conditional → KILLED
      for (Quarter iter = new Quarter(startInt); iter.getValue() >= endInt; iter.decrement()) {
245
        Quarter q = new Quarter(iter.getValue());
246
        result.add(q);
247
      }
248
    }
249 1 1. quarterList : replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/models/Quarter::quarterList → KILLED
    return result;
250
  }
251
}

Mutations

17

1.1
Location : <init>
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_setValue_bad_input()]
removed call to edu/ucsb/cs156/courses/models/Quarter::setValue → KILLED

21

1.1
Location : getValue
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_constructor_20201_int()]
replaced int return with 0 for edu/ucsb/cs156/courses/models/Quarter::getValue → KILLED

25

1.1
Location : setValue
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_setValue_bad_input()]
negated conditional → KILLED

53

1.1
Location : getYY
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_getYY()]
replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::getYY → KILLED

57

1.1
Location : getYYYY
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_getYYYY()]
replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::getYYYY → KILLED

61

1.1
Location : getYYYYQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_getYYYYQ()]
replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::getYYYYQ → KILLED

65

1.1
Location : toString
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_constructor_20201_int()]
replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::toString → KILLED

69

1.1
Location : getQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_getQ()]
replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::getQ → KILLED

73

1.1
Location : invalidQtr
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_yyyyqToInt()]
Replaced integer modulus with multiplication → KILLED

74

1.1
Location : invalidQtr
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_yyyyqToInt()]
changed conditional boundary → KILLED

2.2
Location : invalidQtr
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_getQ_badLastDigit()]
negated conditional → KILLED

3.3
Location : invalidQtr
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_yyyyqToInt()]
replaced boolean return with true for edu/ucsb/cs156/courses/models/Quarter::invalidQtr → KILLED

4.4
Location : invalidQtr
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_yyyyqToInt()]
negated conditional → KILLED

5.5
Location : invalidQtr
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:testQuarter_equalsSelf()]
changed conditional boundary → KILLED

83

1.1
Location : increment
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_increment_F19()]
Replaced integer modulus with multiplication → KILLED

84

1.1
Location : increment
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_increment_F19()]
Replaced integer division with multiplication → KILLED

86

1.1
Location : increment
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_increment_F19()]
Replaced integer addition with subtraction → KILLED

2.2
Location : increment
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_increment_F19()]
Replaced integer addition with subtraction → KILLED

3.3
Location : increment
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_increment_F19()]
negated conditional → KILLED

4.4
Location : increment
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_increment_W20()]
Replaced integer addition with subtraction → KILLED

5.5
Location : increment
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_increment_F19()]
removed call to edu/ucsb/cs156/courses/models/Quarter::setValue → KILLED

6.6
Location : increment
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_increment_F19()]
Replaced integer multiplication with division → KILLED

87

1.1
Location : increment
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_increment_F19()]
replaced int return with 0 for edu/ucsb/cs156/courses/models/Quarter::increment → KILLED

96

1.1
Location : decrement
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_decrement_W20()]
Replaced integer modulus with multiplication → KILLED

97

1.1
Location : decrement
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_decrement_W20()]
Replaced integer division with multiplication → KILLED

99

1.1
Location : decrement
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_decrement_M20()]
removed call to edu/ucsb/cs156/courses/models/Quarter::setValue → KILLED

2.2
Location : decrement
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_decrement_W20()]
Replaced integer subtraction with addition → KILLED

3.3
Location : decrement
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_decrement_W20()]
Replaced integer addition with subtraction → KILLED

4.4
Location : decrement
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_decrement_M20()]
negated conditional → KILLED

5.5
Location : decrement
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_decrement_W20()]
Replaced integer multiplication with division → KILLED

6.6
Location : decrement
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_decrement_M20()]
Replaced integer subtraction with addition → KILLED

100

1.1
Location : decrement
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_decrement_M20()]
replaced int return with 0 for edu/ucsb/cs156/courses/models/Quarter::decrement → KILLED

119

1.1
Location : yyyyqToInt
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_yyyyqToInt()]
negated conditional → KILLED

122

1.1
Location : yyyyqToInt
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_yyyyqToInt()]
replaced int return with 0 for edu/ucsb/cs156/courses/models/Quarter::yyyyqToInt → KILLED

133

1.1
Location : yyyyqToQyy
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_yyyyqToQyy()]
negated conditional → KILLED

137

1.1
Location : yyyyqToQyy
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_yyyyqToQyy()]
replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::yyyyqToQyy → KILLED

149

1.1
Location : getQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_getQ_badLastDigit()]
negated conditional → KILLED

154

1.1
Location : getQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_yyyyqToQyy()]
Replaced integer modulus with multiplication → KILLED

155

1.1
Location : getQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_yyyyqToQyy()]
replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::getQ → KILLED

2.2
Location : getQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_yyyyqToQyy()]
Replaced integer subtraction with addition → KILLED

167

1.1
Location : getYY
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_getYY_badLastDigit()]
negated conditional → KILLED

171

1.1
Location : getYY
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_yyyyqToQyy()]
Replaced integer division with multiplication → KILLED

2.2
Location : getYY
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_yyyyqToQyy()]
replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::getYY → KILLED

3.3
Location : getYY
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_yyyyqToQyy()]
Replaced integer modulus with multiplication → KILLED

183

1.1
Location : getYYYY
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_getYYYY_badLastDigit()]
negated conditional → KILLED

187

1.1
Location : getYYYY
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_getYYYY()]
Replaced integer division with multiplication → KILLED

2.2
Location : getYYYY
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_getYYYY()]
replaced return value with "" for edu/ucsb/cs156/courses/models/Quarter::getYYYY → KILLED

191

1.1
Location : qyyToyyyyQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_qyyToyyyyQ_wrongLength5()]
negated conditional → KILLED

196

1.1
Location : qyyToyyyyQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_qyyToyyyyQ__S89()]
Replaced integer addition with subtraction → KILLED

197

1.1
Location : qyyToyyyyQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_qyyToyyyyQ__S89()]
negated conditional → KILLED

201

1.1
Location : qyyToyyyyQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_qyyToyyyyQ__S89()]
negated conditional → KILLED

2.2
Location : qyyToyyyyQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_qyyToyyyyQ__F50()]
changed conditional boundary → KILLED

202

1.1
Location : qyyToyyyyQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_qyyToyyyyQ__S89()]
Replaced integer multiplication with division → KILLED

2.2
Location : qyyToyyyyQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_qyyToyyyyQ__S89()]
Replaced integer addition with subtraction → KILLED

3.3
Location : qyyToyyyyQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_qyyToyyyyQ__S89()]
Replaced integer addition with subtraction → KILLED

4.4
Location : qyyToyyyyQ
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_qyyToyyyyQ__S89()]
replaced int return with 0 for edu/ucsb/cs156/courses/models/Quarter::qyyToyyyyQ → KILLED

207

1.1
Location : equals
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:testQuarter_notEqualDifferentClass()]
negated conditional → KILLED

2.2
Location : equals
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:testQuarter_equalsSelf()]
replaced boolean return with false for edu/ucsb/cs156/courses/models/Quarter::equals → KILLED

208

1.1
Location : equals
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:testQuarter_notEqualDifferentClass()]
negated conditional → KILLED

209

1.1
Location : equals
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:testQuarter_notEqualDifferentClass()]
replaced boolean return with true for edu/ucsb/cs156/courses/models/Quarter::equals → KILLED

212

1.1
Location : equals
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:testQuarter_equalsCopy()]
negated conditional → KILLED

2.2
Location : equals
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:testQuarter_notequalsCopy()]
replaced boolean return with true for edu/ucsb/cs156/courses/models/Quarter::equals → KILLED

217

1.1
Location : hashCode
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_hashCode2()]
replaced int return with 0 for edu/ucsb/cs156/courses/models/Quarter::hashCode → KILLED

237

1.1
Location : quarterList
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_quarterList_S20_F19_1()]
changed conditional boundary → KILLED

2.2
Location : quarterList
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_quarterList_F19_S20()]
negated conditional → KILLED

238

1.1
Location : quarterList
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_quarterList_F19_S20()]
changed conditional boundary → KILLED

2.2
Location : quarterList
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_quarterList_F19_S20()]
negated conditional → KILLED

243

1.1
Location : quarterList
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_quarterList_S20_F19()]
negated conditional → KILLED

2.2
Location : quarterList
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_quarterList_S20_F19_1()]
changed conditional boundary → KILLED

244

1.1
Location : quarterList
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_quarterList_S20_F19()]
changed conditional boundary → KILLED

2.2
Location : quarterList
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_quarterList_S20_F19()]
negated conditional → KILLED

249

1.1
Location : quarterList
Killed by : edu.ucsb.cs156.courses.models.QuarterTests.[engine:junit-jupiter]/[class:edu.ucsb.cs156.courses.models.QuarterTests]/[method:test_quarterList_F19_S20()]
replaced return value with Collections.emptyList for edu/ucsb/cs156/courses/models/Quarter::quarterList → KILLED

Active mutators

Tests examined


Report generated by PIT 1.17.0