JsonSummarizer.java

1
package com.github.dakusui.json;
2
3
import com.github.dakusui.valid8j_cliche.core.All;
4
import com.github.dakusui.valid8j_cliche.core.Transform;
5
import com.google.gson.JsonArray;
6
import com.google.gson.JsonElement;
7
import com.google.gson.JsonObject;
8
import com.google.gson.JsonPrimitive;
9
10
import java.util.List;
11
import java.util.Objects;
12
import java.util.function.Predicate;
13
14
import static com.github.dakusui.valid8j.Assertions.that;
15
import static com.github.dakusui.valid8j_cliche.core.Cliche.statement;
16
import static com.github.dakusui.valid8j_cliche.json.JsonObjectTo.keyList;
17
import static com.github.dakusui.valid8j_pcond.forms.Predicates.*;
18
import static com.github.dakusui.valid8j_pcond.forms.Printables.predicate;
19
20
public class JsonSummarizer {
21
  public static JsonElement summaryObject(JsonObject root, List<Object> pathToParent, Object focus) {
22
    JsonElement previousElement = parentElement(focus, JsonUtils.asJsonElement(root, pathToParent.toArray()));
23 1 1. summaryObject : negated conditional → SURVIVED
    JsonElement ret = focus instanceof String ? new JsonObject() : new JsonArray();
24 3 1. summaryObject : negated conditional → KILLED
2. summaryObject : Replaced integer subtraction with addition → KILLED
3. summaryObject : changed conditional boundary → KILLED
    for (int i = pathToParent.size() - 1; i >= 0; i--) {
25
      Object currentKey = pathToParent.get(i);
26 1 1. summaryObject : negated conditional → KILLED
      if (currentKey instanceof String) {
27
        ret = new JsonObject();
28 1 1. summaryObject : removed call to com/google/gson/JsonObject::add → KILLED
        ((JsonObject) ret).add((String) currentKey, previousElement);
29 1 1. summaryObject : negated conditional → KILLED
      } else if (currentKey instanceof Integer) {
30
        ret = new JsonArray();
31 1 1. summaryObject : removed call to com/google/gson/JsonArray::add → SURVIVED
        ((JsonArray) ret).add(previousElement);
32
      } else
33
        assert false;
34
      previousElement = ret;
35
    }
36 1 1. summaryObject : replaced return value with null for com/github/dakusui/json/JsonSummarizer::summaryObject → KILLED
    return ret;
37
  }
38
39
  public static JsonElement collapseForObjectValue(JsonElement element) {
40
    JsonElement ret = collapseJsonElement(element);
41 2 1. collapseForObjectValue : negated conditional → KILLED
2. collapseForObjectValue : replaced return value with null for com/github/dakusui/json/JsonSummarizer::collapseForObjectValue → KILLED
    if (ret != null) return ret;
42 1 1. collapseForObjectValue : replaced return value with null for com/github/dakusui/json/JsonSummarizer::collapseForObjectValue → SURVIVED
    return new JsonPrimitive("...");
43
  }
44
45
  private static JsonElement collapseJsonElement(JsonElement element) {
46 1 1. collapseJsonElement : negated conditional → KILLED
    if (element.isJsonArray()) {
47
      JsonArray ret = new JsonArray();
48 1 1. collapseJsonElement : negated conditional → KILLED
      if (!((JsonArray) element).isEmpty())
49 1 1. collapseJsonElement : removed call to com/google/gson/JsonArray::add → KILLED
        ret.add("...");
50 1 1. collapseJsonElement : replaced return value with null for com/github/dakusui/json/JsonSummarizer::collapseJsonElement → KILLED
      return ret;
51 1 1. collapseJsonElement : negated conditional → KILLED
    } else if (element.isJsonObject()) {
52
      JsonObject ret = new JsonObject();
53 1 1. collapseJsonElement : negated conditional → KILLED
      if (!((JsonObject) element).keySet().isEmpty())
54 1 1. collapseJsonElement : removed call to com/google/gson/JsonObject::add → KILLED
        ret.add("...", new JsonPrimitive("..."));
55 1 1. collapseJsonElement : replaced return value with null for com/github/dakusui/json/JsonSummarizer::collapseJsonElement → KILLED
      return ret;
56
    }
57
    return null;
58
  }
59
60
  public static JsonElement collapseForArrayElement(JsonElement element) {
61
    JsonElement ret = collapseJsonElement(element);
62 2 1. collapseForArrayElement : replaced return value with null for com/github/dakusui/json/JsonSummarizer::collapseForArrayElement → SURVIVED
2. collapseForArrayElement : negated conditional → SURVIVED
    if (ret != null) return ret;
63 1 1. collapseForArrayElement : replaced return value with null for com/github/dakusui/json/JsonSummarizer::collapseForArrayElement → SURVIVED
    return element;
64
  }
65
66
  /**
67
   * <pre>
68
   *
69
   * </pre>
70
   *
71
   * @param object input JSON object.
72
   * @return A summarized JSON object.
73
   */
74
  public static JsonObject focusedObject(JsonObject object) {
75
    JsonObject ret = new JsonObject();
76 2 1. lambda$focusedObject$0 : removed call to com/google/gson/JsonObject::add → KILLED
2. focusedObject : removed call to java/util/Set::forEach → KILLED
    object.keySet().forEach(k -> ret.add(k, collapseForObjectValue(object.get(k))));
77 1 1. focusedObject : replaced return value with null for com/github/dakusui/json/JsonSummarizer::focusedObject → KILLED
    return ret;
78
  }
79
80
  public static JsonElement parentElement(Object focus, JsonElement parent) {
81 2 1. lambda$parentElement$1 : replaced boolean return with true for com/github/dakusui/json/JsonSummarizer::lambda$parentElement$1 → SURVIVED
2. lambda$parentElement$1 : replaced boolean return with false for com/github/dakusui/json/JsonSummarizer::lambda$parentElement$1 → KILLED
    Predicate<Object> focusIsInstanceOfString = predicate("focusIsInstanceOfString", v -> focus instanceof String);
82 2 1. lambda$parentElement$2 : replaced boolean return with true for com/github/dakusui/json/JsonSummarizer::lambda$parentElement$2 → SURVIVED
2. lambda$parentElement$2 : replaced boolean return with false for com/github/dakusui/json/JsonSummarizer::lambda$parentElement$2 → KILLED
    Predicate<Object> focusIsInstanceOfInteger = predicate("focusIsInstanceOfInteger", v -> focus instanceof Integer);
83
    assert All.$(
84
        statement(focus, isNotNull()),
85
        statement(parent, allOf(isNotNull(), or(
86
            callp("isJsonObject").and(focusIsInstanceOfString),
87
            callp("isJsonArray").and(focusIsInstanceOfInteger)))));
88 1 1. parentElement : negated conditional → KILLED
    if (parent.isJsonObject())
89 1 1. parentElement : replaced return value with null for com/github/dakusui/json/JsonSummarizer::parentElement → KILLED
      return parentObject((String) focus, (JsonObject) parent);
90 1 1. parentElement : negated conditional → KILLED
    if (parent.isJsonArray())
91 1 1. parentElement : replaced return value with null for com/github/dakusui/json/JsonSummarizer::parentElement → SURVIVED
      return parentArray((Integer) focus, (JsonArray) parent);
92
    throw new RuntimeException();
93
  }
94
95
  public static JsonObject parentObject(String focusedChildKey, JsonObject object) {
96
    assert All.$(
97
        statement(focusedChildKey, isNotNull()),
98
        statement(object, allOf(
99
            isNotNull(),
100
            Transform.$(keyList()).check(contains(focusedChildKey)))));
101
    JsonObject ret = new JsonObject();
102
    object
103
        .keySet()
104 3 1. lambda$parentObject$3 : negated conditional → SURVIVED
2. parentObject : removed call to java/util/Set::forEach → KILLED
3. lambda$parentObject$3 : removed call to com/google/gson/JsonObject::add → KILLED
        .forEach(k -> ret.add(k, Objects.equals(k, focusedChildKey) ?
105
            focusedElement(object.get(k)) :
106
            collapseForObjectValue(object.get(k))));
107 1 1. parentObject : replaced return value with null for com/github/dakusui/json/JsonSummarizer::parentObject → KILLED
    return ret;
108
  }
109
110
  public static JsonArray focusedArray(JsonArray array) {
111
    JsonArray ret = new JsonArray();
112 2 1. lambda$focusedArray$4 : removed call to com/google/gson/JsonArray::add → SURVIVED
2. focusedArray : removed call to com/google/gson/JsonArray::forEach → SURVIVED
    array.forEach(each -> ret.add(collapseForArrayElement(each)));
113 1 1. focusedArray : replaced return value with null for com/github/dakusui/json/JsonSummarizer::focusedArray → KILLED
    return ret;
114
  }
115
116
  public static JsonArray parentArray(int focusedChildIndex, JsonArray array) {
117
    assert All.$(
118
        statement(array, isNotNull()),
119
        statement(focusedChildIndex, greaterThanOrEqualTo(0).and(lessThan(array.size()))));
120
    JsonArray ret = new JsonArray();
121
    JsonElement focusedChild = array.get(focusedChildIndex);
122 3 1. lambda$parentArray$5 : removed call to com/google/gson/JsonArray::add → SURVIVED
2. parentArray : removed call to com/google/gson/JsonArray::forEach → SURVIVED
3. lambda$parentArray$5 : negated conditional → SURVIVED
    array.forEach(i -> ret.add(Objects.equals(i, focusedChild) ?
123
        focusedElement(i) :
124
        collapseForArrayElement(i)));
125 1 1. parentArray : replaced return value with null for com/github/dakusui/json/JsonSummarizer::parentArray → SURVIVED
    return ret;
126
  }
127
128
  public static JsonElement focusedElement(JsonElement element) {
129
    assert that(element, isNotNull());
130
    JsonElement ret;
131 1 1. focusedElement : negated conditional → KILLED
    if (element.isJsonObject()) {
132
      ret = focusedObject((JsonObject) element);
133 1 1. focusedElement : negated conditional → KILLED
    } else if (element.isJsonArray()) {
134
      ret = focusedArray((JsonArray) element);
135
    } else {
136
      ret = element;
137
    }
138 1 1. focusedElement : replaced return value with null for com/github/dakusui/json/JsonSummarizer::focusedElement → KILLED
    return ret;
139
  }
140
141
  static JsonPrimitive compactJsonPrimitive(JsonPrimitive primitive, int headLength, int tailLength) {
142 1 1. compactJsonPrimitive : negated conditional → SURVIVED
    if (primitive.isString()) {
143
      String dots = "...";
144
      String s = primitive.getAsString();
145 4 1. compactJsonPrimitive : changed conditional boundary → SURVIVED
2. compactJsonPrimitive : negated conditional → KILLED
3. compactJsonPrimitive : Replaced integer addition with subtraction → KILLED
4. compactJsonPrimitive : Replaced integer addition with subtraction → KILLED
      if (headLength + dots.length() + tailLength >= s.length())
146 1 1. compactJsonPrimitive : replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonPrimitive → KILLED
        return primitive;
147 2 1. compactJsonPrimitive : Replaced integer subtraction with addition → NO_COVERAGE
2. compactJsonPrimitive : replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonPrimitive → NO_COVERAGE
      return new JsonPrimitive(s.substring(0, headLength) + dots + s.substring(s.length() - tailLength));
148
    }
149 1 1. compactJsonPrimitive : replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonPrimitive → NO_COVERAGE
    return primitive;
150
  }
151
152
  static JsonArray compactJsonArray(JsonArray array, int headLength, int tailLength) {
153 4 1. compactJsonArray : Replaced integer addition with subtraction → NO_COVERAGE
2. compactJsonArray : changed conditional boundary → NO_COVERAGE
3. compactJsonArray : Replaced integer addition with subtraction → NO_COVERAGE
4. compactJsonArray : negated conditional → NO_COVERAGE
    if (headLength + 1 + tailLength >= array.size())
154 1 1. compactJsonArray : replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonArray → NO_COVERAGE
      return array;
155
    JsonArray ret = new JsonArray();
156 2 1. compactJsonArray : negated conditional → NO_COVERAGE
2. compactJsonArray : changed conditional boundary → NO_COVERAGE
    for (int i = 0; i < headLength; i++)
157 1 1. compactJsonArray : removed call to com/google/gson/JsonArray::add → NO_COVERAGE
      ret.add(array.get(i));
158 1 1. compactJsonArray : removed call to com/google/gson/JsonArray::add → NO_COVERAGE
    ret.add("...");
159 3 1. compactJsonArray : Replaced integer subtraction with addition → NO_COVERAGE
2. compactJsonArray : negated conditional → NO_COVERAGE
3. compactJsonArray : changed conditional boundary → NO_COVERAGE
    for (int i = array.size() - tailLength; i < array.size(); i++)
160 1 1. compactJsonArray : removed call to com/google/gson/JsonArray::add → NO_COVERAGE
      ret.add(array.get(i));
161 1 1. compactJsonArray : replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonArray → NO_COVERAGE
    return ret;
162
  }
163
164
  static JsonObject compactJsonObject(JsonObject object, int headLength, int tailLength) {
165 4 1. compactJsonObject : changed conditional boundary → SURVIVED
2. compactJsonObject : Replaced integer addition with subtraction → SURVIVED
3. compactJsonObject : Replaced integer addition with subtraction → KILLED
4. compactJsonObject : negated conditional → KILLED
    if (headLength + 1 + tailLength >= object.size())
166 1 1. compactJsonObject : replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonObject → KILLED
      return object;
167
    JsonObject ret = new JsonObject();
168
    List<String> keys = object.keySet().stream().sorted().toList();
169 2 1. compactJsonObject : negated conditional → NO_COVERAGE
2. compactJsonObject : changed conditional boundary → NO_COVERAGE
    for (int i = 0; i < headLength; i++)
170 1 1. compactJsonObject : removed call to com/google/gson/JsonObject::add → NO_COVERAGE
      ret.add(keys.get(i), object.get(keys.get(i)));
171 1 1. compactJsonObject : removed call to com/google/gson/JsonObject::add → NO_COVERAGE
    ret.add(keys.get(headLength) + "...", new JsonPrimitive("..."));
172 3 1. compactJsonObject : negated conditional → NO_COVERAGE
2. compactJsonObject : changed conditional boundary → NO_COVERAGE
3. compactJsonObject : Replaced integer subtraction with addition → NO_COVERAGE
    for (int i = keys.size() - tailLength; i < keys.size(); i++)
173 1 1. compactJsonObject : removed call to com/google/gson/JsonObject::add → NO_COVERAGE
      ret.add(keys.get(i), object.get(keys.get(i)));
174 1 1. compactJsonObject : replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonObject → NO_COVERAGE
    return ret;
175
  }
176
177
  static JsonElement compactJsonElement(JsonElement element, int headLength, int tailLength) {
178 1 1. compactJsonElement : negated conditional → KILLED
    if (element.isJsonArray())
179 1 1. compactJsonElement : replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonElement → NO_COVERAGE
      return compactJsonArray((JsonArray) element, headLength, tailLength);
180 1 1. compactJsonElement : negated conditional → KILLED
    if (element.isJsonObject())
181 1 1. compactJsonElement : replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonElement → KILLED
      return compactJsonObject((JsonObject) element, headLength, tailLength);
182 1 1. compactJsonElement : negated conditional → SURVIVED
    if (element.isJsonPrimitive())
183 1 1. compactJsonElement : replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonElement → KILLED
      return compactJsonPrimitive((JsonPrimitive) element, headLength, tailLength);
184 1 1. compactJsonElement : replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonElement → NO_COVERAGE
    return element;
185
  }
186
}

Mutations

23

1.1
Location : summaryObject
Killed by : none
negated conditional → SURVIVED

24

1.1
Location : summaryObject
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenSummaryObject_thenItLooksNice(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
negated conditional → KILLED

2.2
Location : summaryObject
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenCreateSummaryJsonObjectFromPaths_thenSummaryCreated(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
Replaced integer subtraction with addition → KILLED

3.3
Location : summaryObject
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenSummaryObject_thenItLooksNice(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
changed conditional boundary → KILLED

26

1.1
Location : summaryObject
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenCreateSummaryJsonObjectFromPaths_thenSummaryCreated(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
negated conditional → KILLED

28

1.1
Location : summaryObject
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenSummaryObject_thenItLooksNice(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
removed call to com/google/gson/JsonObject::add → KILLED

29

1.1
Location : summaryObject
Killed by : com.github.dakusui.symfonion.tests.InvalidDataErrorTest.illegalNoteLength_01(com.github.dakusui.symfonion.tests.InvalidDataErrorTest)
negated conditional → KILLED

31

1.1
Location : summaryObject
Killed by : none
removed call to com/google/gson/JsonArray::add → SURVIVED

36

1.1
Location : summaryObject
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenCreateSummaryJsonObjectFromPaths_thenSummaryCreated(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
replaced return value with null for com/github/dakusui/json/JsonSummarizer::summaryObject → KILLED

41

1.1
Location : collapseForObjectValue
Killed by : com.github.dakusui.symfonion.tests.ReferenceErrorTest.missingNoteMap(com.github.dakusui.symfonion.tests.ReferenceErrorTest)
negated conditional → KILLED

2.2
Location : collapseForObjectValue
Killed by : com.github.dakusui.symfonion.tests.ReferenceErrorTest.missingNoteMap(com.github.dakusui.symfonion.tests.ReferenceErrorTest)
replaced return value with null for com/github/dakusui/json/JsonSummarizer::collapseForObjectValue → KILLED

42

1.1
Location : collapseForObjectValue
Killed by : none
replaced return value with null for com/github/dakusui/json/JsonSummarizer::collapseForObjectValue → SURVIVED

46

1.1
Location : collapseJsonElement
Killed by : com.github.dakusui.symfonion.tests.json.JsonUtilsTest.givenConflictingTwoSingleEntryObjects_whenMerge_thenExceptionThrown(com.github.dakusui.symfonion.tests.json.JsonUtilsTest)
negated conditional → KILLED

48

1.1
Location : collapseJsonElement
Killed by : com.github.dakusui.symfonion.tests.InvalidJsonErrorTest.missingSection_pattern(com.github.dakusui.symfonion.tests.InvalidJsonErrorTest)
negated conditional → KILLED

49

1.1
Location : collapseJsonElement
Killed by : com.github.dakusui.symfonion.tests.InvalidJsonErrorTest.missingSection_pattern(com.github.dakusui.symfonion.tests.InvalidJsonErrorTest)
removed call to com/google/gson/JsonArray::add → KILLED

50

1.1
Location : collapseJsonElement
Killed by : com.github.dakusui.symfonion.tests.InvalidJsonErrorTest.missingSection_pattern(com.github.dakusui.symfonion.tests.InvalidJsonErrorTest)
replaced return value with null for com/github/dakusui/json/JsonSummarizer::collapseJsonElement → KILLED

51

1.1
Location : collapseJsonElement
Killed by : com.github.dakusui.symfonion.tests.json.JsonUtilsTest.givenConflictingTwoSingleEntryObjects_whenMerge_thenExceptionThrown(com.github.dakusui.symfonion.tests.json.JsonUtilsTest)
negated conditional → KILLED

53

1.1
Location : collapseJsonElement
Killed by : com.github.dakusui.symfonion.tests.InvalidJsonErrorTest.missingSection_pattern(com.github.dakusui.symfonion.tests.InvalidJsonErrorTest)
negated conditional → KILLED

54

1.1
Location : collapseJsonElement
Killed by : com.github.dakusui.symfonion.tests.InvalidJsonErrorTest.missingSection_pattern(com.github.dakusui.symfonion.tests.InvalidJsonErrorTest)
removed call to com/google/gson/JsonObject::add → KILLED

55

1.1
Location : collapseJsonElement
Killed by : com.github.dakusui.symfonion.tests.ReferenceErrorTest.missingNoteMap(com.github.dakusui.symfonion.tests.ReferenceErrorTest)
replaced return value with null for com/github/dakusui/json/JsonSummarizer::collapseJsonElement → KILLED

62

1.1
Location : collapseForArrayElement
Killed by : none
replaced return value with null for com/github/dakusui/json/JsonSummarizer::collapseForArrayElement → SURVIVED

2.2
Location : collapseForArrayElement
Killed by : none
negated conditional → SURVIVED

63

1.1
Location : collapseForArrayElement
Killed by : none
replaced return value with null for com/github/dakusui/json/JsonSummarizer::collapseForArrayElement → SURVIVED

76

1.1
Location : lambda$focusedObject$0
Killed by : com.github.dakusui.symfonion.tests.InvalidJsonErrorTest.missingSection_pattern(com.github.dakusui.symfonion.tests.InvalidJsonErrorTest)
removed call to com/google/gson/JsonObject::add → KILLED

2.2
Location : focusedObject
Killed by : com.github.dakusui.symfonion.tests.InvalidJsonErrorTest.missingSection_pattern(com.github.dakusui.symfonion.tests.InvalidJsonErrorTest)
removed call to java/util/Set::forEach → KILLED

77

1.1
Location : focusedObject
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenSummaryObject_thenItLooksNice(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
replaced return value with null for com/github/dakusui/json/JsonSummarizer::focusedObject → KILLED

81

1.1
Location : lambda$parentElement$1
Killed by : none
replaced boolean return with true for com/github/dakusui/json/JsonSummarizer::lambda$parentElement$1 → SURVIVED

2.2
Location : lambda$parentElement$1
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenCreateSummaryJsonObjectFromPaths_thenSummaryCreated(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
replaced boolean return with false for com/github/dakusui/json/JsonSummarizer::lambda$parentElement$1 → KILLED

82

1.1
Location : lambda$parentElement$2
Killed by : none
replaced boolean return with true for com/github/dakusui/json/JsonSummarizer::lambda$parentElement$2 → SURVIVED

2.2
Location : lambda$parentElement$2
Killed by : com.github.dakusui.symfonion.tests.ReferenceErrorTest.missingNote(com.github.dakusui.symfonion.tests.ReferenceErrorTest)
replaced boolean return with false for com/github/dakusui/json/JsonSummarizer::lambda$parentElement$2 → KILLED

88

1.1
Location : parentElement
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenCreateSummaryJsonObjectFromPaths_thenSummaryCreated(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
negated conditional → KILLED

89

1.1
Location : parentElement
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenSummaryObject_thenItLooksNice(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
replaced return value with null for com/github/dakusui/json/JsonSummarizer::parentElement → KILLED

90

1.1
Location : parentElement
Killed by : com.github.dakusui.symfonion.tests.ReferenceErrorTest.missingNote(com.github.dakusui.symfonion.tests.ReferenceErrorTest)
negated conditional → KILLED

91

1.1
Location : parentElement
Killed by : none
replaced return value with null for com/github/dakusui/json/JsonSummarizer::parentElement → SURVIVED

104

1.1
Location : parentObject
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenSummaryObject_thenItLooksNice(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
removed call to java/util/Set::forEach → KILLED

2.2
Location : lambda$parentObject$3
Killed by : none
negated conditional → SURVIVED

3.3
Location : lambda$parentObject$3
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenSummaryObject_thenItLooksNice(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
removed call to com/google/gson/JsonObject::add → KILLED

107

1.1
Location : parentObject
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenSummaryObject_thenItLooksNice(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
replaced return value with null for com/github/dakusui/json/JsonSummarizer::parentObject → KILLED

112

1.1
Location : lambda$focusedArray$4
Killed by : none
removed call to com/google/gson/JsonArray::add → SURVIVED

2.2
Location : focusedArray
Killed by : none
removed call to com/google/gson/JsonArray::forEach → SURVIVED

113

1.1
Location : focusedArray
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenSummaryArray_thenItLooksNice(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
replaced return value with null for com/github/dakusui/json/JsonSummarizer::focusedArray → KILLED

122

1.1
Location : lambda$parentArray$5
Killed by : none
removed call to com/google/gson/JsonArray::add → SURVIVED

2.2
Location : parentArray
Killed by : none
removed call to com/google/gson/JsonArray::forEach → SURVIVED

3.3
Location : lambda$parentArray$5
Killed by : none
negated conditional → SURVIVED

125

1.1
Location : parentArray
Killed by : none
replaced return value with null for com/github/dakusui/json/JsonSummarizer::parentArray → SURVIVED

131

1.1
Location : focusedElement
Killed by : com.github.dakusui.symfonion.tests.json.JsonUtilTest.obj_E01d(com.github.dakusui.symfonion.tests.json.JsonUtilTest)
negated conditional → KILLED

133

1.1
Location : focusedElement
Killed by : com.github.dakusui.symfonion.tests.InvalidDataErrorTest.illegalNoteLength_01(com.github.dakusui.symfonion.tests.InvalidDataErrorTest)
negated conditional → KILLED

138

1.1
Location : focusedElement
Killed by : com.github.dakusui.symfonion.tests.json.JsonSummarizerTest.whenSummaryObject_thenItLooksNice(com.github.dakusui.symfonion.tests.json.JsonSummarizerTest)
replaced return value with null for com/github/dakusui/json/JsonSummarizer::focusedElement → KILLED

142

1.1
Location : compactJsonPrimitive
Killed by : none
negated conditional → SURVIVED

145

1.1
Location : compactJsonPrimitive
Killed by : com.github.dakusui.symfonion.tests.InvalidDataErrorTest.illegalNoteLength_01(com.github.dakusui.symfonion.tests.InvalidDataErrorTest)
negated conditional → KILLED

2.2
Location : compactJsonPrimitive
Killed by : com.github.dakusui.symfonion.tests.InvalidDataErrorTest.illegalFraction(com.github.dakusui.symfonion.tests.InvalidDataErrorTest)
Replaced integer addition with subtraction → KILLED

3.3
Location : compactJsonPrimitive
Killed by : none
changed conditional boundary → SURVIVED

4.4
Location : compactJsonPrimitive
Killed by : com.github.dakusui.symfonion.tests.InvalidDataErrorTest.illegalFraction(com.github.dakusui.symfonion.tests.InvalidDataErrorTest)
Replaced integer addition with subtraction → KILLED

146

1.1
Location : compactJsonPrimitive
Killed by : com.github.dakusui.symfonion.tests.InvalidDataErrorTest.illegalNoteLength_01(com.github.dakusui.symfonion.tests.InvalidDataErrorTest)
replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonPrimitive → KILLED

147

1.1
Location : compactJsonPrimitive
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

2.2
Location : compactJsonPrimitive
Killed by : none
replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonPrimitive → NO_COVERAGE

149

1.1
Location : compactJsonPrimitive
Killed by : none
replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonPrimitive → NO_COVERAGE

153

1.1
Location : compactJsonArray
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

2.2
Location : compactJsonArray
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : compactJsonArray
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

4.4
Location : compactJsonArray
Killed by : none
negated conditional → NO_COVERAGE

154

1.1
Location : compactJsonArray
Killed by : none
replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonArray → NO_COVERAGE

156

1.1
Location : compactJsonArray
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : compactJsonArray
Killed by : none
changed conditional boundary → NO_COVERAGE

157

1.1
Location : compactJsonArray
Killed by : none
removed call to com/google/gson/JsonArray::add → NO_COVERAGE

158

1.1
Location : compactJsonArray
Killed by : none
removed call to com/google/gson/JsonArray::add → NO_COVERAGE

159

1.1
Location : compactJsonArray
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

2.2
Location : compactJsonArray
Killed by : none
negated conditional → NO_COVERAGE

3.3
Location : compactJsonArray
Killed by : none
changed conditional boundary → NO_COVERAGE

160

1.1
Location : compactJsonArray
Killed by : none
removed call to com/google/gson/JsonArray::add → NO_COVERAGE

161

1.1
Location : compactJsonArray
Killed by : none
replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonArray → NO_COVERAGE

165

1.1
Location : compactJsonObject
Killed by : com.github.dakusui.symfonion.tests.InvalidJsonErrorTest.missingSection_pattern(com.github.dakusui.symfonion.tests.InvalidJsonErrorTest)
Replaced integer addition with subtraction → KILLED

2.2
Location : compactJsonObject
Killed by : none
changed conditional boundary → SURVIVED

3.3
Location : compactJsonObject
Killed by : none
Replaced integer addition with subtraction → SURVIVED

4.4
Location : compactJsonObject
Killed by : com.github.dakusui.symfonion.tests.InvalidJsonErrorTest.invalid_01(com.github.dakusui.symfonion.tests.InvalidJsonErrorTest)
negated conditional → KILLED

166

1.1
Location : compactJsonObject
Killed by : com.github.dakusui.symfonion.tests.InvalidJsonErrorTest.invalid_01(com.github.dakusui.symfonion.tests.InvalidJsonErrorTest)
replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonObject → KILLED

169

1.1
Location : compactJsonObject
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : compactJsonObject
Killed by : none
changed conditional boundary → NO_COVERAGE

170

1.1
Location : compactJsonObject
Killed by : none
removed call to com/google/gson/JsonObject::add → NO_COVERAGE

171

1.1
Location : compactJsonObject
Killed by : none
removed call to com/google/gson/JsonObject::add → NO_COVERAGE

172

1.1
Location : compactJsonObject
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : compactJsonObject
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : compactJsonObject
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

173

1.1
Location : compactJsonObject
Killed by : none
removed call to com/google/gson/JsonObject::add → NO_COVERAGE

174

1.1
Location : compactJsonObject
Killed by : none
replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonObject → NO_COVERAGE

178

1.1
Location : compactJsonElement
Killed by : com.github.dakusui.symfonion.tests.InvalidJsonErrorTest.invalid_01(com.github.dakusui.symfonion.tests.InvalidJsonErrorTest)
negated conditional → KILLED

179

1.1
Location : compactJsonElement
Killed by : none
replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonElement → NO_COVERAGE

180

1.1
Location : compactJsonElement
Killed by : com.github.dakusui.symfonion.tests.InvalidDataErrorTest.illegalNoteLength_01(com.github.dakusui.symfonion.tests.InvalidDataErrorTest)
negated conditional → KILLED

181

1.1
Location : compactJsonElement
Killed by : com.github.dakusui.symfonion.tests.InvalidJsonErrorTest.invalid_01(com.github.dakusui.symfonion.tests.InvalidJsonErrorTest)
replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonElement → KILLED

182

1.1
Location : compactJsonElement
Killed by : none
negated conditional → SURVIVED

183

1.1
Location : compactJsonElement
Killed by : com.github.dakusui.symfonion.tests.InvalidDataErrorTest.illegalNoteLength_01(com.github.dakusui.symfonion.tests.InvalidDataErrorTest)
replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonElement → KILLED

184

1.1
Location : compactJsonElement
Killed by : none
replaced return value with null for com/github/dakusui/json/JsonSummarizer::compactJsonElement → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.15.3