Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
39,200
String (String var, int b, Object c) { return "(" + var + "-" + b + "---" + c + ")"; }
test2
39,201
void () { printBoolean(true); printByte((byte) 123); printShort((short) 257); printInt(123); printLong(123L); printFloat(1.23F); printDouble(1.23); printChar('Z'); printBooleanBoxed(true); printByteBoxed((byte) 123); printShortBoxed((short) 257); printIntBoxed(1); printIntBoxed(40_000); printLongBoxed(123L); printFloat...
printAll
39,202
void (boolean b) { System.out.printf("%b", b); }
printBoolean
39,203
void (byte b) { System.out.printf("%d", b); }
printByte
39,204
void (short s) { System.out.printf("%d", s); }
printShort
39,205
void (int i) { System.out.printf("%d", i); }
printInt
39,206
void (long l) { System.out.printf("%d", l); }
printLong
39,207
void (float f) { System.out.printf("%f", f); }
printFloat
39,208
void (double d) { System.out.printf("%f", d); }
printDouble
39,209
void (char c) { System.out.printf("%c", c); }
printChar
39,210
void (Boolean b) { System.out.printf("%b", b); }
printBooleanBoxed
39,211
void (Byte b) { System.out.printf("%d", b); }
printByteBoxed
39,212
void (Short s) { System.out.printf("%d", s); }
printShortBoxed
39,213
void (Integer i) { System.out.printf("%d", i); }
printIntBoxed
39,214
void (Long l) { System.out.printf("%d", l); }
printLongBoxed
39,215
void (Float f) { System.out.printf("%f", f); }
printFloatBoxed
39,216
void (Double d) { System.out.printf("%f", d); }
printDoubleBoxed
39,217
void (Character c) { System.out.printf("%c", c); }
printCharBoxed
39,218
boolean () { return false; }
getBoolean
39,219
byte () { return (byte) 128; }
getByte
39,220
short () { return (short) 32768; }
getShort
39,221
int () { return 42; }
getInt
39,222
Integer () { return 40_000; }
getInteger
39,223
Character () { return 'Z'; }
getCharacter
39,224
void () { printByte((byte)getInt()); printShort((short)getInt()); }
printNarrowed
39,225
void () { new Byte((byte)1); }
constructor
39,226
boolean (char c) { boolean res = (c > -1); res = (c > 0); res = (c > 1); res = (c > '\b'); res = (c > '\t'); res = (c > '\n'); res = (c > '\f'); res = (c > '\r'); res = (c > ' '); res = (c > 'a'); res = (c > 'Z'); res = (c > 127); res = (c > 255); return res; }
compare
39,227
void () { withInteger(null); withShort(null); withByte(null); new TestPrimitiveNarrowing(null); }
invocations
39,228
void (Byte defaultValue) { }
withByte
39,229
void (Integer defaultValue) { }
withInteger
39,230
void (Short defaultValue) { }
withShort
39,231
void (String[] args) { }
main
39,232
void (Object o) { switch (o) { case String s when s.isEmpty() && s.getBytes().length == 2 -> System.out.println("empty s"); case String s -> System.out.println("s"); case Integer i -> System.out.println("iii"); case Object ob -> System.out.println(o); } System.out.println("1"); }
testObject
39,233
void (Object o) { switch (o) { case String s when s.isEmpty() && s.getBytes().length == 2 -> System.out.println("empty s"); case String s -> System.out.println("s"); case Integer i -> System.out.println("ii"); case Object ob -> System.out.println(o); } }
testObject2
39,234
void (Object o) { TASK: while (o.hashCode() == 1) { switch (o) { case String s when s.isEmpty() && s.getBytes().length == 2: System.out.println("empty s"); break TASK; case String s: System.out.println("s"); continue TASK; case Integer i: System.out.println("i"); break; case Object ob: System.out.println(o); break; } b...
testObject3
39,235
void () { new InnerStaticPrivateString("text"){}; }
innerStaticPrivateStringStatic
39,236
void () { new InnerStaticPrivate(3, 4){}; }
innerStaticPrivateStatic
39,237
void () { new InnerStaticPublicString("text"){}; }
innerStaticPublicStringStatic
39,238
void () { new InnerStaticPublic(3, 4){}; }
innerStaticPublicStatic
39,239
void (String s) { System.out.println("n(): " + s); }
n
39,240
void () { Foo foo = new Foo(); Foo.Bar bar = new Foo.Bar(); System.out.println(foo); System.out.println(bar); FooBar<String> fooBar = new FooBar<> (); System.out.println(foo); }
doSomething
39,241
void () {}
staticMethod
39,242
int (TimeUnit t) { switch (t) { case MICROSECONDS: return 2; case SECONDS: return 1; } return 0; }
testSOE
39,243
void (Object o) { switch (o) { case String s -> System.out.println("s"); case Integer i -> System.out.println("i"); case Object ob -> System.out.println(o); } }
testObject
39,244
void (Object o) { switch (o) { case String s -> System.out.println("s"); case Integer i -> System.out.println("i"); case Object ob -> System.out.println(o); case null -> System.out.println("null"); } }
testObject2
39,245
void (Object o) { switch (o) { case String s -> System.out.println("s"); case Integer i -> System.out.println("i"); case null -> System.out.println("null"); default -> System.out.println("o"); } }
testObject3
39,246
void (Object o) { switch (o) { case String s -> System.out.println("s"); case Integer i -> System.out.println("i"); default -> System.out.println("o"); } }
testObject4
39,247
Comparator () { return (Comparator & Serializable)(c1, c2) -> 1; }
comparingInt
39,248
void (String[] args) { // anonymous from class System.out.println(new ArrayList<String>() { @Override public int size() { return super.size(); } }); // anonymous from class System.out.println(new Comparator<String>() { @Override public int compare(String o1, String o2) { return 0; } }); }
main
39,249
int () { return super.size(); }
size
39,250
int (String o1, String o2) { return 0; }
compare
39,251
void () { try { int a = 0; //make sure whole try/catch not removed by compiler } catch(Exception e) { } for(int i = 0; i < 5; i++) { } while(new Random().nextBoolean()) { } if(new Random().nextBoolean()) { } }
foo
39,252
void (int p03) { System.out.print(p03); }
m2
39,253
void (int p23) { System.out.print(p23); }
m2
39,254
void () { byte var7 = 0; long time = System.currentTimeMillis(); if (time % 2 > 0) { var7 = 1; } else if (time % 3 > 0) { var7 = 2; } if (var7 == 1) { System.out.println(); } }
testBoolean
39,255
boolean (int var0) { return (var0 & 1) == 1; }
testBit
39,256
void (int a) { switch (a) { case 88: System.out.println("1"); break; case 656: System.out.println("2"); break; case 65201: case 65489: System.out.println("3"); } }
testSwitchConsts
39,257
void (List list) { List a = list; if (a != null) { (a = new ArrayList(a)).add("23"); } System.out.println(a.size()); }
testAssignmentType
39,258
int () { return 42; }
getInt
39,259
int () { int i = 0, d = 0; int result = 0; do { d = getInt(); result -= d; } while (++i < 10); return result; }
reuse
39,260
void (String[] args) { testObject0(4); }
main
39,261
void (Object o) { try { System.out.println("inside try 2"); switch (o) { case Integer n when n > 3 -> { System.out.println("4"); throw new RuntimeException(); } case Object ob -> System.out.println(o); } System.out.println("2"); } catch (UnsupportedOperationException e) { System.out.println("exception"); } finally { Sy...
testObject0
39,262
void (Object o) { System.out.println("2"); switch (o) { case Integer n when n > 1 -> { if (n == 1) { System.out.println("212"); } System.out.println(2); System.out.println(1); } case Integer n when n > 2 -> { if (n == 1) { System.out.println("4"); } } case Integer n when n > 3 -> { System.out.println("4"); } case Objec...
testObject1
39,263
void (Object o) { switch (o) { case Integer n -> { if (n == 1) { System.out.println("2"); } System.out.println(1); System.out.println(1); } case Object ob -> System.out.println(o); } System.out.println("2"); switch (o) { case Integer n -> { if (n == 1) { System.out.println("1"); } System.out.println(1); System.out.prin...
testObject2
39,264
void (Object o) { System.out.println("2"); switch (o) { case Integer n when n > 1 -> { if (n == 1) { System.out.println("212"); } System.out.println(2); System.out.println(1); } case Integer n when n > 2 -> { if (n == 1) { System.out.println("4"); } } case Integer n when n > 3 -> { System.out.println("4"); } case Objec...
testObject3
39,265
void (File file, boolean recursively) { if (file.isDirectory()) { long start = System.currentTimeMillis(); File[] files = file.listFiles(); for (File s : files) { File dest = new File(s.getAbsolutePath() + ".tmp"); assert s.renameTo(dest) : "unable to rename " + s + " to " + dest; } long elapsed = System.currentTimeMil...
rename
39,266
void (String[] args) { }
main
39,267
void (Object o) { switch (o) { case String s when s.isEmpty() && s.getBytes().length == 2 -> System.out.println("empty s"); case String s -> System.out.println("s"); case Integer i -> System.out.println("i"); case Object ob -> System.out.println(o); } System.out.println("1"); }
testObject
39,268
void (Object o) { switch (o) { case String s when s.isEmpty() && s.getBytes().length == 2 -> System.out.println("empty s"); case String s -> System.out.println("s"); case Integer i -> System.out.println("ii"); case Object ob -> System.out.println(o); } }
testObject2
39,269
void (Object o) { TASK: while (o.hashCode() == 1) { switch (o) { case String s when s.isEmpty() && s.getBytes().length == 2: System.out.println("empty s"); break TASK; case String s: System.out.println("s"); continue TASK; case Integer i: System.out.println("i"); break; case Object ob: System.out.println(o); break; } b...
testObject3
39,270
int (int a) { return a; }
test
39,271
void (String a) { System.out.println(a); }
test2
39,272
void () { List<Integer> list = Arrays.asList(1, 2, 3, 4, 5, 6, 7); int b = (int)Math.random(); list.forEach(n -> { int a = 2 * n; System.out.println(a + b + field); }); }
testLambda
39,273
void () { int a = (int)Math.random(); Runnable r1 = () -> { System.out.println("hello1" + a); }; Runnable r2 = () -> { System.out.println("hello2" + a); }; }
testLambda1
39,274
void () { reduce((left, right) -> Math.max(left, right)); }
testLambda2
39,275
void () { // IDEA-127301 reduce(Math::max); }
testLambda3
39,276
void () { reduce(TestClassLambda::localMax); }
testLambda4
39,277
void () { String x = "abcd"; function(x::toString); }
testLambda5
39,278
void () { List<String> list = new ArrayList<String>(); int bottom = list.size() * 2; int top = list.size() * 5; list.removeIf(s -> (bottom >= s.length() && s.length() <= top)); }
testLambda6
39,279
void (Annotation[] annotations) { Arrays.stream(annotations).map(Annotation::annotationType); }
testLambda7
39,280
OptionalInt (IntBinaryOperator op) { return null; }
reduce
39,281
String (Supplier<String> supplier) { return supplier.get(); }
function
39,282
int (int first, int second) { return 0; }
localMax
39,283
void () { int a =5; Runnable r1 = () -> { Runnable r2 = () -> { System.out.println("hello2" + a); }; System.out.println("hello1" + a); }; }
nestedLambdas
39,284
void (String[] args) { List<String> s = new ArrayList<String>(); s.add("xxx"); }
main
39,285
void (String[] args) { String a = "abc\b\t\n\f\r\"'\\def"; char chars[] = {'\b', '\t', '\n', '\f', '\r', '"', '\'', '\\'}; System.out.println(a); System.out.println(chars); }
main
39,286
void () { for (int i = 0; i < 10; i++) { try { System.out.println(); } finally { if (field_boolean) { System.out.println(); } } } }
testFieldSSAU
39,287
Long () { // IDEA-127466 return new Long(field_int++); }
testFieldSSAU1
39,288
void () { int a = 0; while (a < 10) { int b = a; for (; a < 10 && a == 0; a++) { } if (b != a) { System.out.println(); } } }
testComplexPropagation
39,289
boolean (double a, double b) { return a < b; }
less
39,290
boolean (int a, int b) { return a < b; }
less
39,291
boolean (double a, double b) { return !(a < b); }
notLess
39,292
boolean (int a, int b) { return !(a < b); }
notLess
39,293
boolean (double a, double b) { return a > b; }
greater
39,294
boolean (int a, int b) { return a > b; }
greater
39,295
boolean (double a, double b) { return !(a > b); }
notGreater
39,296
boolean (int a, int b) { return !(a > b); }
notGreater
39,297
boolean (double a, double b) { return a <= b; }
lessEqual
39,298
boolean (int a, int b) { return a <= b; }
lessEqual
39,299
boolean (double a, double b) { return !(a <= b); }
notLessEqual