Module.java

1
package fi.eis.libraries.di.context;
2
3
import java.lang.reflect.Constructor;
4
import java.lang.reflect.InvocationTargetException;
5
import java.util.HashMap;
6
import java.util.List;
7
import java.util.Map;
8
9
import fi.eis.libraries.di.Inject;
10
import fi.eis.libraries.di.logger.LogLevel;
11
import fi.eis.libraries.di.logger.SimpleLogger;
12
13
/**
14
 *
15
 * A Module is an abstraction that contains classes user of a library has explicitly defined
16
 * to be part of dependency injection.
17
 *
18
 * @author eis
19
 */
20
public class Module {
21
22
    protected final SimpleLogger logger = new SimpleLogger(this.getClass());
23
    
24
    private static final Object NO_INSTANCE = new Object();
25 6 1. <init> : Removed assignment to member variable providers → KILLED
2. <init> : removed call to java/util/HashMap::<init> → KILLED
3. <init> : removed call to java/util/HashMap::<init> → KILLED
4. <init> : Removed assignment to member variable providers → KILLED
5. <init> : removed call to java/util/HashMap::<init> → KILLED
6. <init> : Removed assignment to member variable providers → KILLED
    private Map<Class, Object> providers = new HashMap<>();
26
    public Module(Class... classes) {
27
        for (Class clazz: classes) {
28 2 1. <init> : removed call to java/util/Map::put → KILLED
2. <init> : replaced call to java/util/Map::put with argument → KILLED
            this.providers.put(clazz, NO_INSTANCE );
29
        }
30
    }
31
    public Module(List<Class> classes) {
32
        for (Class clazz: classes) {
33 2 1. <init> : removed call to java/util/Map::put → KILLED
2. <init> : replaced call to java/util/Map::put with argument → KILLED
            this.providers.put(clazz, NO_INSTANCE );
34
        }
35
    }
36
    public Module(Map<Class,Object> classesWithInstances) {
37 1 1. <init> : removed call to java/util/Map::entrySet → KILLED
        for (Map.Entry<Class,Object> entry: classesWithInstances.entrySet()) {
38
            logger.debug("Storing %s with key %s", entry.getValue(), entry.getKey());
39 4 1. <init> : removed call to java/util/Map$Entry::getKey → KILLED
2. <init> : removed call to java/util/Map::put → KILLED
3. <init> : removed call to java/util/Map$Entry::getValue → KILLED
4. <init> : replaced call to java/util/Map::put with argument → KILLED
            this.providers.put(entry.getKey(), entry.getValue());
40
        }
41
    }
42
    public void setLogLevel(LogLevel level) {
43
        this.logger.setLogLevel(level);
44
    }
45
46
    public void add(Module module) {
47 1 1. add : removed call to java/util/Map::putAll → KILLED
        this.providers.putAll(module.providers);
48
    }
49
50
    public boolean has(Class type) {
51
        logger.debug("Has %s? (in %s)%n", type, providers.keySet());
52 1 1. has : removed call to java/util/Map::keySet → KILLED
        for (Class clazz: providers.keySet()) {
53
            logger.debug("Comparing %s with %s%n", clazz, type);
54 4 1. has : negated conditional → SURVIVED
2. has : removed conditional - replaced equality check with true → SURVIVED
3. has : removed call to java/lang/Class::isAssignableFrom → KILLED
4. has : removed conditional - replaced equality check with false → KILLED
            if (type.isAssignableFrom(clazz)) {
55 2 1. has : replaced boolean return with false for fi/eis/libraries/di/context/Module::has → KILLED
2. has : Substituted 1 with 0 → KILLED
                return true;
56
            }
57
        }
58 2 1. has : Substituted 0 with 1 → NO_COVERAGE
2. has : replaced boolean return with true for fi/eis/libraries/di/context/Module::has → NO_COVERAGE
        return false;
59
    }
60
    private Class getImplClassFor(Class type) {
61 1 1. getImplClassFor : removed call to java/util/Map::keySet → KILLED
        for (Class clazz: providers.keySet()) {
62 4 1. getImplClassFor : removed call to java/lang/Class::isAssignableFrom → KILLED
2. getImplClassFor : removed conditional - replaced equality check with true → KILLED
3. getImplClassFor : removed conditional - replaced equality check with false → KILLED
4. getImplClassFor : negated conditional → KILLED
            if (type.isAssignableFrom(clazz)) {
63 1 1. getImplClassFor : replaced return value with null for fi/eis/libraries/di/context/Module::getImplClassFor → KILLED
                return clazz;
64
            }
65
        }
66 7 1. getImplClassFor : removed call to java/lang/StringBuilder::<init> → NO_COVERAGE
2. getImplClassFor : removed call to java/lang/StringBuilder::append → NO_COVERAGE
3. getImplClassFor : replaced call to java/lang/StringBuilder::append with receiver → NO_COVERAGE
4. getImplClassFor : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE
5. getImplClassFor : removed call to java/lang/StringBuilder::append → NO_COVERAGE
6. getImplClassFor : replaced call to java/lang/StringBuilder::append with receiver → NO_COVERAGE
7. getImplClassFor : removed call to java/lang/StringBuilder::toString → NO_COVERAGE
        throw new IllegalArgumentException("not allowed: " + type);
67
    }
68
    private <T> T getInstance(Class <T> type) {
69 1 1. getInstance : removed call to java/util/Map::entrySet → KILLED
        for (Map.Entry<Class,Object> classObjEntry: providers.entrySet()) {
70 5 1. getInstance : removed call to java/lang/Class::isAssignableFrom → KILLED
2. getInstance : removed conditional - replaced equality check with false → KILLED
3. getInstance : removed conditional - replaced equality check with true → KILLED
4. getInstance : negated conditional → KILLED
5. getInstance : removed call to java/util/Map$Entry::getKey → KILLED
            if (type.isAssignableFrom(classObjEntry.getKey())) {
71 2 1. getInstance : replaced return value with null for fi/eis/libraries/di/context/Module::getInstance → KILLED
2. getInstance : removed call to java/util/Map$Entry::getValue → KILLED
                return (T)classObjEntry.getValue();
72
            }
73
        }
74 7 1. getInstance : replaced call to java/lang/StringBuilder::append with receiver → NO_COVERAGE
2. getInstance : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE
3. getInstance : replaced call to java/lang/StringBuilder::append with receiver → NO_COVERAGE
4. getInstance : removed call to java/lang/StringBuilder::append → NO_COVERAGE
5. getInstance : removed call to java/lang/StringBuilder::toString → NO_COVERAGE
6. getInstance : removed call to java/lang/StringBuilder::<init> → NO_COVERAGE
7. getInstance : removed call to java/lang/StringBuilder::append → NO_COVERAGE
        throw new IllegalArgumentException("not allowed: " + type);
75
76
    }
77
    public <T>T get(Class<T> type) {
78 4 1. get : removed conditional - replaced equality check with false → SURVIVED
2. get : removed conditional - replaced equality check with true → KILLED
3. get : negated conditional → KILLED
4. get : removed call to fi/eis/libraries/di/context/Module::has → KILLED
        if (!has(type)) {
79 7 1. get : replaced call to java/lang/StringBuilder::append with receiver → NO_COVERAGE
2. get : removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE
3. get : removed call to java/lang/StringBuilder::append → NO_COVERAGE
4. get : removed call to java/lang/StringBuilder::toString → NO_COVERAGE
5. get : removed call to java/lang/StringBuilder::<init> → NO_COVERAGE
6. get : removed call to java/lang/StringBuilder::append → NO_COVERAGE
7. get : replaced call to java/lang/StringBuilder::append with receiver → NO_COVERAGE
            throw new IllegalArgumentException("not supported: " + type);
80
        }
81 1 1. get : removed call to fi/eis/libraries/di/context/Module::getInstance → KILLED
        Object storedValue = getInstance(type);
82 3 1. get : removed conditional - replaced equality check with false → KILLED
2. get : removed conditional - replaced equality check with true → KILLED
3. get : negated conditional → KILLED
        if (storedValue != NO_INSTANCE) {
83 1 1. get : replaced return value with null for fi/eis/libraries/di/context/Module::get → KILLED
            return (T)storedValue;
84
        } else {
85
            try {
86 2 1. get : replaced call to fi/eis/libraries/di/context/Module::getImplClassFor with argument → KILLED
2. get : removed call to fi/eis/libraries/di/context/Module::getImplClassFor → KILLED
                Class implClass = getImplClassFor(type);
87 1 1. get : removed call to fi/eis/libraries/di/context/Module::newInstance → KILLED
                storedValue = newInstance(implClass);
88 2 1. get : removed call to java/util/Map::put → SURVIVED
2. get : replaced call to java/util/Map::put with argument → SURVIVED
                providers.put(implClass, storedValue);
89 1 1. get : replaced return value with null for fi/eis/libraries/di/context/Module::get → KILLED
                return (T)storedValue;
90
            } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
91 1 1. get : removed call to java/lang/IllegalStateException::<init> → NO_COVERAGE
                throw new IllegalStateException(e);
92
            }
93
        }
94
    }
95
96
    protected Object newInstance(Class implClass) throws InstantiationException,
97
            IllegalAccessException, NoSuchMethodException, InvocationTargetException {
98 1 1. newInstance : removed call to java/lang/Class::getConstructors → KILLED
        for (Constructor constructor: implClass.getConstructors()) {
99 4 1. newInstance : removed conditional - replaced equality check with true → SURVIVED
2. newInstance : negated conditional → KILLED
3. newInstance : removed call to java/lang/reflect/Constructor::isAnnotationPresent → KILLED
4. newInstance : removed conditional - replaced equality check with false → KILLED
            if (constructor.isAnnotationPresent(Inject.class)) {
100
101 1 1. newInstance : removed call to java/lang/reflect/Constructor::getParameterTypes → KILLED
                Class[] parameterTypes = constructor.getParameterTypes();
102
                Object[] objArr = new Object[parameterTypes.length];
103
104 1 1. newInstance : Substituted 0 with 1 → KILLED
                int i = 0;
105
106
                for(Class c : parameterTypes) {
107 3 1. newInstance : Removed increment 1 → SURVIVED
2. newInstance : Changed increment from 1 to -1 → SURVIVED
3. newInstance : removed call to fi/eis/libraries/di/context/Module::get → KILLED
                    objArr[i++] = get(c);
108
                }
109
110 2 1. newInstance : removed call to java/lang/reflect/Constructor::newInstance → KILLED
2. newInstance : replaced return value with null for fi/eis/libraries/di/context/Module::newInstance → KILLED
                return constructor.newInstance(objArr);
111
            }
112
        }
113 2 1. newInstance : replaced return value with null for fi/eis/libraries/di/context/Module::newInstance → KILLED
2. newInstance : removed call to java/lang/Class::newInstance → KILLED
        return implClass.newInstance();
114
    }
115
    @Override
116
    public String toString() {
117 13 1. toString : replaced call to java/lang/StringBuilder::append with receiver → SURVIVED
2. toString : removed call to java/lang/Object::toString → SURVIVED
3. toString : replaced return value with "" for fi/eis/libraries/di/context/Module::toString → SURVIVED
4. toString : removed call to java/lang/Object::getClass → SURVIVED
5. toString : replaced call to java/lang/StringBuilder::append with receiver → SURVIVED
6. toString : replaced call to java/lang/StringBuilder::append with receiver → SURVIVED
7. toString : replaced call to java/lang/StringBuilder::append with receiver → SURVIVED
8. toString : removed call to java/lang/StringBuilder::toString → SURVIVED
9. toString : removed call to java/lang/StringBuilder::append → KILLED
10. toString : removed call to java/lang/StringBuilder::append → KILLED
11. toString : removed call to java/lang/StringBuilder::append → KILLED
12. toString : removed call to java/lang/StringBuilder::<init> → KILLED
13. toString : removed call to java/lang/StringBuilder::append → KILLED
        return this.getClass() + " [providers=" + providers.toString() + "]";
118
    }
119
}

Mutations

25

1.1
Location : <init>
Killed by : fi.eis.libraries.di.test.javaconfig.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.test.javaconfig.JavaConfigTest)
Removed assignment to member variable providers → KILLED

2.2
Location : <init>
Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest)
removed call to java/util/HashMap::<init> → KILLED

3.3
Location : <init>
Killed by : fi.eis.libraries.di.test.moduleconfig.DIConstructorTest.testDiSkippingModuleAbstraction(fi.eis.libraries.di.test.moduleconfig.DIConstructorTest)
removed call to java/util/HashMap::<init> → KILLED

4.4
Location : <init>
Killed by : fi.eis.libraries.di.test.moduleconfig.DIConstructorTest.testDiSkippingModuleAbstraction(fi.eis.libraries.di.test.moduleconfig.DIConstructorTest)
Removed assignment to member variable providers → KILLED

5.5
Location : <init>
Killed by : fi.eis.libraries.di.test.javaconfig.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.test.javaconfig.JavaConfigTest)
removed call to java/util/HashMap::<init> → KILLED

6.6
Location : <init>
Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest)
Removed assignment to member variable providers → KILLED

28

1.1
Location : <init>
Killed by : fi.eis.libraries.di.test.moduleconfig.DIConstructorTest.testDiSkippingModuleAbstraction(fi.eis.libraries.di.test.moduleconfig.DIConstructorTest)
removed call to java/util/Map::put → KILLED

2.2
Location : <init>
Killed by : fi.eis.libraries.di.test.moduleconfig.DIConstructorTest.testDiSkippingModuleAbstraction(fi.eis.libraries.di.test.moduleconfig.DIConstructorTest)
replaced call to java/util/Map::put with argument → KILLED

33

1.1
Location : <init>
Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest)
removed call to java/util/Map::put → KILLED

2.2
Location : <init>
Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest)
replaced call to java/util/Map::put with argument → KILLED

37

1.1
Location : <init>
Killed by : fi.eis.libraries.di.test.javaconfig.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.test.javaconfig.JavaConfigTest)
removed call to java/util/Map::entrySet → KILLED

39

1.1
Location : <init>
Killed by : fi.eis.libraries.di.test.javaconfig.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.test.javaconfig.JavaConfigTest)
removed call to java/util/Map$Entry::getKey → KILLED

2.2
Location : <init>
Killed by : fi.eis.libraries.di.test.javaconfig.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.test.javaconfig.JavaConfigTest)
removed call to java/util/Map::put → KILLED

3.3
Location : <init>
Killed by : fi.eis.libraries.di.test.javaconfig.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.test.javaconfig.JavaConfigTest)
removed call to java/util/Map$Entry::getValue → KILLED

4.4
Location : <init>
Killed by : fi.eis.libraries.di.test.javaconfig.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.test.javaconfig.JavaConfigTest)
replaced call to java/util/Map::put with argument → KILLED

47

1.1
Location : add
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to java/util/Map::putAll → KILLED

52

1.1
Location : has
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to java/util/Map::keySet → KILLED

54

1.1
Location : has
Killed by : none
negated conditional → SURVIVED
Covering tests

2.2
Location : has
Killed by : none
removed conditional - replaced equality check with true → SURVIVED Covering tests

3.3
Location : has
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to java/lang/Class::isAssignableFrom → KILLED

4.4
Location : has
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed conditional - replaced equality check with false → KILLED

55

1.1
Location : has
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
replaced boolean return with false for fi/eis/libraries/di/context/Module::has → KILLED

2.2
Location : has
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
Substituted 1 with 0 → KILLED

58

1.1
Location : has
Killed by : none
Substituted 0 with 1 → NO_COVERAGE

2.2
Location : has
Killed by : none
replaced boolean return with true for fi/eis/libraries/di/context/Module::has → NO_COVERAGE

61

1.1
Location : getImplClassFor
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to java/util/Map::keySet → KILLED

62

1.1
Location : getImplClassFor
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to java/lang/Class::isAssignableFrom → KILLED

2.2
Location : getImplClassFor
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed conditional - replaced equality check with true → KILLED

3.3
Location : getImplClassFor
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed conditional - replaced equality check with false → KILLED

4.4
Location : getImplClassFor
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
negated conditional → KILLED

63

1.1
Location : getImplClassFor
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
replaced return value with null for fi/eis/libraries/di/context/Module::getImplClassFor → KILLED

66

1.1
Location : getImplClassFor
Killed by : none
removed call to java/lang/StringBuilder::<init> → NO_COVERAGE

2.2
Location : getImplClassFor
Killed by : none
removed call to java/lang/StringBuilder::append → NO_COVERAGE

3.3
Location : getImplClassFor
Killed by : none
replaced call to java/lang/StringBuilder::append with receiver → NO_COVERAGE

4.4
Location : getImplClassFor
Killed by : none
removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE

5.5
Location : getImplClassFor
Killed by : none
removed call to java/lang/StringBuilder::append → NO_COVERAGE

6.6
Location : getImplClassFor
Killed by : none
replaced call to java/lang/StringBuilder::append with receiver → NO_COVERAGE

7.7
Location : getImplClassFor
Killed by : none
removed call to java/lang/StringBuilder::toString → NO_COVERAGE

69

1.1
Location : getInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to java/util/Map::entrySet → KILLED

70

1.1
Location : getInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to java/lang/Class::isAssignableFrom → KILLED

2.2
Location : getInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed conditional - replaced equality check with false → KILLED

3.3
Location : getInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDiWithInheritance(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed conditional - replaced equality check with true → KILLED

4.4
Location : getInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
negated conditional → KILLED

5.5
Location : getInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to java/util/Map$Entry::getKey → KILLED

71

1.1
Location : getInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
replaced return value with null for fi/eis/libraries/di/context/Module::getInstance → KILLED

2.2
Location : getInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to java/util/Map$Entry::getValue → KILLED

74

1.1
Location : getInstance
Killed by : none
replaced call to java/lang/StringBuilder::append with receiver → NO_COVERAGE

2.2
Location : getInstance
Killed by : none
removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE

3.3
Location : getInstance
Killed by : none
replaced call to java/lang/StringBuilder::append with receiver → NO_COVERAGE

4.4
Location : getInstance
Killed by : none
removed call to java/lang/StringBuilder::append → NO_COVERAGE

5.5
Location : getInstance
Killed by : none
removed call to java/lang/StringBuilder::toString → NO_COVERAGE

6.6
Location : getInstance
Killed by : none
removed call to java/lang/StringBuilder::<init> → NO_COVERAGE

7.7
Location : getInstance
Killed by : none
removed call to java/lang/StringBuilder::append → NO_COVERAGE

78

1.1
Location : get
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed conditional - replaced equality check with true → KILLED

2.2
Location : get
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
negated conditional → KILLED

3.3
Location : get
Killed by : none
removed conditional - replaced equality check with false → SURVIVED
Covering tests

4.4
Location : get
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to fi/eis/libraries/di/context/Module::has → KILLED

79

1.1
Location : get
Killed by : none
replaced call to java/lang/StringBuilder::append with receiver → NO_COVERAGE

2.2
Location : get
Killed by : none
removed call to java/lang/IllegalArgumentException::<init> → NO_COVERAGE

3.3
Location : get
Killed by : none
removed call to java/lang/StringBuilder::append → NO_COVERAGE

4.4
Location : get
Killed by : none
removed call to java/lang/StringBuilder::toString → NO_COVERAGE

5.5
Location : get
Killed by : none
removed call to java/lang/StringBuilder::<init> → NO_COVERAGE

6.6
Location : get
Killed by : none
removed call to java/lang/StringBuilder::append → NO_COVERAGE

7.7
Location : get
Killed by : none
replaced call to java/lang/StringBuilder::append with receiver → NO_COVERAGE

81

1.1
Location : get
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to fi/eis/libraries/di/context/Module::getInstance → KILLED

82

1.1
Location : get
Killed by : fi.eis.libraries.di.test.javaconfig.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.test.javaconfig.JavaConfigTest)
removed conditional - replaced equality check with false → KILLED

2.2
Location : get
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed conditional - replaced equality check with true → KILLED

3.3
Location : get
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
negated conditional → KILLED

83

1.1
Location : get
Killed by : fi.eis.libraries.di.test.javaconfig.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.test.javaconfig.JavaConfigTest)
replaced return value with null for fi/eis/libraries/di/context/Module::get → KILLED

86

1.1
Location : get
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
replaced call to fi/eis/libraries/di/context/Module::getImplClassFor with argument → KILLED

2.2
Location : get
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to fi/eis/libraries/di/context/Module::getImplClassFor → KILLED

87

1.1
Location : get
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to fi/eis/libraries/di/context/Module::newInstance → KILLED

88

1.1
Location : get
Killed by : none
removed call to java/util/Map::put → SURVIVED
Covering tests

2.2
Location : get
Killed by : none
replaced call to java/util/Map::put with argument → SURVIVED Covering tests

89

1.1
Location : get
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
replaced return value with null for fi/eis/libraries/di/context/Module::get → KILLED

91

1.1
Location : get
Killed by : none
removed call to java/lang/IllegalStateException::<init> → NO_COVERAGE

98

1.1
Location : newInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to java/lang/Class::getConstructors → KILLED

99

1.1
Location : newInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIConstructorTest.testDiSkippingModuleAbstraction(fi.eis.libraries.di.test.moduleconfig.DIConstructorTest)
negated conditional → KILLED

2.2
Location : newInstance
Killed by : none
removed conditional - replaced equality check with true → SURVIVED
Covering tests

3.3
Location : newInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIConstructorTest.testDiSkippingModuleAbstraction(fi.eis.libraries.di.test.moduleconfig.DIConstructorTest)
removed call to java/lang/reflect/Constructor::isAnnotationPresent → KILLED

4.4
Location : newInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIConstructorTest.testDiSkippingModuleAbstraction(fi.eis.libraries.di.test.moduleconfig.DIConstructorTest)
removed conditional - replaced equality check with false → KILLED

101

1.1
Location : newInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIConstructorTest.testDiSkippingModuleAbstraction(fi.eis.libraries.di.test.moduleconfig.DIConstructorTest)
removed call to java/lang/reflect/Constructor::getParameterTypes → KILLED

104

1.1
Location : newInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIConstructorTest.testDiSkippingModuleAbstraction(fi.eis.libraries.di.test.moduleconfig.DIConstructorTest)
Substituted 0 with 1 → KILLED

107

1.1
Location : newInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIConstructorTest.testDiSkippingModuleAbstraction(fi.eis.libraries.di.test.moduleconfig.DIConstructorTest)
removed call to fi/eis/libraries/di/context/Module::get → KILLED

2.2
Location : newInstance
Killed by : none
Removed increment 1 → SURVIVED
Covering tests

3.3
Location : newInstance
Killed by : none
Changed increment from 1 to -1 → SURVIVED Covering tests

110

1.1
Location : newInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIConstructorTest.testDiSkippingModuleAbstraction(fi.eis.libraries.di.test.moduleconfig.DIConstructorTest)
removed call to java/lang/reflect/Constructor::newInstance → KILLED

2.2
Location : newInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIConstructorTest.testDiSkippingModuleAbstraction(fi.eis.libraries.di.test.moduleconfig.DIConstructorTest)
replaced return value with null for fi/eis/libraries/di/context/Module::newInstance → KILLED

113

1.1
Location : newInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
replaced return value with null for fi/eis/libraries/di/context/Module::newInstance → KILLED

2.2
Location : newInstance
Killed by : fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest.testDi(fi.eis.libraries.di.test.moduleconfig.DIInheritanceTest)
removed call to java/lang/Class::newInstance → KILLED

117

1.1
Location : toString
Killed by : none
replaced call to java/lang/StringBuilder::append with receiver → SURVIVED
Covering tests

2.2
Location : toString
Killed by : none
removed call to java/lang/Object::toString → SURVIVED Covering tests

3.3
Location : toString
Killed by : none
replaced return value with "" for fi/eis/libraries/di/context/Module::toString → SURVIVED Covering tests

4.4
Location : toString
Killed by : none
removed call to java/lang/Object::getClass → SURVIVED Covering tests

5.5
Location : toString
Killed by : none
replaced call to java/lang/StringBuilder::append with receiver → SURVIVED Covering tests

6.6
Location : toString
Killed by : none
replaced call to java/lang/StringBuilder::append with receiver → SURVIVED Covering tests

7.7
Location : toString
Killed by : fi.eis.libraries.di.test.javaconfig.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.test.javaconfig.JavaConfigTest)
removed call to java/lang/StringBuilder::append → KILLED

8.8
Location : toString
Killed by : none
replaced call to java/lang/StringBuilder::append with receiver → SURVIVED Covering tests

9.9
Location : toString
Killed by : none
removed call to java/lang/StringBuilder::toString → SURVIVED Covering tests

10.10
Location : toString
Killed by : fi.eis.libraries.di.test.javaconfig.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.test.javaconfig.JavaConfigTest)
removed call to java/lang/StringBuilder::append → KILLED

11.11
Location : toString
Killed by : fi.eis.libraries.di.test.javaconfig.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.test.javaconfig.JavaConfigTest)
removed call to java/lang/StringBuilder::append → KILLED

12.12
Location : toString
Killed by : fi.eis.libraries.di.test.javaconfig.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.test.javaconfig.JavaConfigTest)
removed call to java/lang/StringBuilder::<init> → KILLED

13.13
Location : toString
Killed by : fi.eis.libraries.di.test.javaconfig.JavaConfigTest.testJavaConfig(fi.eis.libraries.di.test.javaconfig.JavaConfigTest)
removed call to java/lang/StringBuilder::append → KILLED

Active mutators

Tests examined


Report generated by PIT 1.25.4 support