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 actorId(String value) {
43 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)) {
44 1 1. actorId : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::actorId → KILLED
            return ANONYMOUS_VALUE;
45
        }
46
        String normalized = normalize(value, DEFAULT_MAX_LENGTH);
47 1 1. actorId : negated conditional → KILLED
        if (normalized.contains("@")) {
48 1 1. actorId : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::actorId → KILLED
            return maskEmail(normalized);
49
        }
50 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);
51
    }
52
53
    public static String normalize(String value) {
54 1 1. normalize : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::normalize → KILLED
        return normalize(value, DEFAULT_MAX_LENGTH);
55
    }
56
57
    private static String normalize(String value, int maxLength) {
58 2 1. normalize : negated conditional → KILLED
2. normalize : negated conditional → KILLED
        if (value == null || value.isBlank()) {
59 1 1. normalize : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::normalize → KILLED
            return UNAVAILABLE_VALUE;
60
        }
61
62
        StringBuilder builder = new StringBuilder(Math.min(value.length(), maxLength));
63 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++) {
64
            char character = value.charAt(index);
65 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 == '='
66
                    || character == '|') {
67
                builder.append('_');
68
            } else {
69
                builder.append(character);
70
            }
71
        }
72 2 1. normalize : changed conditional boundary → SURVIVED
2. normalize : negated conditional → KILLED
        if (value.length() > maxLength) {
73
            builder.append("...");
74
        }
75 1 1. normalize : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::normalize → KILLED
        return builder.toString();
76
    }
77
78
    private static String maskEmail(String email) {
79
        int atIndex = email.indexOf('@');
80 4 1. maskEmail : negated conditional → KILLED
2. maskEmail : Replaced integer subtraction with addition → KILLED
3. maskEmail : negated conditional → KILLED
4. maskEmail : changed conditional boundary → KILLED
        if (atIndex <= 0 || atIndex == email.length() - 1) {
81 1 1. maskEmail : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::maskEmail → KILLED
            return "***";
82
        }
83
84
        String localPart = email.substring(0, atIndex);
85 1 1. maskEmail : Replaced integer addition with subtraction → SURVIVED
        String domain = email.substring(atIndex + 1);
86 1 1. maskEmail : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::maskEmail → KILLED
        return localPartPrefix(localPart) + "***@" + domain;
87
    }
88
89
    private static String localPartPrefix(String localPart) {
90 1 1. localPartPrefix : negated conditional → KILLED
        if (localPart.length() == 1) {
91 1 1. localPartPrefix : replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::localPartPrefix → KILLED
            return localPart;
92
        }
93 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));
94
    }
95
96
    private static boolean isIpv4Octets(String[] octets) {
97
        for (String octet : octets) {
98 1 1. isIpv4Octets : negated conditional → KILLED
            if (!isIpv4Octet(octet)) {
99 1 1. isIpv4Octets : replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octets → KILLED
                return false;
100
            }
101
        }
102 1 1. isIpv4Octets : replaced boolean return with false for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octets → KILLED
        return true;
103
    }
104
105
    private static boolean isIpv4Octet(String octet) {
106 3 1. isIpv4Octet : changed conditional boundary → KILLED
2. isIpv4Octet : negated conditional → KILLED
3. isIpv4Octet : negated conditional → KILLED
        if (octet.isEmpty() || octet.length() > 3) {
107 1 1. isIpv4Octet : replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octet → KILLED
            return false;
108
        }
109
        int value = 0;
110 2 1. isIpv4Octet : negated conditional → KILLED
2. isIpv4Octet : changed conditional boundary → KILLED
        for (int index = 0; index < octet.length(); index++) {
111
            char character = octet.charAt(index);
112 1 1. isIpv4Octet : negated conditional → KILLED
            if (!Character.isDigit(character)) {
113 1 1. isIpv4Octet : replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octet → KILLED
                return false;
114
            }
115 2 1. isIpv4Octet : Replaced integer multiplication with division → KILLED
2. isIpv4Octet : Replaced integer addition with subtraction → KILLED
            value = value * 10 + Character.digit(character, 10);
116
        }
117 3 1. isIpv4Octet : negated conditional → KILLED
2. isIpv4Octet : changed conditional boundary → KILLED
3. isIpv4Octet : replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octet → KILLED
        return value <= 255;
118
    }
119
120
    private static String sha256Hex(String value) {
121
        try {
122
            MessageDigest digest = MessageDigest.getInstance("SHA-256");
123 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)));
124
        } catch (NoSuchAlgorithmException exception) {
125
            throw new IllegalStateException("SHA-256 digest is not available.", exception);
126
        }
127
    }
128
}

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.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:client_ip_falls_back_to_hash_when_octet_invalid(java.lang.String)]/[test-template-invocation:#3]
negated conditional → KILLED

2.2
Location : clientIp
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:client_ip_falls_back_to_hash_when_octet_invalid(java.lang.String)]/[test-template-invocation:#3]
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_valid_ipv4_masks_last_octet(java.lang.String)]
negated conditional → KILLED

2.2
Location : clientIp
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:client_ip_falls_back_to_hash_when_octet_invalid(java.lang.String)]/[test-template-invocation:#3]
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.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:client_ip_falls_back_to_hash_when_octet_invalid(java.lang.String)]/[test-template-invocation:#3]
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 : actorId
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:mask_email_returns_triple_star_for_malformed_emails(java.lang.String)]/[test-template-invocation:#1]
negated conditional → KILLED

2.2
Location : actorId
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:mask_email_returns_triple_star_for_malformed_emails(java.lang.String)]/[test-template-invocation:#1]
negated conditional → KILLED

3.3
Location : actorId
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:mask_email_returns_triple_star_for_malformed_emails(java.lang.String)]/[test-template-invocation:#1]
negated conditional → KILLED

44

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

47

1.1
Location : actorId
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:mask_email_returns_triple_star_for_malformed_emails(java.lang.String)]/[test-template-invocation:#1]
negated conditional → KILLED

48

1.1
Location : actorId
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:mask_email_returns_triple_star_for_malformed_emails(java.lang.String)]/[test-template-invocation:#1]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::actorId → KILLED

50

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

54

1.1
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[method:normalize_single_arg_uses_default_max_length()]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::normalize → KILLED

58

1.1
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[method:normalize_single_arg_uses_default_max_length()]
negated conditional → KILLED

2.2
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[method:normalize_single_arg_uses_default_max_length()]
negated conditional → KILLED

59

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

63

1.1
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[method:normalize_single_arg_uses_default_max_length()]
negated conditional → KILLED

2.2
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[method:normalize_single_arg_uses_default_max_length()]
negated conditional → KILLED

3.3
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[method:normalize_single_arg_uses_default_max_length()]
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

65

1.1
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[method:normalize_single_arg_uses_default_max_length()]
negated conditional → KILLED

2.2
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[method:normalize_single_arg_uses_default_max_length()]
negated conditional → KILLED

3.3
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[method:normalize_single_arg_uses_default_max_length()]
negated conditional → KILLED

4.4
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[method:normalize_single_arg_uses_default_max_length()]
negated conditional → KILLED

72

1.1
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[method:normalize_single_arg_uses_default_max_length()]
negated conditional → KILLED

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

75

1.1
Location : normalize
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[method:normalize_single_arg_uses_default_max_length()]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::normalize → KILLED

80

1.1
Location : maskEmail
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:mask_email_returns_triple_star_for_malformed_emails(java.lang.String)]/[test-template-invocation:#2]
negated conditional → KILLED

2.2
Location : maskEmail
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:mask_email_returns_triple_star_for_malformed_emails(java.lang.String)]/[test-template-invocation:#2]
Replaced integer subtraction with addition → KILLED

3.3
Location : maskEmail
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:mask_email_returns_triple_star_for_malformed_emails(java.lang.String)]/[test-template-invocation:#1]
negated conditional → KILLED

4.4
Location : maskEmail
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:mask_email_returns_triple_star_for_malformed_emails(java.lang.String)]/[test-template-invocation:#1]
changed conditional boundary → KILLED

81

1.1
Location : maskEmail
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:mask_email_returns_triple_star_for_malformed_emails(java.lang.String)]/[test-template-invocation:#1]
replaced return value with "" for com/project/auth/application/support/logging/LogSanitizer::maskEmail → KILLED

85

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

86

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

90

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

91

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

93

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

98

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

99

1.1
Location : isIpv4Octets
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:client_ip_falls_back_to_hash_when_octet_invalid(java.lang.String)]/[test-template-invocation:#3]
replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octets → 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_valid_ipv4_masks_last_octet(java.lang.String)]
replaced boolean return with false for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octets → KILLED

106

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)]
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

107

1.1
Location : isIpv4Octet
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:client_ip_falls_back_to_hash_when_octet_invalid(java.lang.String)]/[test-template-invocation:#2]
replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octet → KILLED

110

1.1
Location : isIpv4Octet
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:client_ip_falls_back_to_hash_when_octet_invalid(java.lang.String)]/[test-template-invocation:#3]
negated conditional → KILLED

2.2
Location : isIpv4Octet
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:client_ip_falls_back_to_hash_when_octet_invalid(java.lang.String)]/[test-template-invocation:#3]
changed conditional boundary → KILLED

112

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

113

1.1
Location : isIpv4Octet
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:client_ip_falls_back_to_hash_when_octet_invalid(java.lang.String)]/[test-template-invocation:#3]
replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octet → KILLED

115

1.1
Location : isIpv4Octet
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:client_ip_falls_back_to_hash_when_octet_invalid(java.lang.String)]/[test-template-invocation:#1]
Replaced integer multiplication with division → KILLED

2.2
Location : isIpv4Octet
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:client_ip_falls_back_to_hash_when_octet_invalid(java.lang.String)]/[test-template-invocation:#1]
Replaced integer addition with subtraction → KILLED

117

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 : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:client_ip_falls_back_to_hash_when_octet_invalid(java.lang.String)]/[test-template-invocation:#1]
replaced boolean return with true for com/project/auth/application/support/logging/LogSanitizer::isIpv4Octet → KILLED

123

1.1
Location : sha256Hex
Killed by : com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest.[engine:junit-jupiter]/[class:com.project.auth.application.support.logging.LogSanitizerEdgeCaseTest]/[test-template:client_ip_falls_back_to_hash_when_octet_invalid(java.lang.String)]/[test-template-invocation:#3]
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