You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// If you should interpret the input data as VariationDiffs, always expect a root to be present. Parse all nodes (v) to a list of nodes. Search for the root. Assert that there is exactly one root.
140
-
DiffNode<DiffLinesLabel> root = null;
141
-
for (finalDiffNode<DiffLinesLabel> v : diffNodeList) {
142
-
if (v.isRoot()) {
143
-
// v is root candidate
144
-
if (root != null) {
145
-
thrownewRuntimeException("Not a VariationDiff: Got more than one root! Got \"" + root + "\" and \"" + v + "\"!");
146
-
}
147
-
if (v.getNodeType() == NodeType.IF) {
148
-
root = v;
149
-
} else {
150
-
thrownewRuntimeException("Not a VariationDiff but a DiffGraph: The node \"" + v + "\" is not labeled as IF but has no parents!");
// If you should interpret the input data as VariationDiffs, always expect a root to be present. Parse all nodes (v) to a list of nodes. Search for the root. Assert that there is exactly one root.
141
+
DiffNode<DiffLinesLabel> root = null;
142
+
for (finalDiffNode<DiffLinesLabel> v : diffNodeList) {
143
+
if (v.isRoot()) {
144
+
// v is root candidate
145
+
if (root != null) {
146
+
thrownewRuntimeException("Not a VariationDiff: Got more than one root! Got \"" + root + "\" and \"" + v + "\"!");
147
+
}
148
+
if (v.getNodeType() == NodeType.IF) {
149
+
root = v;
150
+
} else {
151
+
thrownewRuntimeException("Not a VariationDiff but a DiffGraph: The node \"" + v + "\" is not labeled as IF but has no parents!");
152
+
}
151
153
}
152
154
}
153
-
}
154
155
155
-
if (root == null) {
156
-
thrownewRuntimeException("Not a VariationDiff but a DiffGraph: No root found!");
157
-
}
156
+
if (root == null) {
157
+
thrownewRuntimeException("Not a VariationDiff but a DiffGraph: No root found!");
0 commit comments