RepeatingFieldSupport.java

1
package com.ancientprogramming.fixedformat4j.format.impl;
2
3
import com.ancientprogramming.fixedformat4j.annotation.Field;
4
import com.ancientprogramming.fixedformat4j.exception.FixedFormatException;
5
import com.ancientprogramming.fixedformat4j.format.FixedFormatter;
6
import com.ancientprogramming.fixedformat4j.format.FormatContext;
7
import com.ancientprogramming.fixedformat4j.format.FormatInstructions;
8
import com.ancientprogramming.fixedformat4j.format.ParseException;
9
import org.slf4j.Logger;
10
import org.slf4j.LoggerFactory;
11
12
import java.lang.reflect.AnnotatedElement;
13
import java.lang.reflect.Array;
14
import java.lang.reflect.Method;
15
import java.lang.reflect.ParameterizedType;
16
import java.lang.reflect.Type;
17
import java.util.ArrayList;
18
import java.util.Collection;
19
import java.util.HashMap;
20
import java.util.LinkedHashSet;
21
import java.util.LinkedList;
22
import java.util.List;
23
import java.util.Set;
24
import java.util.SortedSet;
25
import java.util.TreeSet;
26
27
import static com.ancientprogramming.fixedformat4j.format.FixedFormatUtil.fetchData;
28
import static com.ancientprogramming.fixedformat4j.format.FixedFormatUtil.getFixedFormatterInstance;
29
import static java.lang.String.format;
30
31
/**
32
 * Handles all {@code count > 1} (repeating) field logic for both reading and exporting.
33
 *
34
 * @author Jacob von Eyben - <a href="https://eybenconsult.com">https://eybenconsult.com</a>
35
 * @since 1.6.0
36
 */
37
class RepeatingFieldSupport {
38
39
  private static final Logger LOG = LoggerFactory.getLogger(RepeatingFieldSupport.class);
40
41
  private final FormatInstructionsBuilder instructionsBuilder = new FormatInstructionsBuilder();
42
43
  // -------------------------------------------------------------------------
44
  // Read
45
  // -------------------------------------------------------------------------
46
47
  @SuppressWarnings({"unchecked", "rawtypes"})
48
  Object read(Class<?> clazz, String data, Method getter, AnnotatedElement annotationSource, Field fieldAnno) {
49
    int count = fieldAnno.count();
50
    Class<?> elementType = resolveElementType(getter);
51
    FormatInstructions formatdata = instructionsBuilder.build(annotationSource, fieldAnno, elementType);
52
53
    FormatContext protoContext = new FormatContext(fieldAnno.offset(), elementType, fieldAnno.formatter());
54
    FixedFormatter<Object> formatter = (FixedFormatter<Object>) getFixedFormatterInstance(protoContext.getFormatter(), protoContext);
55
56
    List<Object> elements = new ArrayList<>();
57 2 1. read : changed conditional boundary → KILLED
2. read : negated conditional → KILLED
    for (int i = 0; i < count; i++) {
58 2 1. read : Replaced integer multiplication with division → KILLED
2. read : Replaced integer addition with subtraction → KILLED
      int elementOffset = fieldAnno.offset() + fieldAnno.length() * i;
59
      FormatContext elementContext = new FormatContext(elementOffset, elementType, fieldAnno.formatter());
60
      String dataToParse = fetchData(data, formatdata, elementContext);
61
      try {
62
        elements.add(formatter.parse(dataToParse, formatdata));
63
      } catch (RuntimeException e) {
64
        throw new ParseException(data, dataToParse, clazz, getter, elementContext, formatdata, e);
65
      }
66
    }
67
68 1 1. read : replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::read → KILLED
    return assembleCollection(getter, elements);
69
  }
70
71
  // -------------------------------------------------------------------------
72
  // Export
73
  // -------------------------------------------------------------------------
74
75
  @SuppressWarnings({"unchecked", "rawtypes"})
76
  <T> void export(T fixedFormatRecord, AnnotationTarget target, Field fieldAnno, HashMap<Integer, String> foundData) {
77 1 1. export : removed call to com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::validateCount → SURVIVED
    validateCount(target.getter, fieldAnno);
78
79
    Object value;
80
    try {
81
      value = target.getter.invoke(fixedFormatRecord);
82
    } catch (Exception e) {
83
      throw new FixedFormatException(format("could not invoke %s", fieldLabel(target.getter)), e);
84
    }
85
86 1 1. export : negated conditional → KILLED
    if (value == null) {
87
      throw new FixedFormatException(format("Cannot export null repeating field on %s", fieldLabel(target.getter)));
88
    }
89
90
    int count = fieldAnno.count();
91 1 1. export : negated conditional → KILLED
    int actualSize = value.getClass().isArray() ? Array.getLength(value) : ((Collection<?>) value).size();
92
93 1 1. export : negated conditional → KILLED
    if (actualSize != count) {
94 1 1. export : negated conditional → KILLED
      if (fieldAnno.strictCount()) {
95
        throw new FixedFormatException(
96
            format("Repeating field %s has count=%d but collection size=%d", fieldLabel(target.getter), count, actualSize));
97
      } else {
98
        LOG.warn("Repeating field {} has count={} but collection size={}. Exporting {} elements.",
99
            fieldLabel(target.getter), count, actualSize, Math.min(count, actualSize));
100
      }
101
    }
102
103
    int exportCount = Math.min(count, actualSize);
104
    Class<?> elementType = resolveElementType(target.getter);
105
    FormatInstructions formatdata = instructionsBuilder.build(target.annotationSource, fieldAnno, elementType);
106
    FormatContext protoContext = new FormatContext(fieldAnno.offset(), elementType, fieldAnno.formatter());
107
    FixedFormatter<Object> formatter = (FixedFormatter<Object>) getFixedFormatterInstance(protoContext.getFormatter(), protoContext);
108
109 1 1. export : negated conditional → KILLED
    Iterable<?> iterable = value.getClass().isArray() ? arrayToIterable(value, exportCount) : (Collection<?>) value;
110
111
    int i = 0;
112
    for (Object element : iterable) {
113 2 1. export : changed conditional boundary → SURVIVED
2. export : negated conditional → KILLED
      if (i >= exportCount) break;
114 2 1. export : Replaced integer multiplication with division → KILLED
2. export : Replaced integer addition with subtraction → KILLED
      int elementOffset = fieldAnno.offset() + fieldAnno.length() * i;
115
      foundData.put(elementOffset, formatter.format(element, formatdata));
116 1 1. export : Changed increment from 1 to -1 → KILLED
      i++;
117
    }
118
  }
119
120
  // -------------------------------------------------------------------------
121
  // Validation & utilities — package-private for direct testing
122
  // -------------------------------------------------------------------------
123
124
  void validateCount(Method method, Field fieldAnnotation) {
125
    int count = fieldAnnotation.count();
126
    Class<?> returnType = method.getReturnType();
127 1 1. validateCount : negated conditional → KILLED
    boolean isArrayOrCollection = returnType.isArray()
128 1 1. validateCount : negated conditional → KILLED
        || Collection.class.isAssignableFrom(returnType)
129 1 1. validateCount : negated conditional → KILLED
        || Iterable.class.isAssignableFrom(returnType);
130
131 2 1. validateCount : changed conditional boundary → KILLED
2. validateCount : negated conditional → KILLED
    if (count < 1) {
132
      throw new FixedFormatException(
133
          format("@Field count must be >= 1 on %s, was: %d", fieldLabel(method), count));
134
    }
135 2 1. validateCount : negated conditional → KILLED
2. validateCount : negated conditional → KILLED
    if (count == 1 && isArrayOrCollection) {
136
      throw new FixedFormatException(
137
          format("@Field count=1 but return type is array/collection on %s. Use count > 1 for repeating fields.", fieldLabel(method)));
138
    }
139 3 1. validateCount : changed conditional boundary → KILLED
2. validateCount : negated conditional → KILLED
3. validateCount : negated conditional → KILLED
    if (count > 1 && !isArrayOrCollection) {
140
      throw new FixedFormatException(
141
          format("@Field count=%d requires array or Collection return type on %s, found: %s", count, fieldLabel(method), returnType.getName()));
142
    }
143
  }
144
145
  Class<?> resolveElementType(Method method) {
146
    Class<?> returnType = method.getReturnType();
147 1 1. resolveElementType : negated conditional → KILLED
    if (returnType.isArray()) {
148 1 1. resolveElementType : replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::resolveElementType → KILLED
      return returnType.getComponentType();
149
    }
150
    Type genericReturnType = method.getGenericReturnType();
151 1 1. resolveElementType : negated conditional → KILLED
    if (genericReturnType instanceof ParameterizedType) {
152
      ParameterizedType pt = (ParameterizedType) genericReturnType;
153
      Type[] typeArgs = pt.getActualTypeArguments();
154 3 1. resolveElementType : changed conditional boundary → SURVIVED
2. resolveElementType : negated conditional → KILLED
3. resolveElementType : negated conditional → KILLED
      if (typeArgs.length > 0 && typeArgs[0] instanceof Class) {
155 1 1. resolveElementType : replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::resolveElementType → KILLED
        return (Class<?>) typeArgs[0];
156
      }
157
    }
158
    throw new FixedFormatException(format("Cannot determine element type for repeating field on %s. Ensure the collection is parameterized (e.g. List<String>, not List).", fieldLabel(method)));
159
  }
160
161
  @SuppressWarnings({"unchecked", "rawtypes"})
162
  Object assembleCollection(Method getter, List<Object> elements) {
163
    Class<?> returnType = getter.getReturnType();
164 1 1. assembleCollection : negated conditional → KILLED
    if (returnType.isArray()) {
165
      Object array = Array.newInstance(returnType.getComponentType(), elements.size());
166 2 1. assembleCollection : negated conditional → KILLED
2. assembleCollection : changed conditional boundary → KILLED
      for (int i = 0; i < elements.size(); i++) {
167 1 1. assembleCollection : removed call to java/lang/reflect/Array::set → KILLED
        Array.set(array, i, elements.get(i));
168
      }
169 1 1. assembleCollection : replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::assembleCollection → KILLED
      return array;
170 1 1. assembleCollection : negated conditional → KILLED
    } else if (LinkedList.class.isAssignableFrom(returnType)) {
171 1 1. assembleCollection : replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::assembleCollection → KILLED
      return new LinkedList<>(elements);
172 1 1. assembleCollection : negated conditional → KILLED
    } else if (List.class.isAssignableFrom(returnType)) {
173 1 1. assembleCollection : replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::assembleCollection → KILLED
      return new ArrayList<>(elements);
174 1 1. assembleCollection : negated conditional → KILLED
    } else if (SortedSet.class.isAssignableFrom(returnType)) {
175 1 1. assembleCollection : replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::assembleCollection → KILLED
      return new TreeSet<>(elements);
176 1 1. assembleCollection : negated conditional → KILLED
    } else if (Set.class.isAssignableFrom(returnType)) {
177 1 1. assembleCollection : replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::assembleCollection → KILLED
      return new LinkedHashSet<>(elements);
178 2 1. assembleCollection : negated conditional → KILLED
2. assembleCollection : negated conditional → KILLED
    } else if (Collection.class.isAssignableFrom(returnType) || Iterable.class.isAssignableFrom(returnType)) {
179 1 1. assembleCollection : replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::assembleCollection → KILLED
      return new ArrayList<>(elements);
180
    } else {
181
      throw new FixedFormatException(format("Unsupported collection type %s on %s. Supported types: arrays, List, LinkedList, Set, SortedSet, Collection.", returnType.getName(), fieldLabel(getter)));
182
    }
183
  }
184
185
  private Iterable<Object> arrayToIterable(Object array, int limit) {
186
    List<Object> list = new ArrayList<>(limit);
187 2 1. arrayToIterable : changed conditional boundary → KILLED
2. arrayToIterable : negated conditional → KILLED
    for (int i = 0; i < limit; i++) {
188
      list.add(Array.get(array, i));
189
    }
190 1 1. arrayToIterable : replaced return value with Collections.emptyList for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::arrayToIterable → KILLED
    return list;
191
  }
192
193
  private static String fieldLabel(Method method) {
194 1 1. fieldLabel : replaced return value with "" for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::fieldLabel → KILLED
    return format("%s#%s()", method.getDeclaringClass().getName(), method.getName());
195
  }
196
}

Mutations

57

1.1
Location : read
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:read_repeatingField_parsesAllElements()]
changed conditional boundary → KILLED

2.2
Location : read
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:read_repeatingField_parsesAllElements()]
negated conditional → KILLED

58

1.1
Location : read
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:read_repeatingField_parsesAllElements()]
Replaced integer multiplication with division → KILLED

2.2
Location : read
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:read_repeatingField_parsesAllElements()]
Replaced integer addition with subtraction → KILLED

68

1.1
Location : read
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:read_repeatingField_parsesAllElements()]
replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::read → KILLED

77

1.1
Location : export
Killed by : none
removed call to com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::validateCount → SURVIVED
Covering tests

86

1.1
Location : export
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:export_nullCollection_throwsFixedFormatException()]
negated conditional → KILLED

91

1.1
Location : export
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:export_sizeMismatch_strictMode_throwsFixedFormatException()]
negated conditional → KILLED

93

1.1
Location : export
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:export_sizeMismatch_strictMode_throwsFixedFormatException()]
negated conditional → KILLED

94

1.1
Location : export
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:export_sizeMismatch_strictMode_throwsFixedFormatException()]
negated conditional → KILLED

109

1.1
Location : export
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:export_repeatingField_writesAllElements()]
negated conditional → KILLED

113

1.1
Location : export
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:export_repeatingField_writesAllElements()]
negated conditional → KILLED

2.2
Location : export
Killed by : none
changed conditional boundary → SURVIVED
Covering tests

114

1.1
Location : export
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:export_repeatingField_writesAllElements()]
Replaced integer multiplication with division → KILLED

2.2
Location : export
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:export_repeatingField_writesAllElements()]
Replaced integer addition with subtraction → KILLED

116

1.1
Location : export
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:export_repeatingField_writesAllElements()]
Changed increment from 1 to -1 → KILLED

127

1.1
Location : validateCount
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:validateCount_countGreaterOneOnScalar_throwsFixedFormatException()]
negated conditional → KILLED

128

1.1
Location : validateCount
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:validateCount_countGreaterOneOnScalar_throwsFixedFormatException()]
negated conditional → KILLED

129

1.1
Location : validateCount
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:validateCount_countGreaterOneOnScalar_throwsFixedFormatException()]
negated conditional → KILLED

131

1.1
Location : validateCount
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingField.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingField]/[method:testCountOneWithArrayTypeThrows()]
changed conditional boundary → KILLED

2.2
Location : validateCount
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:validateCount_countLessThanOne_throwsFixedFormatException()]
negated conditional → KILLED

135

1.1
Location : validateCount
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:validateCount_countOneOnCollection_throwsFixedFormatException()]
negated conditional → KILLED

2.2
Location : validateCount
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:validateCount_countOneOnCollection_throwsFixedFormatException()]
negated conditional → KILLED

139

1.1
Location : validateCount
Killed by : com.ancientprogramming.fixedformat4j.issues.TestIssue33.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.issues.TestIssue33]/[method:nullDateFieldExportsAsAllPadding()]
changed conditional boundary → KILLED

2.2
Location : validateCount
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:validateCount_countGreaterOneOnScalar_throwsFixedFormatException()]
negated conditional → KILLED

3.3
Location : validateCount
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:validateCount_countGreaterOneOnScalar_throwsFixedFormatException()]
negated conditional → KILLED

147

1.1
Location : resolveElementType
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:resolveElementType_array_returnsComponentType()]
negated conditional → KILLED

148

1.1
Location : resolveElementType
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:resolveElementType_array_returnsComponentType()]
replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::resolveElementType → KILLED

151

1.1
Location : resolveElementType
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:resolveElementType_parameterizedList_returnsTypeArg()]
negated conditional → KILLED

154

1.1
Location : resolveElementType
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:resolveElementType_parameterizedList_returnsTypeArg()]
negated conditional → KILLED

2.2
Location : resolveElementType
Killed by : none
changed conditional boundary → SURVIVED
Covering tests

3.3
Location : resolveElementType
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:resolveElementType_parameterizedList_returnsTypeArg()]
negated conditional → KILLED

155

1.1
Location : resolveElementType
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:resolveElementType_parameterizedList_returnsTypeArg()]
replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::resolveElementType → KILLED

164

1.1
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_array_returnsCorrectArray()]
negated conditional → KILLED

166

1.1
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_array_returnsCorrectArray()]
negated conditional → KILLED

2.2
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_array_returnsCorrectArray()]
changed conditional boundary → KILLED

167

1.1
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_array_returnsCorrectArray()]
removed call to java/lang/reflect/Array::set → KILLED

169

1.1
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_array_returnsCorrectArray()]
replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::assembleCollection → KILLED

170

1.1
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_set_returnsLinkedHashSet()]
negated conditional → KILLED

171

1.1
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_linkedList_returnsLinkedList()]
replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::assembleCollection → KILLED

172

1.1
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_set_returnsLinkedHashSet()]
negated conditional → KILLED

173

1.1
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_list_returnsArrayList()]
replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::assembleCollection → KILLED

174

1.1
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_sortedSet_returnsTreeSet()]
negated conditional → KILLED

175

1.1
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_sortedSet_returnsTreeSet()]
replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::assembleCollection → KILLED

176

1.1
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_set_returnsLinkedHashSet()]
negated conditional → KILLED

177

1.1
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_set_returnsLinkedHashSet()]
replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::assembleCollection → KILLED

178

1.1
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_unsupportedType_throwsFixedFormatException()]
negated conditional → KILLED

2.2
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:assembleCollection_unsupportedType_throwsFixedFormatException()]
negated conditional → KILLED

179

1.1
Location : assembleCollection
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingField.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingField]/[method:testLoadIntegerCollection()]
replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::assembleCollection → KILLED

187

1.1
Location : arrayToIterable
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:export_repeatingField_writesAllElements()]
changed conditional boundary → KILLED

2.2
Location : arrayToIterable
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:export_repeatingField_writesAllElements()]
negated conditional → KILLED

190

1.1
Location : arrayToIterable
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:export_repeatingField_writesAllElements()]
replaced return value with Collections.emptyList for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::arrayToIterable → KILLED

194

1.1
Location : fieldLabel
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestRepeatingFieldSupport]/[method:export_sizeMismatch_nonStrictMode_logsWarnAndExportsMin()]
replaced return value with "" for com/ancientprogramming/fixedformat4j/format/impl/RepeatingFieldSupport::fieldLabel → KILLED

Active mutators

Tests examined


Report generated by PIT 1.17.1