Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
23,200
void () { // Breakpoint! final List<Integer> res = Stream.of(1, 2, 3).map(x -> { if (x % 2 == 1) { return x; } throw new RuntimeException(); }).collect(Collectors.toList()); }
check
23,201
void (String[] args) { // Breakpoint! final long res = Stream.of(1, 4).flatMap(x -> Stream.of(x + 1, x + 2)).count(); }
main
23,202
void (String[] args) { // Breakpoint! final long count = Stream.of(1, 2, 3, 4).filter(x -> x % 2 == 1).count(); }
main
23,203
void (String[] args) { // Breakpoint! final OptionalDouble res = DoubleStream.of(1., 2., 10.).min(); }
main
23,204
void (String[] args) { // Breakpoint! final long res = LongStream.of(1, 1, 1).distinct().count(); }
main
23,205
void (String[] args) { // Breakpoint! final boolean res = IntStream.iterate(0, x -> x + 1).limit(5).anyMatch(x -> x < 0); }
main
23,206
void (String[] args) { // Breakpoint! final double[] result = Stream.of(1, 5, 9).flatMapToDouble(x -> DoubleStream.of(x + 1, x + 2, x + 3)).toArray(); }
main
23,207
void (String[] args) { // Breakpoint! final long res = Stream.of(new Integer(1), new Integer(2), new Integer(1)).distinct().count(); }
main
23,208
void (String[] args) { // Breakpoint! Stream.of(3).noneMatch(x -> { System.out.println("called"); return false; }); }
main
23,209
void (String[] args) { // Breakpoint! final Optional<Integer> res = Stream.of(1).skip(1).max(Comparator.comparingInt(x -> -x)); }
main
23,210
void (String[] args) { // Breakpoint! Stream.of(3, 2, 1).sorted().findFirst(); }
main
23,211
void (String[] args) { // Breakpoint! final Optional<Integer> res = Stream.of(1, 2, 3).findFirst(); }
main
23,212
void (String[] args) { // Breakpoint! StreamEx.of(1, 2, 3).parallel((ForkJoinPool) Executors.newWorkStealingPool()).forEach(x -> {}); }
main
23,213
void (String[] args) { // Breakpoint! final long count = StreamEx.of(1, 2, 3, 4).chain(x -> dividable(x, 3)).count(); System.out.println(count); }
main
23,214
StreamEx<Integer> (StreamEx<Integer> stream, int num) { return stream.filter(x -> x % num == 0); }
dividable
23,215
void (String[] args) { // Breakpoint! EntryStream.of(1, 1, 2, 4, 3, 9).prefixKeys((l, r) -> l + r).forEach(x -> {}); }
main
23,216
void (String[] args) { // Breakpoint! final long count = StreamEx.of(1, 2, 3, 4).headTail((head, tail) -> tail, () -> StreamEx.of(0)).count(); System.out.println(count); }
main
23,217
void (String[] args) { // Breakpoint! StreamEx.of(1, 2, 3, 4, 5).zipWith(Stream.of(1, 3, 9)).forEach(x -> {}); }
main
23,218
void (String[] args) { // Breakpoint! StreamEx.of(1, 2, 3).zipWith(Stream.of(1, 3, 9)).forEach(x -> {}); }
main
23,219
void (String[] args) { // Breakpoint! StreamEx.of(1, 2, 3, 4, 5, 7).prefix((l, r) -> l + r).forEach(System.out::println); }
main
23,220
void (String[] args) { // Breakpoint! StreamEx.of(1, 2, 3).zipWith(Stream.of(1, 3, 9, 16, 25)).forEach(x -> {}); }
main
23,221
void (String[] args) { // Breakpoint! EntryStream.of(1, 1, 2, 4, 3, 9).prefixValues((l, r) -> l + r).forEach(x -> {}); }
main
23,222
void (String[] args) { // Breakpoint! final long count = StreamEx.of(1, 2, 3).cross(1, 2, 3).count(); System.out.println(count); }
main
23,223
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, 3, 9) .flatMapToValue((k, v) -> StreamEx.of(k, k + 1)) .count(); System.out.println(count); }
main
23,224
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, 3, 9).flatMapKeys(k -> StreamEx.of(k, k + 1)).count(); System.out.println(count); }
main
23,225
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, 3, 9) .flatMapKeyValue((k, v) -> StreamEx.of(k, k + 1)) .count(); System.out.println(count); }
main
23,226
void (String[] args) { // Breakpoint! final long count = StreamEx.of(1, 2, 3) .flatCollection(x -> Arrays.asList(new Integer[]{x + 1, x + 2, x + 3})) .count(); System.out.println(count); }
main
23,227
void (String[] args) { // Breakpoint! final int sum = DoubleStreamEx.of(1, 2, 3).flatMapToInt(x -> IntStream.of(1, 3)).sum(); System.out.println(sum); }
main
23,228
void (String[] args) { // Breakpoint! final long count = LongStreamEx.of(1, 2, 3).flatMapToObj(x -> StreamEx.of(x, x + 1)).count(); System.out.println(count); }
main
23,229
void (String[] args) { // Breakpoint! final long count = IntStreamEx.of(1, 2, 3).flatMapToDouble(x -> DoubleStreamEx.of(x, x, x)).count(); System.out.println(count); }
main
23,230
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, 3, 9).flatMapToKey((k, v) -> Stream.of(k, k + 1)).count(); System.out.println(count); }
main
23,231
void (String[] args) { // Breakpoint! final long count = StreamEx.of(1, 2, 3).flatArray(x -> new Integer[]{x + 1, x + 2, x + 3}).count(); System.out.println(count); }
main
23,232
void (String[] args) { // Breakpoint! final long sum = DoubleStreamEx.of(1, 2, 3).flatMapToLong(x -> LongStreamEx.of((long) x, (long) (x + 1))).sum(); System.out.println(sum); }
main
23,233
void (String[] args) { // Breakpoint! final long count = StreamEx.of(1, 2, 3).flatMapToEntry(FlatMapToEntry::toMap).count(); System.out.println(count); }
main
23,234
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, 3, 9).flatMapValues(v -> StreamEx.of(v, v + 1)).count(); System.out.println(count); }
main
23,235
void (String[] args) { // Breakpoint! EntryStream.of(1, 1, 2, 4, 3, 9) .mapToValue((k, v) -> k + v) .forEach(x -> {}); }
main
23,236
void (String[] args) { // Breakpoint! final int sum = IntStreamEx.of(1, 3, 4).pairMap((l, r) -> l + r).sum(); System.out.println(sum); }
main
23,237
void (String[] args) { // Breakpoint! final int max = EntryStream.of(1, 1, 2, 4, 3, 9) .mapKeyValue((k, v) -> k + v) .max(Integer::compareTo) .get(); System.out.println(max); }
main
23,238
void (String[] args) { // Breakpoint! StreamEx.of(10., 2., 3.).withFirst((first, other) -> first * other).forEach(x -> {}); }
main
23,239
void (String[] args) { // Breakpoint! EntryStream.of(1, 1, 2, 4, 3, 9).invert().forEach(x -> {}); }
main
23,240
void (String[] args) { // Breakpoint! final int sum = IntStreamEx.of(1, 2, 3).mapLast(x -> 30).sum(); System.out.println(sum); }
main
23,241
void (String[] args) { // Breakpoint! EntryStream.of(1, 1, 2, 4, 3, 9).keys().forEach(x -> {}); }
main
23,242
void (String[] args) { // Breakpoint! EntryStream.of(1, 1, 2, 4, 3, 9).join(" -> ").forEach(System.out::println); }
main
23,243
void (String[] args) { // Breakpoint! final int sum = IntStreamEx.of(1, 2, 3).mapFirst(x -> 10).sum(); System.out.println(sum); }
main
23,244
void (String[] args) { // Breakpoint! Object[] result = StreamEx.of(1, 2, 3).mapToEntry(x -> x * x).toArray(); System.out.println(result.length); }
main
23,245
void (String[] args) { // Breakpoint! final int max = StreamEx.of(1, 2, 3).mapFirstOrElse(x -> 10, x -> 20).max(Integer::compareTo).get(); System.out.println(max); }
main
23,246
void (String[] args) { // Breakpoint! EntryStream.of(1, 1, 2, 4, 3, 9).mapKeys(x -> x - 1).forEach(x -> {}); }
main
23,247
void (String[] args) { // Breakpoint! EntryStream.of(1, 1, 2, 4, 3, 9) .mapValues(x -> 0) .forEach(x -> {}); }
main
23,248
void (String[] args) { final int[] array = new int[]{20, 30, 40, 50}; // Breakpoint! final int sum = IntStreamEx.of(1, 3).elements(array).sum(); System.out.println(sum); }
main
23,249
void (String[] args) { // Breakpoint! final Optional<Integer> min = StreamEx.of(1, 2, 3).mapLastOrElse(x -> 30, x -> x - 1).min(Integer::compareTo); System.out.println(min.get().intValue()); }
main
23,250
void (String[] args) { // Breakpoint! EntryStream.of(1, 1, 2, 4, 3, 9) .mapToKey((k, v) -> k + v) .forEach(x -> {}); }
main
23,251
void (String[] args) { // Breakpoint! final long sum = EntryStream.of(1, 1, 2, 4, 3, 9) .values() .mapToInt(Integer::intValue) .sum(); System.out.println(sum); }
main
23,252
void (String[] args) { // Breakpoint! StreamEx.empty().append(1).forEach(x -> {}); }
main
23,253
void (String[] args) { // Breakpoint! StreamEx.of(1, 2).prepend(3).forEach(x -> {}); }
main
23,254
void (String[] args) { // Breakpoint! StreamEx.of(1, 2).append().forEach(x -> {}); }
main
23,255
void (String[] args) { // Breakpoint! StreamEx.of(1, 2).append(3).forEach(x -> {}); }
main
23,256
void (String[] args) { // Breakpoint! StreamEx.of(1, 2).prepend().forEach(x -> {}); }
main
23,257
void (String[] args) { // Breakpoint! StreamEx.of(1, 2).append(Stream.of(3, 4, 5)).forEach(x -> {}); }
main
23,258
void (String[] args) { // Breakpoint! StreamEx.of(1, 2).prepend(Stream.of(3, 4, 5)).forEach(x -> {}); }
main
23,259
void (String[] args) { // Breakpoint! StreamEx.empty().prepend(1).forEach(x -> {}); }
main
23,260
void (String[] args) { // Breakpoint! StreamEx.of(2, 1).sortedByInt(Integer::intValue).forEach(System.out::println); }
main
23,261
void (String[] args) { // Breakpoint! StreamEx.of(1, 2, 10).sortedByLong(x -> 10 - x).forEach(System.out::println); }
main
23,262
void (String[] args) { // Breakpoint! StreamEx.of(1,2,3).reverseSorted().forEach(System.out::println); }
main
23,263
void (String[] args) { // Breakpoint! StreamEx.of(10, 1, 2).sortedByDouble(Integer::doubleValue).forEach(System.out::println); }
main
23,264
void (String[] args) { // Breakpoint! StreamEx.of(1, 2, 10).sortedBy(Object::toString).forEach(System.out::println); }
main
23,265
void (String[] args) { // Breakpoint! final long count = StreamEx.of(1, 2, 3) .peekFirst(System.out::print) .peekLast(System.out::print) .mapToEntry(x -> x * x) .peekKeys(System.out::print) .peekValues(System.out::print) .peekKeyValue((k, v) -> System.out.println("(" + k + " -> " + v + ")")) .count(); System.out.println(count); }
main
23,266
void (String[] args) { // Breakpoint! StreamEx.of(1, 2, 3, 4).removeBy(x -> x * x, 16).forEach(System.out::print); }
main
23,267
void (String[] args) { // Breakpoint! final OptionalDouble result = DoubleStreamEx.of(1., 2., 3., 4.).less(2).max(); System.out.println(result.orElse(-1.)); }
main
23,268
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, null, 3, null).nonNullValues().count(); System.out.println(count); }
main
23,269
void (String[] args) { // Breakpoint! final long count = IntStreamEx.of(1, 2, 3).takeWhile(x -> x % 2 != 0).count(); System.out.println(count); }
main
23,270
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, 3, 9).filterValues(x -> x < 5).count(); System.out.println(count); }
main
23,271
void (String[] args) { final Integer[] array = new Integer[]{1, 2, 3, 4, null, null}; // Breakpoint! final long res = StreamEx.of(array).nonNull().count(); System.out.println(res); }
main
23,272
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, 3, 9).removeKeyValue((k, v) -> v < 7).count(); System.out.println(count); }
main
23,273
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4L, 3, new Object()).selectValues(Long.class).count(); System.out.println(count); }
main
23,274
void (String[] args) { // Breakpoint! final long count = IntStreamEx.of(1, 2, 3).without(2, 3).count(); System.out.println(count); }
main
23,275
void (String[] args) { // Breakpoint! StreamEx.of(1, 2, 3, 4).remove(x -> x % 3 == 0).forEach(System.out::print); }
main
23,276
void (String[] args) { // Breakpoint! final Object[] result = StreamEx.of(1, 2, 3, 4).filterBy(x -> x * x, 9).toArray(); System.out.println(result[0]); }
main
23,277
void (String[] args) { // Breakpoint! final OptionalLong result = LongStreamEx.of(1, 2, 3, 4).atMost(2).min(); System.out.println(result.orElse(-1)); }
main
23,278
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2L, 4, new Object(), 9).selectKeys(Long.class).count(); System.out.println(count); }
main
23,279
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, 3, 9).removeValues(v-> v < 7).count(); System.out.println(count); }
main
23,280
void (String[] args) { // Breakpoint! final long count = IntStreamEx.of(1, 2, 3).takeWhileInclusive(x -> x % 2 != 0).count(); System.out.println(count); }
main
23,281
void (String[] args) { // Breakpoint! final int result = IntStreamEx.of(1, 2, 3, 4).atLeast(3).sum(); System.out.println(result); }
main
23,282
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, null, 9).nonNullKeys().count(); System.out.println(count); }
main
23,283
void (String[] args) { Object[] objects = new Object[]{new Object(), 1, 2, 3L, 4.}; // Breakpoint! final long res = StreamEx.of(objects).select(Long.class).count(); System.out.println(res); }
main
23,284
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, 3, 9).filterKeyValue((k, v) -> k * v < 10).count(); System.out.println(count); }
main
23,285
void (String[] args) { // Breakpoint! final long count = StreamEx.of(1, 2, 3, 2).dropWhile(x -> x < 3).count(); System.out.println(count); }
main
23,286
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, 3, 9).filterKeys(x -> x < 2).count(); System.out.println(count); }
main
23,287
void (String[] args) { // Breakpoint! final OptionalDouble result = DoubleStreamEx.of(1., 2., 3., 4.).greater(2).min(); System.out.println(result.orElse(-1.)); }
main
23,288
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, 3, 9).removeKeys(x -> x < 3).count(); System.out.println(count); }
main
23,289
void (String[] args) { // Breakpoint! final long count = StreamEx.of(1, 2, 3, 2, 3, 2).distinct(3).count(); System.out.println(count); }
main
23,290
void (String[] args) { final int[] state = new int[]{0}; // Breakpoint! StreamEx.of(3, 2, 1, 1, 1, 1).distinct(x -> x + state[0]++).count(); }
main
23,291
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, 3, 9, 0, 9).distinctValues().count(); System.out.println(count); }
main
23,292
int (int x) { return x % 3; }
hash
23,293
void (String[] args) { // Breakpoint! final long count = StreamEx.of(1, 2, 3, 4, 5, 6, 7).distinct(DistinctWithKeyExtractor::hash).count(); System.out.println(count); }
main
23,294
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, 3, 9, 3, 8).distinctKeys().count(); System.out.println(count); }
main
23,295
void (String[] args) { // Breakpoint! final long count = StreamEx.of(1, 2, 2, 3, 2, 2, 4).runLengths().count(); System.out.println(count); }
main
23,296
void (String[] args) { // Breakpoint! final long count = StreamEx.of(1, 2, 2, 3, 5, 7).groupRuns((l, r) -> l % 2 == r % 2).count(); System.out.println(count); }
main
23,297
void (String[] args) { // Breakpoint! StreamEx.of(1, 3, 5, 4, 2, 3).collapse((x, y) -> x % 2 == y % 2, (x, y) -> x + y).forEach(System.out::println); }
main
23,298
void (String[] args) { // Breakpoint! final long count = EntryStream.of(1, 1, 2, 4, 3, 9).collapseKeys(Collectors.toList()).count(); System.out.println(count); }
main
23,299
void (String[] args) { // Breakpoint! StreamEx.of(1, 2, 4, 6, 7, 9, 10).intervalMap((l, r) -> l % 2 == r % 2, (l, r) -> l + r).forEach(System.out::println); }
main