list.add(ImmutableSet.copyOf(current));
Set<Flag> newSet = new LinkedHashSet<>();
current.forEach(flag -> Arrays.stream(flag.getParents()).forEach(newSet::add));
current = newSet;
}
<BUG>hiearchy = ImmutableList.copyOf(list);
</BUG>
}
<BUG>return hiearchy;
</BUG>
}

list.add(ImmutableSet.copyOf(current));
Set<Flag> newSet = new LinkedHashSet<>();
current.forEach(flag -> Arrays.stream(flag.getParents()).forEach(newSet::add));
current = newSet;
}
hierarchy = ImmutableList.copyOf(list);
}
return hierarchy;
}
