Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
55,400
void () { String foo = ""; setFoo(foo); }
s3
55,401
Object () { return o; }
getValue
55,402
void (String s) { takesString(s); o = s; }
setValue
55,403
void (String s) {}
takesString
55,404
boolean () { return true; }
isSomething1
55,405
void (boolean b) { }
setSomething1
55,406
boolean () { return false; }
isSomething4
55,407
void (boolean value) { }
setSomething5
55,408
void (boolean value) { }
setSomething6
55,409
boolean () { return true; }
isSomething1
55,410
void (boolean b) { }
setSomething1
55,411
boolean () { return false; }
isSomething4
55,412
void (boolean value) { }
setSomething5
55,413
void (boolean value) { }
setSomething6
55,414
int () { return myX; }
getX
55,415
void (AAA other) { System.out.println(myX); System.out.println(other.myX); myX = 10; }
foo
55,416
String () { System.out.println("getter invoked"); return myX; }
getX
55,417
void (String x) { this.myX = x; }
setX
55,418
int () { return x; }
getX
55,419
Object () { return s; }
getValue
55,420
String () { return x; }
getX
55,421
void (String x) { System.out.println("setter invoked"); this.x = x; }
setX
55,422
int () { return field; }
getDefault
55,423
int () { return myX; }
getX
55,424
void (AAA other) { System.out.println(myX); System.out.println(other.myX); myX = 10; }
foo
55,425
int () { return 0; }
getSomething
55,426
void (String value) { System.out.println("set"); }
setSomething
55,427
void (I i) { System.out.println(i.getSomething()); i.setSomething("new"); }
test
55,428
int () { return x; }
getX
55,429
void (int x) { this.x = x; }
setY
55,430
Integer () { return someInt; }
getState
55,431
void (Integer state) { someInt = state; if (state == 1) System.out.println("1"); }
setState
55,432
String () { System.out.println("getter invoked"); return x; }
getX
55,433
void (String x) { this.x = x; }
setX
55,434
String () { if (true) { value = "new"; } return value; }
getValue
55,435
int () { return x; }
getX
55,436
void (int field) { this.x += field; }
setX
55,437
int () { return x; }
getX
55,438
void () { x = 10; }
foo
55,439
String () { return "Name"; }
getName
55,440
void (int thing) { }
setThing
55,441
int () { return 42; }
isThing
55,442
void (String[] args) { setThing(42); System.out.println(isThing()); }
main
55,443
void () { int i = 0; if (i > 10); System.out.println("Done"); }
aVoid
55,444
void (String[] args) { String s = """ $"""; String s2 = """ ${'$'}"""; String dollar1 = """ $a"""; String dollar2 = """ $A"""; String dollar3 = """ ${s}"""; String dollar4 = """ $$"""; }
main
55,445
void (String[] args) { foo(""" John Q. Smith""".substring(8).equals("Smith")); }
main
55,446
void (boolean b) {}
foo
55,447
void (String[] args) { String name = """ red green blue """; }
main
55,448
void (String[] args) { String code = """ String source = \""" String message = "Hello, World!"; System.out.println(message); ""\"; """; }
main
55,449
void (String[] args) { String s = """ class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } """; }
main
55,450
void (String[] args) { System.out.println("Hello, World!"); }
main
55,451
void (String[] args) { String s = """ \101 \055 \032 """; }
main
55,452
void (String[] args) { // escaped backslashes are balanced in pairs String backslash = """ \\ \\\\ """; // \' and ' are the same thing inside a text block (\' is an "unnecessary escape") // in Kotlin they are both translated to just ' String quote = """ \' \\' \\\' \\\\' """; // same thing with double quote String doub...
main
55,453
void (String[] args) { String s = """ Hello"""; }
main
55,454
void (String[] args) { // should strip two trailing spaces String s = """ red """; // should preserve escaped trailing spaces // an even number of leading backslashes prevents the escaping String s2 = """ trailing\040\040 trailing\\040 trailing\\\040 trailing\\\\040 """; // \s is the same as \040 String colors = """ tr...
main
55,455
void (Object obj) { if (obj instanceof String str) { System.out.println(str.toLowerCase()); } }
f
55,456
record (double length, double width) { public Rectangle { if (length <= 0 || width <= 0) throw new RuntimeException(); } }
Rectangle
55,457
record (double length, double width) { public Rectangle { } }
Rectangle
55,458
record (int x) { public R(int x) { this.x = x; if (x <= 0) throw new RuntimeException(); } }
R
55,459
record (int x) { public R(int x) { this.x = x; } }
R
55,460
record (int x, int y) { }
J
55,461
record (double length, double width) { public Rectangle() { this(42,42); } }
Rectangle
55,462
record (int... xs) { }
R
55,463
record (int x) { void i(int y) {} void f1() { i(x + x() + this.x + this.x()); } void f2(int x) { i(x + x() + this.x + this.x()); } void f3(J j) { i(j.x + j.x()); } void f4() { J j = new J(42); f3(new J(42)); f3(j); } }
J
55,464
record (int x) { public int x() { return this.x < 100 ? this.x : 100; } }
R
55,465
int () { return this.x < 100 ? this.x : 100; }
x
55,466
record (int x) { public R(int x) { if (x <= 0) throw new RuntimeException(); this.x = x; } }
R
55,467
record (double length, double width) { public Rectangle { if (length <= 0 || width <= 0) throw new RuntimeException(); length = 2; width *= 2; } }
Rectangle
55,468
void (String[] args) { int value = 3; String valueString = ""; int a = switch (value) { case 1: valueString = "ONE"; yield 1; case 2: valueString = "TWO"; yield 2; case 3: valueString = "THREE"; yield 3; } System.out.println(valueString); }
main
55,469
String (int i, int j) { int a = switch (i) { case 0: if (j > 0) { return "1" } case 1: return "2"; default: return "3"; } }
foo
55,470
void (String[] args) { int month = 8; String monthString = switch (month) { case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 12: yield "December"; default: yield "Invalid month"; } System.out.println(monthString); }
main
55,471
void (String[] args) { int a = switch (args.length) { case 1: { int a = 1; System.out.print("1"); } case 2: { int a = 2; System.out.print("2"); } } }
main
55,472
void (int i, int j) { String a = switch (i) { case 0: switch (j) { case 1: yield "0, 1"; default: yield "0, x"; } case 1: yield "1, x"; default: yield "x, x"; } }
foo
55,473
void (Object o) { System.out.println(o); }
print
55,474
void (int i) { String monthString = "<empty>"; int x = switch (i) { case 1: print(1); case 2: print(2); case 3: print(3); case 4: print(4); case 5: print(5); yield 5; case 6: print(6); case 7: print(7); case 8: print(8); case 9: print(9); case 10: print(10); case 11: print(11); case 12: monthString = "December"; yield ...
test
55,475
void (String[] args) { for (int i = 1; i <=12 ; i++) test(i); }
main
55,476
void (String[] args) { int value = 3; String valueString = ""; int a = switch (value) { } System.out.println(valueString); }
main
55,477
int (int i) { String monthString = "<empty>"; int a = switch (i) { case 1: print(1); case 2: print(2); case 3: print(3); default: case 4: print(4); case 5: print(5); yield 5; case 6: print(6); case 7: print(7); case 8: print(8); case 9: print(9); case 10: print(10); case 11: print(11); case 12: monthString = "December"...
test
55,478
void (String[] args) { int month = 8; String monthString; int a = switch (month) { case 1: monthString = "January"; yield 1; case 2: monthString = "February"; yield 2; case 3: monthString = "March"; yield 3; case 4: monthString = "April"; yield 4; case 5: monthString = "May"; yield 5; case 6: monthString = "June"; yiel...
main
55,479
void (int i, int j) { String a = switch (i) { case 0: if (j > 0) { yield "1" } else { yield "2" } case 1: yield "3"; default: yield "4"; } }
foo
55,480
String (int x) { return switch (x) { case 0 -> "zero"; case 1 -> "one"; case 2 -> "two"; default -> "many"; }; }
foo
55,481
void (String[] args) { System.out.println(void.class); System.out.println(boolean.class); System.out.println(int.class); System.out.println(double.class); System.out.println(int[].class); System.out.println(Object[].class); System.out.println(Object[][].class); }
main
55,482
void () { b(i > c); b(i >= c); b(i < c); b(i <= c); b(c > i); b(c >= i); b(c < i); b(c <= i); b(c == i); b(c != i); b(i == c); b(i != c); i(i + c); i(i - c); i(i / c); i(i * c); i(i % c); i(i | c); i(i & c); i(i ^ c); i(i << c); i(i >> c); i(i >>> c); i(/*operand 'i'*/ i /*plus*/ + /*operand 'c'*/ c); i(/*operand 'i'*/...
operationsWithChar
55,483
void () { b('0' > c); b('0' >= c); b('0' < c); b('0' <= c); b(c > '0'); b(c >= '0'); b(c < '0'); b(c <= '0'); b(c == '0'); b(c != '0'); b('0' == c); b('0' != c); b(i > '0'); b(i >= '0'); b(i < '0'); b(i <= '0'); b('0' > i); b('0' >= i); b('0' < i); b('0' <= i); b('0' == i); b('0' != i); b(i == '0'); b(i != '0'); i(i + ...
operationsWithCharLiteral
55,484
void () { b('A' > '0'); b('A' >= '0'); b('A' < '0'); b('A' <= '0'); b('0' == 'A'); b('0' != 'A'); i('A' + '0'); i('A' - '0'); i('A' / '0'); i('A' * '0'); i('A' % '0'); i('A' | '0'); i('A' & '0'); i('A' ^ '0'); i('A' << '0'); i('A' >> '0'); i('A' >>> '0'); i(/*operand 'A'*/ 'A' + /*plus*/ /*operand '0'*/ '0'); i(/*opera...
operationsWithCharLiterals
55,485
void (boolean b) { }
b
55,486
void (int i) { }
i
55,487
void (byte b, char c, short s, int i, long l, float f, double d) { i(-b); i(+b); i(~b); i(-c); i(+c); i(~c); i(-s); i(+s); i(~s); i(-i); i(+i); i(~i); l(-l); l(+l); l(~l); f(-f); f(+f); d(-d); d(+d); }
foo
55,488
void (int i) {}
i
55,489
void (long l) {}
l
55,490
void (float f) {}
f
55,491
void (double d) {}
d
55,492
long (final int index) { long l1 = readInt(index); long l0 = readInt(index + 4) & 0xFFFFFFFFL; return l1 + l0; }
readLong
55,493
int (final int index) { return 0; }
readInt
55,494
void () { double a = 3; double b = a != 0.0 ? 1 : a; }
literalThen
55,495
void () { double a = 3; double b = a != 0.0 ? a : 1; }
literalElse
55,496
void () { double a = 3; double b = a != 0.0 ? 1 + 2 * 3 : a; }
expressionThen
55,497
void () { double a = 3; double b = a != 0.0 ? a : 1 + 2 * 3; }
expressionElse
55,498
void () { double a = 3; double b = a != 0.0 ? 1.0 : a; }
sameType
55,499
void (Object o) { float f = (int) o; }
foo