|
1
|
|
package com.ancientprogramming.fixedformat4j.format.impl; |
|
2
|
|
|
|
3
|
|
import com.ancientprogramming.fixedformat4j.annotation.Field; |
|
4
|
|
import com.ancientprogramming.fixedformat4j.annotation.Fields; |
|
5
|
|
import com.ancientprogramming.fixedformat4j.exception.FixedFormatException; |
|
6
|
|
import org.slf4j.Logger; |
|
7
|
|
import org.slf4j.LoggerFactory; |
|
8
|
|
|
|
9
|
|
import java.lang.reflect.Method; |
|
10
|
|
import java.util.ArrayList; |
|
11
|
|
import java.util.LinkedHashMap; |
|
12
|
|
import java.util.List; |
|
13
|
|
|
|
14
|
|
import static java.lang.String.format; |
|
15
|
|
|
|
16
|
|
/** |
|
17
|
|
* Discovers all {@link Field} and {@link Fields} annotation targets on a class. |
|
18
|
|
* |
|
19
|
|
* <p>Pass 1 walks public methods; pass 2 walks declared fields including superclasses. |
|
20
|
|
* Field annotations take priority over method annotations for the same property. |
|
21
|
|
* A conflict (both annotated) is logged as a warning. |
|
22
|
|
* |
|
23
|
|
* @author Jacob von Eyben - <a href="https://eybenconsult.com">https://eybenconsult.com</a> |
|
24
|
|
* @since 1.6.0 |
|
25
|
|
*/ |
|
26
|
|
class AnnotationScanner { |
|
27
|
|
|
|
28
|
|
private static final Logger LOG = LoggerFactory.getLogger(AnnotationScanner.class); |
|
29
|
|
|
|
30
|
|
/** |
|
31
|
|
* Returns all annotation targets for the given class in declaration order. |
|
32
|
|
*/ |
|
33
|
|
List<AnnotationTarget> scan(Class<?> clazz) { |
|
34
|
1
1. scan : removed call to java/util/LinkedHashMap::<init> → KILLED
|
LinkedHashMap<String, AnnotationTarget> targets = new LinkedHashMap<>(); |
|
35
|
|
|
|
36
|
|
// Pass 1: method annotations |
|
37
|
1
1. scan : removed call to java/lang/Class::getMethods → KILLED
|
for (Method method : clazz.getMethods()) { |
|
38
|
8
1. scan : removed conditional - replaced equality check with false → KILLED
2. scan : removed call to java/lang/reflect/Method::getAnnotation → KILLED
3. scan : negated conditional → KILLED
4. scan : removed conditional - replaced equality check with true → KILLED
5. scan : removed conditional - replaced equality check with true → KILLED
6. scan : removed conditional - replaced equality check with false → KILLED
7. scan : removed call to java/lang/reflect/Method::getAnnotation → KILLED
8. scan : negated conditional → KILLED
|
if (method.getAnnotation(Field.class) != null || method.getAnnotation(Fields.class) != null) { |
|
39
|
6
1. scan : replaced call to com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::stripMethodPrefix with argument → KILLED
2. scan : removed call to java/lang/reflect/Method::getName → KILLED
3. scan : removed call to com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::stripMethodPrefix → KILLED
4. scan : removed call to com/ancientprogramming/fixedformat4j/format/impl/AnnotationTarget::ofMethod → KILLED
5. scan : removed call to java/util/LinkedHashMap::put → KILLED
6. scan : replaced call to java/util/LinkedHashMap::put with argument → KILLED
|
targets.put(stripMethodPrefix(method.getName()), AnnotationTarget.ofMethod(method)); |
|
40
|
|
} |
|
41
|
|
} |
|
42
|
|
|
|
43
|
|
// Pass 2: field annotations — walk class hierarchy |
|
44
|
|
Class<?> current = clazz; |
|
45
|
6
1. scan : removed conditional - replaced equality check with true → SURVIVED
2. scan : removed conditional - replaced equality check with true → SURVIVED
3. scan : negated conditional → KILLED
4. scan : removed conditional - replaced equality check with false → KILLED
5. scan : removed conditional - replaced equality check with false → KILLED
6. scan : negated conditional → KILLED
|
while (current != null && current != Object.class) { |
|
46
|
1
1. scan : removed call to java/lang/Class::getDeclaredFields → KILLED
|
for (java.lang.reflect.Field javaField : current.getDeclaredFields()) { |
|
47
|
8
1. scan : removed conditional - replaced equality check with true → SURVIVED
2. scan : removed call to java/lang/reflect/Field::getAnnotation → SURVIVED
3. scan : removed conditional - replaced equality check with false → KILLED
4. scan : negated conditional → KILLED
5. scan : negated conditional → KILLED
6. scan : removed conditional - replaced equality check with true → KILLED
7. scan : removed call to java/lang/reflect/Field::getAnnotation → KILLED
8. scan : removed conditional - replaced equality check with false → KILLED
|
if (javaField.getAnnotation(Field.class) == null && javaField.getAnnotation(Fields.class) == null) { |
|
48
|
|
continue; |
|
49
|
|
} |
|
50
|
1
1. scan : removed call to com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::findGetter → KILLED
|
Method getter = findGetter(clazz, javaField); |
|
51
|
3
1. scan : replaced call to com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::stripMethodPrefix with argument → KILLED
2. scan : removed call to java/lang/reflect/Method::getName → KILLED
3. scan : removed call to com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::stripMethodPrefix → KILLED
|
String key = stripMethodPrefix(getter.getName()); |
|
52
|
4
1. scan : removed conditional - replaced equality check with true → SURVIVED
2. scan : removed conditional - replaced equality check with false → SURVIVED
3. scan : removed call to java/util/LinkedHashMap::containsKey → SURVIVED
4. scan : negated conditional → SURVIVED
|
if (targets.containsKey(key)) { |
|
53
|
|
LOG.error("Configuration mismatch: @Field annotation found on both field '{}' and its getter method '{}' in class '{}'. The field annotation will be used.", |
|
54
|
5
1. scan : removed call to java/lang/Class::getName → SURVIVED
2. scan : Substituted 1 with 0 → SURVIVED
3. scan : removed call to java/lang/reflect/Method::getName → SURVIVED
4. scan : removed call to java/lang/reflect/Field::getName → SURVIVED
5. scan : Substituted 2 with 3 → KILLED
|
javaField.getName(), getter.getName(), clazz.getName()); |
|
55
|
|
} |
|
56
|
3
1. scan : replaced call to java/util/LinkedHashMap::put with argument → KILLED
2. scan : removed call to com/ancientprogramming/fixedformat4j/format/impl/AnnotationTarget::ofField → KILLED
3. scan : removed call to java/util/LinkedHashMap::put → KILLED
|
targets.put(key, AnnotationTarget.ofField(getter, javaField)); |
|
57
|
|
} |
|
58
|
2
1. scan : replaced call to java/lang/Class::getSuperclass with receiver → TIMED_OUT
2. scan : removed call to java/lang/Class::getSuperclass → KILLED
|
current = current.getSuperclass(); |
|
59
|
|
} |
|
60
|
|
|
|
61
|
3
1. scan : removed call to java/util/LinkedHashMap::values → KILLED
2. scan : removed call to java/util/ArrayList::<init> → KILLED
3. scan : replaced return value with Collections.emptyList for com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::scan → KILLED
|
return new ArrayList<>(targets.values()); |
|
62
|
|
} |
|
63
|
|
|
|
64
|
|
private Method findGetter(Class<?> clazz, java.lang.reflect.Field field) { |
|
65
|
1
1. findGetter : removed call to java/lang/reflect/Field::getName → KILLED
|
String name = field.getName(); |
|
66
|
7
1. findGetter : removed call to java/lang/Character::toUpperCase → KILLED
2. findGetter : Substituted 0 with 1 → KILLED
3. findGetter : removed call to java/lang/String::substring → KILLED
4. findGetter : replaced call to java/lang/Character::toUpperCase with argument → KILLED
5. findGetter : replaced call to java/lang/String::substring with receiver → KILLED
6. findGetter : Substituted 1 with 0 → KILLED
7. findGetter : removed call to java/lang/String::charAt → KILLED
|
String cap = Character.toUpperCase(name.charAt(0)) + name.substring(1); |
|
67
|
|
try { |
|
68
|
3
1. findGetter : replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::findGetter → KILLED
2. findGetter : removed call to java/lang/Class::getMethod → KILLED
3. findGetter : Substituted 0 with 1 → KILLED
|
return clazz.getMethod("get" + cap); |
|
69
|
|
} catch (NoSuchMethodException e) { |
|
70
|
|
try { |
|
71
|
3
1. findGetter : Substituted 0 with 1 → SURVIVED
2. findGetter : replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::findGetter → NO_COVERAGE
3. findGetter : removed call to java/lang/Class::getMethod → KILLED
|
return clazz.getMethod("is" + cap); |
|
72
|
|
} catch (NoSuchMethodException e2) { |
|
73
|
9
1. findGetter : removed call to java/lang/String::format → SURVIVED
2. findGetter : Substituted 2 with 3 → SURVIVED
3. findGetter : Substituted 0 with 1 → SURVIVED
4. findGetter : Substituted 4 with 5 → SURVIVED
5. findGetter : replaced call to java/lang/String::format with argument → SURVIVED
6. findGetter : Substituted 1 with 0 → SURVIVED
7. findGetter : removed call to java/lang/Class::getName → SURVIVED
8. findGetter : removed call to com/ancientprogramming/fixedformat4j/exception/FixedFormatException::<init> → KILLED
9. findGetter : Substituted 3 with 4 → KILLED
|
throw new FixedFormatException(format("No getter found for field '%s' in class %s. Expected 'get%s()' or 'is%s()'.", name, clazz.getName(), cap, cap)); |
|
74
|
|
} |
|
75
|
|
} |
|
76
|
|
} |
|
77
|
|
|
|
78
|
|
String stripMethodPrefix(String name) { |
|
79
|
8
1. stripMethodPrefix : removed conditional - replaced equality check with false → SURVIVED
2. stripMethodPrefix : removed call to java/lang/String::startsWith → SURVIVED
3. stripMethodPrefix : removed call to java/lang/String::startsWith → KILLED
4. stripMethodPrefix : negated conditional → KILLED
5. stripMethodPrefix : removed conditional - replaced equality check with true → KILLED
6. stripMethodPrefix : removed conditional - replaced equality check with false → KILLED
7. stripMethodPrefix : negated conditional → KILLED
8. stripMethodPrefix : removed conditional - replaced equality check with true → KILLED
|
if (name.startsWith("get") || name.startsWith("set")) { |
|
80
|
4
1. stripMethodPrefix : Substituted 3 with 4 → KILLED
2. stripMethodPrefix : replaced call to java/lang/String::substring with receiver → KILLED
3. stripMethodPrefix : removed call to java/lang/String::substring → KILLED
4. stripMethodPrefix : replaced return value with "" for com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::stripMethodPrefix → KILLED
|
return name.substring(3); |
|
81
|
4
1. stripMethodPrefix : removed conditional - replaced equality check with true → SURVIVED
2. stripMethodPrefix : removed call to java/lang/String::startsWith → KILLED
3. stripMethodPrefix : removed conditional - replaced equality check with false → KILLED
4. stripMethodPrefix : negated conditional → KILLED
|
} else if (name.startsWith("is")) { |
|
82
|
4
1. stripMethodPrefix : Substituted 2 with 3 → KILLED
2. stripMethodPrefix : replaced call to java/lang/String::substring with receiver → KILLED
3. stripMethodPrefix : removed call to java/lang/String::substring → KILLED
4. stripMethodPrefix : replaced return value with "" for com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::stripMethodPrefix → KILLED
|
return name.substring(2); |
|
83
|
|
} else { |
|
84
|
1
1. stripMethodPrefix : replaced return value with "" for com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::stripMethodPrefix → NO_COVERAGE
|
return name; |
|
85
|
|
} |
|
86
|
|
} |
|
87
|
|
} |
| | Mutations |
| 34 |
|
1.1 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] removed call to java/util/LinkedHashMap::<init> → KILLED
|
| 37 |
|
1.1 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] removed call to java/lang/Class::getMethods → KILLED
|
| 38 |
|
1.1 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] removed conditional - replaced equality check with false → KILLED
2.2 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] removed call to java/lang/reflect/Method::getAnnotation → KILLED
3.3 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] negated conditional → KILLED
4.4 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] removed conditional - replaced equality check with true → KILLED
5.5 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_methodAnnotation_returnsTarget()] removed conditional - replaced equality check with true → KILLED
6.6 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] removed conditional - replaced equality check with false → KILLED
7.7 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_methodAnnotation_returnsTarget()] removed call to java/lang/reflect/Method::getAnnotation → KILLED
8.8 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] negated conditional → KILLED
|
| 39 |
|
1.1 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldAndMethodAnnotation_fieldTakesPriority()] replaced call to com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::stripMethodPrefix with argument → KILLED
2.2 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] removed call to java/lang/reflect/Method::getName → KILLED
3.3 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldAndMethodAnnotation_fieldTakesPriority()] removed call to com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::stripMethodPrefix → KILLED
4.4 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] removed call to com/ancientprogramming/fixedformat4j/format/impl/AnnotationTarget::ofMethod → KILLED
5.5 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] removed call to java/util/LinkedHashMap::put → KILLED
6.6 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] replaced call to java/util/LinkedHashMap::put with argument → KILLED
|
| 45 |
|
1.1 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] negated conditional → KILLED
2.2 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] removed conditional - replaced equality check with false → KILLED
3.3 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] removed conditional - replaced equality check with false → KILLED
4.4 Location : scan Killed by : none removed conditional - replaced equality check with true → SURVIVED
Covering tests
5.5 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] negated conditional → KILLED
6.6 Location : scan Killed by : none removed conditional - replaced equality check with true → SURVIVED
Covering tests
|
| 46 |
|
1.1 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] removed call to java/lang/Class::getDeclaredFields → KILLED
|
| 47 |
|
1.1 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] removed conditional - replaced equality check with false → KILLED
2.2 Location : scan Killed by : none removed conditional - replaced equality check with true → SURVIVED
Covering tests
3.3 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] negated conditional → KILLED
4.4 Location : scan Killed by : none removed call to java/lang/reflect/Field::getAnnotation → SURVIVED
Covering tests
5.5 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] negated conditional → KILLED
6.6 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] removed conditional - replaced equality check with true → KILLED
7.7 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] removed call to java/lang/reflect/Field::getAnnotation → KILLED
8.8 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] removed conditional - replaced equality check with false → KILLED
|
| 50 |
|
1.1 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] removed call to com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::findGetter → KILLED
|
| 51 |
|
1.1 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldAndMethodAnnotation_fieldTakesPriority()] replaced call to com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::stripMethodPrefix with argument → KILLED
2.2 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] removed call to java/lang/reflect/Method::getName → KILLED
3.3 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_orderPreserved()] removed call to com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::stripMethodPrefix → KILLED
|
| 52 |
|
1.1 Location : scan Killed by : none removed conditional - replaced equality check with true → SURVIVED
Covering tests
2.2 Location : scan Killed by : none removed conditional - replaced equality check with false → SURVIVED
Covering tests
3.3 Location : scan Killed by : none removed call to java/util/LinkedHashMap::containsKey → SURVIVED
Covering tests
4.4 Location : scan Killed by : none negated conditional → SURVIVED
Covering tests
|
| 54 |
|
1.1 Location : scan Killed by : none removed call to java/lang/Class::getName → SURVIVED
Covering tests
2.2 Location : scan Killed by : none Substituted 1 with 0 → SURVIVED
Covering tests
3.3 Location : scan Killed by : none removed call to java/lang/reflect/Method::getName → SURVIVED
Covering tests
4.4 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldAndMethodAnnotation_fieldTakesPriority()] Substituted 2 with 3 → KILLED
5.5 Location : scan Killed by : none removed call to java/lang/reflect/Field::getName → SURVIVED
Covering tests
|
| 56 |
|
1.1 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] replaced call to java/util/LinkedHashMap::put with argument → KILLED
2.2 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] removed call to com/ancientprogramming/fixedformat4j/format/impl/AnnotationTarget::ofField → KILLED
3.3 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] removed call to java/util/LinkedHashMap::put → KILLED
|
| 58 |
|
1.1 Location : scan Killed by : none replaced call to java/lang/Class::getSuperclass with receiver → TIMED_OUT
2.2 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] removed call to java/lang/Class::getSuperclass → KILLED
|
| 61 |
|
1.1 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] removed call to java/util/LinkedHashMap::values → KILLED
2.2 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] removed call to java/util/ArrayList::<init> → KILLED
3.3 Location : scan Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_fieldsAnnotation_returnsTarget()] replaced return value with Collections.emptyList for com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::scan → KILLED
|
| 65 |
|
1.1 Location : findGetter Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] removed call to java/lang/reflect/Field::getName → KILLED
|
| 66 |
|
1.1 Location : findGetter Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] removed call to java/lang/Character::toUpperCase → KILLED
2.2 Location : findGetter Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] Substituted 0 with 1 → KILLED
3.3 Location : findGetter Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] removed call to java/lang/String::substring → KILLED
4.4 Location : findGetter Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] replaced call to java/lang/Character::toUpperCase with argument → KILLED
5.5 Location : findGetter Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] replaced call to java/lang/String::substring with receiver → KILLED
6.6 Location : findGetter Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] Substituted 1 with 0 → KILLED
7.7 Location : findGetter Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] removed call to java/lang/String::charAt → KILLED
|
| 68 |
|
1.1 Location : findGetter Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::findGetter → KILLED
2.2 Location : findGetter Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] removed call to java/lang/Class::getMethod → KILLED
3.3 Location : findGetter Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_superclassFields_included()] Substituted 0 with 1 → KILLED
|
| 71 |
|
1.1 Location : findGetter Killed by : none Substituted 0 with 1 → SURVIVED
Covering tests
2.2 Location : findGetter Killed by : none replaced return value with null for com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::findGetter → NO_COVERAGE
3.3 Location : findGetter Killed by : com.ancientprogramming.fixedformat4j.issues.TestLombokFieldAnnotations.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.issues.TestLombokFieldAnnotations]/[method:testNoGetter_throwsFixedFormatException()] removed call to java/lang/Class::getMethod → KILLED
|
| 73 |
|
1.1 Location : findGetter Killed by : none removed call to java/lang/String::format → SURVIVED
Covering tests
2.2 Location : findGetter Killed by : none Substituted 2 with 3 → SURVIVED
Covering tests
3.3 Location : findGetter Killed by : none Substituted 0 with 1 → SURVIVED
Covering tests
4.4 Location : findGetter Killed by : com.ancientprogramming.fixedformat4j.issues.TestLombokFieldAnnotations.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.issues.TestLombokFieldAnnotations]/[method:testNoGetter_throwsFixedFormatException()] removed call to com/ancientprogramming/fixedformat4j/exception/FixedFormatException::<init> → KILLED
5.5 Location : findGetter Killed by : none Substituted 4 with 5 → SURVIVED
Covering tests
6.6 Location : findGetter Killed by : com.ancientprogramming.fixedformat4j.issues.TestLombokFieldAnnotations.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.issues.TestLombokFieldAnnotations]/[method:testNoGetter_throwsFixedFormatException()] Substituted 3 with 4 → KILLED
7.7 Location : findGetter Killed by : none replaced call to java/lang/String::format with argument → SURVIVED
Covering tests
8.8 Location : findGetter Killed by : none Substituted 1 with 0 → SURVIVED
Covering tests
9.9 Location : findGetter Killed by : none removed call to java/lang/Class::getName → SURVIVED
Covering tests
|
| 79 |
|
1.1 Location : stripMethodPrefix Killed by : none removed conditional - replaced equality check with false → SURVIVED
Covering tests
2.2 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] removed call to java/lang/String::startsWith → KILLED
3.3 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] negated conditional → KILLED
4.4 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] removed conditional - replaced equality check with true → KILLED
5.5 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] removed conditional - replaced equality check with false → KILLED
6.6 Location : stripMethodPrefix Killed by : none removed call to java/lang/String::startsWith → SURVIVED
Covering tests
7.7 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] negated conditional → KILLED
8.8 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] removed conditional - replaced equality check with true → KILLED
|
| 80 |
|
1.1 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] Substituted 3 with 4 → KILLED
2.2 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] replaced call to java/lang/String::substring with receiver → KILLED
3.3 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_orderPreserved()] removed call to java/lang/String::substring → KILLED
4.4 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestAnnotationScanner]/[method:scan_orderPreserved()] replaced return value with "" for com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::stripMethodPrefix → KILLED
|
| 81 |
|
1.1 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] removed call to java/lang/String::startsWith → KILLED
2.2 Location : stripMethodPrefix Killed by : none removed conditional - replaced equality check with true → SURVIVED
Covering tests
3.3 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] removed conditional - replaced equality check with false → KILLED
4.4 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] negated conditional → KILLED
|
| 82 |
|
1.1 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] Substituted 2 with 3 → KILLED
2.2 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] replaced call to java/lang/String::substring with receiver → KILLED
3.3 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] removed call to java/lang/String::substring → KILLED
4.4 Location : stripMethodPrefix Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestClassMetadataCache]/[method:eachSimpleFieldDescriptorHasNonNullMetadata()] replaced return value with "" for com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::stripMethodPrefix → KILLED
|
| 84 |
|
1.1 Location : stripMethodPrefix Killed by : none replaced return value with "" for com/ancientprogramming/fixedformat4j/format/impl/AnnotationScanner::stripMethodPrefix → NO_COVERAGE
|