Source:
<code>@Test public void testInduceGroupingType() { ImmutableBitSet groupSet = ImmutableBitSet.of(1, 2, 4, 5); List<ImmutableBitSet> groupSets = Lists.newArrayList(); groupSets.add(groupSet); assertEquals(Aggregate.Group.SIMPLE, Aggregate.Group.induce(groupSet, groupSets)); groupSets = Lists.newArrayList(groupSet.powerSet()); assertEquals(Aggregate.Group.CUBE, Aggregate.Group.induce(groupSet, groupSets)); groupSets = Lists.newArrayList(); groupSets.add(ImmutableBitSet.of(1, 2, 4, 5)); groupSets.add(ImmutableBitSet.of(1, 2, 4)); <START> groupSets.add(ImmutableBitSet.of(1, 2)); <END> groupSets.add(ImmutableBitSet.of(1)); groupSets.add(ImmutableBitSet.of()); assertEquals(Aggregate.Group.ROLLUP, Aggregate.Group.induce(groupSet, groupSets)); groupSets = Lists.newArrayList(); groupSets.add(ImmutableBitSet.of(1, 2, 4, 5)); groupSets.add(ImmutableBitSet.of(1, 2, 4)); groupSets.add(ImmutableBitSet.of(1, 2)); groupSets.add(ImmutableBitSet.of()); assertEquals(Aggregate.Group.OTHER, Aggregate.Group.induce(groupSet, groupSets)); groupSets = Lists.newArrayList(); groupSets.add(ImmutableBitSet.of(1, 2, 4, 5)); groupSets.add(ImmutableBitSet.of(1, 2, 4)); groupSets.add(ImmutableBitSet.of(1, 2)); groupSets.add(ImmutableBitSet.of(1)); assertEquals(Aggregate.Group.OTHER, Aggregate.Group.induce(groupSet, groupSets)); groupSets = Lists.newArrayList(); groupSets.add(ImmutableBitSet.of(1, 2, 5)); groupSets.add(ImmutableBitSet.of(1, 2, 4)); groupSets.add(ImmutableBitSet.of(1, 2)); groupSets.add(ImmutableBitSet.of(1)); groupSets.add(ImmutableBitSet.of()); assertEquals(Aggregate.Group.OTHER, Aggregate.Group.induce(groupSet, groupSets)); }</code><technical_language>a missing line (1, 2, 3) test fails code produces wrong result</technical_language>

Target:
@Test public void testInduceGroupingType() { ImmutableBitSet groupSet = ImmutableBitSet.of(1, 2, 4, 5); List<ImmutableBitSet> groupSets = Lists.newArrayList(); groupSets.add(groupSet); assertEquals(Aggregate.Group.SIMPLE, Aggregate.Group.induce(groupSet, groupSets)); groupSets = Lists.newArrayList(groupSet.powerSet()); assertEquals(Aggregate.Group.CUBE, Aggregate.Group.induce(groupSet, groupSets)); groupSets = Lists.newArrayList(); groupSets.add(ImmutableBitSet.of(1, 2, 4, 5)); groupSets.add(ImmutableBitSet.of(1, 2, 4)); groupSets.add(ImmutableBitSet.of(1, 2)); groupSets.add(ImmutableBitSet.of(1)); groupSets.add(ImmutableBitSet.of()); assertEquals(Aggregate.Group.ROLLUP, Aggregate.Group.induce(groupSet, groupSets)); groupSets = Lists.newArrayList(); groupSets.add(ImmutableBitSet.of(1, 2, 4, 5)); groupSets.add(ImmutableBitSet.of(1, 2, 4)); groupSets.add(ImmutableBitSet.of(1, 2)); groupSets.add(ImmutableBitSet.of()); assertEquals(Aggregate.Group.OTHER, Aggregate.Group.induce(groupSet, groupSets)); groupSets = Lists.newArrayList(); groupSets.add(ImmutableBitSet.of(1, 2, 4, 5)); groupSets.add(ImmutableBitSet.of(1, 2, 4)); groupSets.add(ImmutableBitSet.of(1, 2)); groupSets.add(ImmutableBitSet.of(1)); assertEquals(Aggregate.Group.OTHER, Aggregate.Group.induce(groupSet, groupSets)); groupSets = Lists.newArrayList(); groupSets.add(ImmutableBitSet.of(1, 2, 5)); groupSets.add(ImmutableBitSet.of(1, 2, 4)); groupSets.add(ImmutableBitSet.of(1, 2)); groupSets.add(ImmutableBitSet.of(1)); groupSets.add(ImmutableBitSet.of()); assertEquals(Aggregate.Group.OTHER, Aggregate.Group.induce(groupSet, groupSets)); groupSets = Lists.newArrayList(); assertEquals(Aggregate.Group.OTHER, Aggregate.Group.induce(groupSet, groupSets)); groupSets = Lists.newArrayList(); groupSets.add(ImmutableBitSet.of()); assertEquals(Aggregate.Group.OTHER, Aggregate.Group.induce(groupSet, groupSets)); }