Align.java

1
/*
2
 * Copyright 2004 the original author or authors.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package com.ancientprogramming.fixedformat4j.annotation;
17
18
/**
19
 * Capable of pad or chop data in a given direction
20
 *
21
 * @author Jacob von Eyben - <a href="https://eybenconsult.com">https://eybenconsult.com</a>
22
 * @since 1.0.0
23
 */
24
public enum Align {
25
26
  /**
27
   * Sentinel value meaning "inherit alignment from the enclosing {@link Record#align()}.
28
   * This value is resolved by the framework before any formatter runs and must never be
29
   * passed to {@link #apply} or {@link #remove}.
30
   *
31
   * @since 1.7.1
32
   */
33
  INHERIT {
34
    public String apply(String data, int length, char paddingChar) {
35 1 1. apply : removed call to java/lang/UnsupportedOperationException::<init> → NO_COVERAGE
      throw new UnsupportedOperationException("Align.INHERIT must be resolved to LEFT or RIGHT before use");
36
    }
37
    public String remove(String data, char paddingChar) {
38 1 1. remove : removed call to java/lang/UnsupportedOperationException::<init> → NO_COVERAGE
      throw new UnsupportedOperationException("Align.INHERIT must be resolved to LEFT or RIGHT before use");
39
    }
40
  },
41
42
  /**
43
   * Pad or chop data to the left, so the text is aligned to the right
44
   */
45
  RIGHT {
46
    /** {@inheritDoc} */
47
    public String apply(String data, int length, char paddingChar) {
48
      String result;
49 3 1. apply : removed conditional - replaced equality check with true → KILLED
2. apply : removed conditional - replaced equality check with false → KILLED
3. apply : negated conditional → KILLED
      if (data == null) {
50
        data = "";
51
      }
52 1 1. apply : removed call to java/lang/String::length → KILLED
      int dataLength = data.length();
53 4 1. apply : changed conditional boundary → SURVIVED
2. apply : removed conditional - replaced comparison check with false → KILLED
3. apply : negated conditional → KILLED
4. apply : removed conditional - replaced comparison check with true → KILLED
      if (dataLength > length) {
54 3 1. apply : Replaced integer subtraction with addition → KILLED
2. apply : removed call to java/lang/String::substring → KILLED
3. apply : replaced call to java/lang/String::substring with receiver → KILLED
        result = data.substring(dataLength - length);
55
      } else {
56 2 1. apply : replaced call to com/ancientprogramming/fixedformat4j/annotation/Align::pad with argument → KILLED
2. apply : removed call to com/ancientprogramming/fixedformat4j/annotation/Align::pad → KILLED
        result = pad(data, length, paddingChar) + data;
57
      }
58 1 1. apply : replaced return value with "" for com/ancientprogramming/fixedformat4j/annotation/Align$2::apply → KILLED
      return result;
59
    }
60
    /** {@inheritDoc} */
61
    public String remove(String data, char paddingChar) {
62 3 1. remove : removed conditional - replaced equality check with false → KILLED
2. remove : negated conditional → KILLED
3. remove : removed conditional - replaced equality check with true → KILLED
      if (data == null) {
63
        return "";
64
      }
65 1 1. remove : Substituted 0 with 1 → KILLED
      int start = 0;
66 9 1. remove : removed conditional - replaced equality check with false → KILLED
2. remove : negated conditional → KILLED
3. remove : removed call to java/lang/String::length → KILLED
4. remove : removed conditional - replaced comparison check with true → KILLED
5. remove : removed call to java/lang/String::charAt → KILLED
6. remove : negated conditional → KILLED
7. remove : removed conditional - replaced equality check with true → KILLED
8. remove : removed conditional - replaced comparison check with false → KILLED
9. remove : changed conditional boundary → KILLED
      while (start < data.length() && data.charAt(start) == paddingChar) {
67
        start++;
68
      }
69 3 1. remove : replaced call to java/lang/String::substring with receiver → KILLED
2. remove : removed call to java/lang/String::substring → KILLED
3. remove : replaced return value with "" for com/ancientprogramming/fixedformat4j/annotation/Align$2::remove → KILLED
      return data.substring(start);
70
    }},
71
72
73
  /**
74
   * Pad or chop data to the right, so the text is aligned to the left
75
   */
76
  LEFT {
77
    /** {@inheritDoc} */
78
    public String apply(String data, int length, char paddingChar) {
79
      String result;
80 3 1. apply : removed conditional - replaced equality check with true → KILLED
2. apply : negated conditional → KILLED
3. apply : removed conditional - replaced equality check with false → KILLED
      if (data == null) {
81
        data = "";
82
      }
83 1 1. apply : removed call to java/lang/String::length → KILLED
      int dataLength = data.length();
84 4 1. apply : changed conditional boundary → SURVIVED
2. apply : removed conditional - replaced comparison check with true → KILLED
3. apply : negated conditional → KILLED
4. apply : removed conditional - replaced comparison check with false → KILLED
      if (dataLength > length) {
85 3 1. apply : Substituted 0 with 1 → KILLED
2. apply : replaced call to java/lang/String::substring with receiver → KILLED
3. apply : removed call to java/lang/String::substring → KILLED
        result = data.substring(0, length);
86
      } else {
87 2 1. apply : replaced call to com/ancientprogramming/fixedformat4j/annotation/Align::pad with argument → KILLED
2. apply : removed call to com/ancientprogramming/fixedformat4j/annotation/Align::pad → KILLED
        result = data + pad(data, length, paddingChar);
88
      }
89 1 1. apply : replaced return value with "" for com/ancientprogramming/fixedformat4j/annotation/Align$3::apply → KILLED
      return result;
90
    }
91
92
    /** {@inheritDoc} */
93
    public String remove(String data, char paddingChar) {
94 3 1. remove : removed conditional - replaced equality check with true → KILLED
2. remove : removed conditional - replaced equality check with false → KILLED
3. remove : negated conditional → KILLED
      if (data == null) {
95
        return "";
96
      }
97 1 1. remove : removed call to java/lang/String::length → KILLED
      int end = data.length();
98 10 1. remove : negated conditional → KILLED
2. remove : removed conditional - replaced comparison check with false → KILLED
3. remove : removed conditional - replaced equality check with true → KILLED
4. remove : Substituted 1 with 0 → KILLED
5. remove : Replaced integer subtraction with addition → KILLED
6. remove : removed call to java/lang/String::charAt → KILLED
7. remove : negated conditional → KILLED
8. remove : removed conditional - replaced equality check with false → KILLED
9. remove : changed conditional boundary → KILLED
10. remove : removed conditional - replaced comparison check with true → KILLED
      while (end > 0 && data.charAt(end - 1) == paddingChar) {
99
        end--;
100
      }
101 4 1. remove : Substituted 0 with 1 → KILLED
2. remove : replaced return value with "" for com/ancientprogramming/fixedformat4j/annotation/Align$3::remove → KILLED
3. remove : replaced call to java/lang/String::substring with receiver → KILLED
4. remove : removed call to java/lang/String::substring → KILLED
      return data.substring(0, end);
102
    }};
103
104
  private static String pad(String data, int length, char paddingChar) {
105 6 1. pad : removed call to java/lang/String::repeat → KILLED
2. pad : Replaced integer subtraction with addition → KILLED
3. pad : removed call to java/lang/String::valueOf → KILLED
4. pad : replaced return value with "" for com/ancientprogramming/fixedformat4j/annotation/Align::pad → KILLED
5. pad : removed call to java/lang/String::length → KILLED
6. pad : replaced call to java/lang/String::repeat with receiver → KILLED
    return String.valueOf(paddingChar).repeat(length - data.length());
106
  }
107
108
  /**
109
   * Pads the data in the length specified with the given padding char.
110
   * No padding will be applied if the length of the data is longer than the given length.
111
   *
112
   * @param data        the data to pad.
113
   * @param length      the minimum length after the padding is applied.
114
   * @param paddingChar the char the data is padded with.
115
   * @return the data after padding is applied.
116
   */
117
  public abstract String apply(String data, int length, char paddingChar);
118
119
  /**
120
   * Remove the padding chars from the data.
121
   *
122
   * @param data        the data including padding chars
123
   * @param paddingChar the padding char to remove
124
   * @return the data after padding is removed.
125
   */
126
  public abstract String remove(String data, char paddingChar);
127
}

Mutations

35

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

38

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

49

1.1
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
removed conditional - replaced equality check with true → KILLED

2.2
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftPadding()]
removed conditional - replaced equality check with false → KILLED

3.3
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
negated conditional → KILLED

52

1.1
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftPadding()]
removed call to java/lang/String::length → KILLED

53

1.1
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftPadding()]
removed conditional - replaced comparison check with false → KILLED

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

3.3
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testEmptyStringInput()]
negated conditional → KILLED

4.4
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testEmptyStringInput()]
removed conditional - replaced comparison check with true → KILLED

54

1.1
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftPadding()]
Replaced integer subtraction with addition → KILLED

2.2
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftPadding()]
removed call to java/lang/String::substring → KILLED

3.3
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftPadding()]
replaced call to java/lang/String::substring with receiver → KILLED

56

1.1
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
replaced call to com/ancientprogramming/fixedformat4j/annotation/Align::pad with argument → KILLED

2.2
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
removed call to com/ancientprogramming/fixedformat4j/annotation/Align::pad → KILLED

58

1.1
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
replaced return value with "" for com/ancientprogramming/fixedformat4j/annotation/Align$2::apply → KILLED

62

1.1
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
removed conditional - replaced equality check with false → KILLED

2.2
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
negated conditional → KILLED

3.3
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
removed conditional - replaced equality check with true → KILLED

65

1.1
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
Substituted 0 with 1 → KILLED

66

1.1
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
removed conditional - replaced equality check with false → KILLED

2.2
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
negated conditional → KILLED

3.3
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
removed call to java/lang/String::length → KILLED

4.4
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
removed conditional - replaced comparison check with true → KILLED

5.5
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
removed call to java/lang/String::charAt → KILLED

6.6
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
negated conditional → KILLED

7.7
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
removed conditional - replaced equality check with true → KILLED

8.8
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
removed conditional - replaced comparison check with false → KILLED

9.9
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
changed conditional boundary → KILLED

69

1.1
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
replaced call to java/lang/String::substring with receiver → KILLED

2.2
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
removed call to java/lang/String::substring → KILLED

3.3
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testLeftRemove()]
replaced return value with "" for com/ancientprogramming/fixedformat4j/annotation/Align$2::remove → KILLED

80

1.1
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
removed conditional - replaced equality check with true → KILLED

2.2
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
negated conditional → KILLED

3.3
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestLocalDateTimeFormatter.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestLocalDateTimeFormatter]/[method:testNullFormatReturnsSpaces()]
removed conditional - replaced equality check with false → KILLED

83

1.1
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestStringFormatter.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestStringFormatter]/[method:testFormat()]
removed call to java/lang/String::length → KILLED

84

1.1
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testEmptyStringInput()]
removed conditional - replaced comparison check with true → KILLED

2.2
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testEmptyStringInput()]
negated conditional → KILLED

3.3
Location : apply
Killed by : none
changed conditional boundary → SURVIVED
Covering tests

4.4
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestStringFormatter.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestStringFormatter]/[method:testFormat()]
removed conditional - replaced comparison check with false → KILLED

85

1.1
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestStringFormatter.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestStringFormatter]/[method:testFormat()]
Substituted 0 with 1 → KILLED

2.2
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestStringFormatter.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestStringFormatter]/[method:testFormat()]
replaced call to java/lang/String::substring with receiver → KILLED

3.3
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.format.impl.TestStringFormatter.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.format.impl.TestStringFormatter]/[method:testFormat()]
removed call to java/lang/String::substring → KILLED

87

1.1
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
replaced call to com/ancientprogramming/fixedformat4j/annotation/Align::pad with argument → KILLED

2.2
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
removed call to com/ancientprogramming/fixedformat4j/annotation/Align::pad → KILLED

89

1.1
Location : apply
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
replaced return value with "" for com/ancientprogramming/fixedformat4j/annotation/Align$3::apply → KILLED

94

1.1
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
removed conditional - replaced equality check with true → KILLED

2.2
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
removed conditional - replaced equality check with false → KILLED

3.3
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
negated conditional → KILLED

97

1.1
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
removed call to java/lang/String::length → KILLED

98

1.1
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
negated conditional → KILLED

2.2
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
removed conditional - replaced comparison check with false → KILLED

3.3
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
removed conditional - replaced equality check with true → KILLED

4.4
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
Substituted 1 with 0 → KILLED

5.5
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
Replaced integer subtraction with addition → KILLED

6.6
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
removed call to java/lang/String::charAt → KILLED

7.7
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
negated conditional → KILLED

8.8
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
removed conditional - replaced equality check with false → KILLED

9.9
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
changed conditional boundary → KILLED

10.10
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
removed conditional - replaced comparison check with true → KILLED

101

1.1
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
Substituted 0 with 1 → KILLED

2.2
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
replaced return value with "" for com/ancientprogramming/fixedformat4j/annotation/Align$3::remove → KILLED

3.3
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
replaced call to java/lang/String::substring with receiver → KILLED

4.4
Location : remove
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testRightRemove()]
removed call to java/lang/String::substring → KILLED

105

1.1
Location : pad
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
removed call to java/lang/String::repeat → KILLED

2.2
Location : pad
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
Replaced integer subtraction with addition → KILLED

3.3
Location : pad
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
removed call to java/lang/String::valueOf → KILLED

4.4
Location : pad
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testEmptyStringInput()]
replaced return value with "" for com/ancientprogramming/fixedformat4j/annotation/Align::pad → KILLED

5.5
Location : pad
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
removed call to java/lang/String::length → KILLED

6.6
Location : pad
Killed by : com.ancientprogramming.fixedformat4j.annotation.TestAlign.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.annotation.TestAlign]/[method:testStringExactlyAtBoundary()]
replaced call to java/lang/String::repeat with receiver → KILLED

Active mutators

Tests examined


Report generated by PIT 1.23.1 support