LogSanitizer.java

1
package com.project.auth.application.support.logging;
2
3
import java.nio.charset.StandardCharsets;
4
import java.security.MessageDigest;
5
import java.security.NoSuchAlgorithmException;
6
import java.util.HexFormat;
7
8
public final class LogSanitizer {
9
10
    private static final String UNAVAILABLE_VALUE = "-";
11
    private static final String ANONYMOUS_VALUE = "anonymous";
12
    private static final String HASH_PREFIX = "sha256:";
13
    private static final int HASH_HEX_LENGTH = 16;
14
    private static final int DEFAULT_MAX_LENGTH = 160;
15
    private static final int USER_AGENT_MAX_LENGTH = 120;
16
    private static final int REQUEST_PATH_MAX_LENGTH = 200;
17
    private static final HexFormat HEX_FORMAT = HexFormat.of();
18
19
    private LogSanitizer() {
20
    }
21
22
    public static String userAgent(String value) {
23 1 1. userAgent : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::userAgent → SURVIVED
        return normalize(value, USER_AGENT_MAX_LENGTH);
24
    }
25
26
    public static String clientIp(String value) {
27 2 1. clientIp : negated conditional → KILLED
2. clientIp : negated conditional → KILLED
        if (value == null || value.isBlank()) {
28 1 1. clientIp : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::clientIp → KILLED
            return UNAVAILABLE_VALUE;
29
        }
30
        String normalized = normalize(value, DEFAULT_MAX_LENGTH);
31
        String[] octets = normalized.split("\\.", -1);
32 2 1. clientIp : negated conditional → KILLED
2. clientIp : negated conditional → KILLED
        if (octets.length == 4 && isIpv4Octets(octets)) {
33 1 1. clientIp : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::clientIp → KILLED
            return octets[0] + "." + octets[1] + "." + octets[2] + ".0";
34
        }
35 1 1. clientIp : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::clientIp → KILLED
        return HASH_PREFIX + sha256Hex(normalized).substring(0, HASH_HEX_LENGTH);
36
    }
37
38
    public static String requestPath(String value) {
39 1 1. requestPath : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::requestPath → SURVIVED
        return normalize(value, REQUEST_PATH_MAX_LENGTH);
40
    }
41
42
    public static String reason(String value) {
43 1 1. reason : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::reason → NO_COVERAGE
        return normalize(value, DEFAULT_MAX_LENGTH);
44
    }
45
46
    public static String actorId(String value) {
47 3 1. actorId : negated conditional → KILLED
2. actorId : negated conditional → KILLED
3. actorId : negated conditional → KILLED
        if (value == null || value.isBlank() || ANONYMOUS_VALUE.equals(value)) {
48 1 1. actorId : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::actorId → KILLED
            return ANONYMOUS_VALUE;
49
        }
50
        String normalized = normalize(value, DEFAULT_MAX_LENGTH);
51 1 1. actorId : negated conditional → KILLED
        if (normalized.contains("@")) {
52 1 1. actorId : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::actorId → KILLED
            return maskEmail(normalized);
53
        }
54 1 1. actorId : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::actorId → KILLED
        return HASH_PREFIX + sha256Hex(normalized).substring(0, HASH_HEX_LENGTH);
55
    }
56
57
    public static String normalize(String value) {
58 1 1. normalize : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::normalize → KILLED
        return normalize(value, DEFAULT_MAX_LENGTH);
59
    }
60
61
    private static String normalize(String value, int maxLength) {
62 2 1. normalize : negated conditional → KILLED
2. normalize : negated conditional → KILLED
        if (value == null || value.isBlank()) {
63 1 1. normalize : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::normalize → KILLED
            return UNAVAILABLE_VALUE;
64
        }
65
66
        StringBuilder builder = new StringBuilder(Math.min(value.length(), maxLength));
67 4 1. normalize : negated conditional → KILLED
2. normalize : negated conditional → KILLED
3. normalize : changed conditional boundary → KILLED
4. normalize : changed conditional boundary → KILLED
        for (int index = 0; index < value.length() && builder.length() < maxLength; index++) {
68
            char character = value.charAt(index);
69 4 1. normalize : negated conditional → KILLED
2. normalize : negated conditional → KILLED
3. normalize : negated conditional → KILLED
4. normalize : negated conditional → KILLED
            if (Character.isISOControl(character) || Character.isWhitespace(character) || character == '='
70
                    || character == '|') {
71
                builder.append('_');
72
            } else {
73
                builder.append(character);
74
            }
75
        }
76 2 1. normalize : changed conditional boundary → SURVIVED
2. normalize : negated conditional → KILLED
        if (value.length() > maxLength) {
77
            builder.append("...");
78
        }
79 1 1. normalize : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::normalize → KILLED
        return builder.toString();
80
    }
81
82
    private static String maskEmail(String email) {
83
        int atIndex = email.indexOf('@');
84 4 1. maskEmail : Replaced integer subtraction with addition → SURVIVED
2. maskEmail : changed conditional boundary → SURVIVED
3. maskEmail : negated conditional → KILLED
4. maskEmail : negated conditional → KILLED
        if (atIndex <= 0 || atIndex == email.length() - 1) {
85 1 1. maskEmail : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::maskEmail → NO_COVERAGE
            return "***";
86
        }
87
88
        String localPart = email.substring(0, atIndex);
89 1 1. maskEmail : Replaced integer addition with subtraction → SURVIVED
        String domain = email.substring(atIndex + 1);
90 1 1. maskEmail : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::maskEmail → KILLED
        return localPartPrefix(localPart) + "***@" + domain;
91
    }
92
93
    private static String localPartPrefix(String localPart) {
94 1 1. localPartPrefix : negated conditional → KILLED
        if (localPart.length() == 1) {
95 1 1. localPartPrefix : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::localPartPrefix → KILLED
            return localPart;
96
        }
97 1 1. localPartPrefix : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::localPartPrefix → KILLED
        return localPart.substring(0, Math.min(localPart.length(), 2));
98
    }
99
100
    private static boolean isIpv4Octets(String[] octets) {
101
        for (String octet : octets) {
102 1 1. isIpv4Octets : negated conditional → KILLED
            if (!isIpv4Octet(octet)) {
103 1 1. isIpv4Octets : replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octets → KILLED
                return false;
104
            }
105
        }
106 1 1. isIpv4Octets : replaced boolean return with false for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octets → KILLED
        return true;
107
    }
108
109
    private static boolean isIpv4Octet(String octet) {
110 3 1. isIpv4Octet : changed conditional boundary → KILLED
2. isIpv4Octet : negated conditional → KILLED
3. isIpv4Octet : negated conditional → KILLED
        if (octet.isEmpty() || octet.length() > 3) {
111 1 1. isIpv4Octet : replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octet → KILLED
            return false;
112
        }
113
        int value = 0;
114 2 1. isIpv4Octet : negated conditional → SURVIVED
2. isIpv4Octet : changed conditional boundary → KILLED
        for (int index = 0; index < octet.length(); index++) {
115
            char character = octet.charAt(index);
116 1 1. isIpv4Octet : negated conditional → KILLED
            if (!Character.isDigit(character)) {
117 1 1. isIpv4Octet : replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octet → NO_COVERAGE
                return false;
118
            }
119 2 1. isIpv4Octet : Replaced integer multiplication with division → SURVIVED
2. isIpv4Octet : Replaced integer addition with subtraction → SURVIVED
            value = value * 10 + Character.digit(character, 10);
120
        }
121 3 1. isIpv4Octet : replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octet → SURVIVED
2. isIpv4Octet : negated conditional → KILLED
3. isIpv4Octet : changed conditional boundary → KILLED
        return value <= 255;
122
    }
123
124
    private static String sha256Hex(String value) {
125
        try {
126
            MessageDigest digest = MessageDigest.getInstance("SHA-256");
127 1 1. sha256Hex : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::sha256Hex → KILLED
            return HEX_FORMAT.formatHex(digest.digest(value.getBytes(StandardCharsets.UTF_8)));
128
        } catch (NoSuchAlgorithmException exception) {
129
            throw new IllegalStateException("SHA-256 digest is not available.", exception);
130
        }
131
    }
132
}

Mutations

23

1.1
Location : userAgent
Killed by : none
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::userAgent → SURVIVED
Covering tests

27

1.1
Location : clientIp
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_for_blank_returns_dash(java.lang.String)]
negated conditional → KILLED

2.2
Location : clientIp
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_for_blank_returns_dash(java.lang.String)]
negated conditional → KILLED

28

1.1
Location : clientIp
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_for_blank_returns_dash(java.lang.String)]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::clientIp → KILLED

32

1.1
Location : clientIp
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_non_ipv4_falls_back_to_hash(java.lang.String)]
negated conditional → KILLED

2.2
Location : clientIp
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_non_ipv4_falls_back_to_hash(java.lang.String)]
negated conditional → KILLED

33

1.1
Location : clientIp
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::clientIp → KILLED

35

1.1
Location : clientIp
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_non_ipv4_falls_back_to_hash(java.lang.String)]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::clientIp → KILLED

39

1.1
Location : requestPath
Killed by : none
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::requestPath → SURVIVED
Covering tests

43

1.1
Location : reason
Killed by : none
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::reason → NO_COVERAGE

47

1.1
Location : actorId
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:actorId_for_blank_anonymous_returns_anonymous(java.lang.String)]
negated conditional → KILLED

2.2
Location : actorId
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:actorId_for_blank_anonymous_returns_anonymous(java.lang.String)]
negated conditional → KILLED

3.3
Location : actorId
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:actorId_for_blank_anonymous_returns_anonymous(java.lang.String)]
negated conditional → KILLED

48

1.1
Location : actorId
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:actorId_for_blank_anonymous_returns_anonymous(java.lang.String)]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::actorId → KILLED

51

1.1
Location : actorId
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:actorId_for_non_email_non_blank_returns_hash_prefix(java.lang.String)]
negated conditional → KILLED

52

1.1
Location : actorId
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:actorId_for_email_masks_local_part(java.lang.String)]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::actorId → KILLED

54

1.1
Location : actorId
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:actorId_for_non_email_non_blank_returns_hash_prefix(java.lang.String)]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::actorId → KILLED

58

1.1
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:normalize_null_or_blank_returns_dash(java.lang.String)]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::normalize → KILLED

62

1.1
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:normalize_null_or_blank_returns_dash(java.lang.String)]
negated conditional → KILLED

2.2
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:normalize_null_or_blank_returns_dash(java.lang.String)]
negated conditional → KILLED

63

1.1
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:normalize_null_or_blank_returns_dash(java.lang.String)]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::normalize → KILLED

67

1.1
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
negated conditional → KILLED

2.2
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
negated conditional → KILLED

3.3
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:requestPath_output_length_is_bounded(java.lang.String)]
changed conditional boundary → KILLED

4.4
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:requestPath_output_length_is_bounded(java.lang.String)]
changed conditional boundary → KILLED

69

1.1
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
negated conditional → KILLED

2.2
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
negated conditional → KILLED

3.3
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:normalize_strips_control_whitespace_equals_pipe_chars(java.lang.String)]
negated conditional → KILLED

4.4
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:normalize_strips_control_whitespace_equals_pipe_chars(java.lang.String)]
negated conditional → KILLED

76

1.1
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
negated conditional → KILLED

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

79

1.1
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::normalize → KILLED

84

1.1
Location : maskEmail
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:actorId_for_email_masks_local_part(java.lang.String)]
negated conditional → KILLED

2.2
Location : maskEmail
Killed by : none
Replaced integer subtraction with addition → SURVIVED
Covering tests

3.3
Location : maskEmail
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:actorId_for_email_masks_local_part(java.lang.String)]
negated conditional → KILLED

4.4
Location : maskEmail
Killed by : none
changed conditional boundary → SURVIVED Covering tests

85

1.1
Location : maskEmail
Killed by : none
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::maskEmail → NO_COVERAGE

89

1.1
Location : maskEmail
Killed by : none
Replaced integer addition with subtraction → SURVIVED
Covering tests

90

1.1
Location : maskEmail
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:actorId_for_email_masks_local_part(java.lang.String)]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::maskEmail → KILLED

94

1.1
Location : localPartPrefix
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:actorId_for_email_masks_local_part(java.lang.String)]
negated conditional → KILLED

95

1.1
Location : localPartPrefix
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:actorId_for_email_masks_local_part(java.lang.String)]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::localPartPrefix → KILLED

97

1.1
Location : localPartPrefix
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:actorId_for_email_masks_local_part(java.lang.String)]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::localPartPrefix → KILLED

102

1.1
Location : isIpv4Octets
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_non_ipv4_falls_back_to_hash(java.lang.String)]
negated conditional → KILLED

103

1.1
Location : isIpv4Octets
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_non_ipv4_falls_back_to_hash(java.lang.String)]
replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octets → KILLED

106

1.1
Location : isIpv4Octets
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
replaced boolean return with false for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octets → KILLED

110

1.1
Location : isIpv4Octet
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
changed conditional boundary → KILLED

2.2
Location : isIpv4Octet
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
negated conditional → KILLED

3.3
Location : isIpv4Octet
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
negated conditional → KILLED

111

1.1
Location : isIpv4Octet
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_non_ipv4_falls_back_to_hash(java.lang.String)]
replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octet → KILLED

114

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

2.2
Location : isIpv4Octet
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
changed conditional boundary → KILLED

116

1.1
Location : isIpv4Octet
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
negated conditional → KILLED

117

1.1
Location : isIpv4Octet
Killed by : none
replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octet → NO_COVERAGE

119

1.1
Location : isIpv4Octet
Killed by : none
Replaced integer multiplication with division → SURVIVED
Covering tests

2.2
Location : isIpv4Octet
Killed by : none
Replaced integer addition with subtraction → SURVIVED Covering tests

121

1.1
Location : isIpv4Octet
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
negated conditional → KILLED

2.2
Location : isIpv4Octet
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_valid_ipv4_masks_last_octet(java.lang.String)]
changed conditional boundary → KILLED

3.3
Location : isIpv4Octet
Killed by : none
replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octet → SURVIVED
Covering tests

127

1.1
Location : sha256Hex
Killed by : com.project.auth.application.support.logging.LogSanitizerPropertyTest.[engine:jqwik]/[class:com.project.auth.application.support.logging.LogSanitizerPropertyTest]/[property:clientIp_with_non_ipv4_falls_back_to_hash(java.lang.String)]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::sha256Hex → KILLED

Active mutators

Tests examined


Report generated by PIT 1.19.1