Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
11,600
void () { val c = d; }
unresolvableExpression
11,601
void () { val e = { "foo", "bar"}; }
arrayInitializer
11,602
void () { List<String> list = new ArrayList<String>(); list.add("Hello, World!"); val shouldBeString = list.get(0); val shouldBeListOfString = list; val shouldBeListOfStringToo = Arrays.asList("hello", "world"); val shouldBeString2 = shouldBeListOfString.get(0); }
testGenerics
11,603
void () { val huh = Collections.emptyList(); val huh2 = Collections.<Number>emptyList(); }
testGenericsInference
11,604
void () { val x = 10; val y = 5 + 3L; }
testPrimitives
11,605
void () { val y = new Runnable() { public void run() {} }; }
testAnonymousInnerClass
11,606
void () {}
run
11,607
void (List<? extends Number> lower, List<? super Number> upper) { val a = lower.get(0); val b = upper.get(0); val c = lower; val d = upper; List<?> unbound = lower; val e = unbound; }
testBounds
11,608
void () { val a = new ArrayList<String>(); val b = new Vector<String>(); val c = 1 < System.currentTimeMillis(); val d = c ? a : b; java.util.RandomAccess confirm = c ? a : b; }
testCompound
11,609
void () { val nully = null; }
nullType
11,610
void () { val intArray = new int[] {1, 2, 3}; val multiDimArray = new Object[][] {{}}; val copy = intArray; val single = multiDimArray[0]; val singleInt = copy[0]; }
testArrays
11,611
void () { val x = 10, y = ""; }
test
11,612
void () { Element propElement = new Element(); for (val attribute : propElement.attributes()) { val attr = (Attribute) attribute; } }
test
11,613
List () { return null; }
attributes
11,614
void () { val foo = ""; List<Inner> list = new ArrayList<Inner>(); val elem = list.get(0); }
testOutersWithGenerics
11,615
void () { class Local<A> {} val q = new Local<String>(); }
testLocalClasses
11,616
void () { val outer = new ValOutersWithGenerics<String>(); val inner1 = outer.new Inner(); val inner2 = outer.new InnerWithGenerics<Integer>(); }
test
11,617
void () { List<Inner> list = new ArrayList<Inner>(); val elem = list.get(0); }
testSubClassOfOutersWithGenerics
11,618
void (Map<String, String> map) { for (val e : map.entrySet()) { } }
loop
11,619
void () { val shouldBeCharArray = field.toCharArray(); val shouldBeInt = CONSTANT; val lock = new Object(); synchronized (lock) { val field = 20; //Shadowing val inner = 10; switch (field) { case 5: val shouldBeCharArray2 = shouldBeCharArray; val innerInner = inner; } } val shouldBeString = field; //Unshadowing }
testComplex
11,620
void (String[] args) { @Data class Local { final int x; String name; } }
main
11,621
void (String[] args) { DataWithGeneric176<Integer> test = new DataWithGeneric176<Integer>(123, new Runnable() { @Override public void run() { System.out.println("Run"); } }); test.getCallback(); System.out.println(test.getCommand()); DataWithGeneric176<String> foo = DataWithGeneric176.of("fooqwqww", new Runnable() { public void run() { } }); foo.getCallback(); System.out.println(foo.getCommand()); }
main
11,622
void () { System.out.println("Run"); }
run
11,623
void () { }
run
11,624
void (String[] args) { final DataStaticConstructor2 test = new DataStaticConstructor2.of(); System.out.println(test); }
main
11,625
void (Object... objects) { }
setObjects
11,626
void (String[] args) { new Klasse663().setObjects(1, 2, 3); }
main
11,627
void (String[] args) { final DataStaticConstructor3 test = new DataStaticConstructor3.of(); System.out.println(test); }
main
11,628
void (int age) { this.age = age; }
age
11,629
void (String[] args) { BuilderWithTolerate.builder().value("42").build(); }
main
11,630
BuilderWithTolerateBuilder (String s) { return this.value(Integer.parseInt(s)); }
value
11,631
MultipleMethodBuilderWithExistedClass (long id) { return new MultipleMethodBuilderWithExistedClass(id, ""); }
builderB
11,632
MultipleMethodBuilderWithExistedClass (String name) { return new MultipleMethodBuilderWithExistedClass(0L, name); }
builderA
11,633
void (String[] args) { try { builder().i(2).build(); } catch (Exception ignore) { } }
main
11,634
String (int show, final int yes, List<T> also, int $andMe) { return "" + show + yes + also + $andMe; }
create
11,635
void (boolean arg) { }
arg2
11,636
void (String[] args) { BarBar<BigDecimal> barBar = BarBar.<BigDecimal>builder().content(BigDecimal.ONE).build(); }
main
11,637
void (String[] args) { System.out.println(builder().first(2).second(2.0F).build()); }
main
11,638
void (String[] args) { try { builder().i(2).build(); } catch (Exception ignore) { } }
main
11,639
record (String name) { }
Person
11,640
Builder (String value) { secret = value.getBytes(); return this; }
withSecret
11,641
Builder (byte[] value) { secret = value; return this; }
withSecret
11,642
Builder (String name) { this.name = Optional.of(name); return this; }
withName
11,643
void (String[] args) { BuilderWithSetterPrefixAndExistedMethods obj = BuilderWithSetterPrefixAndExistedMethods.builder().withSecret("Secret").withName(Optional.of("aaa")).build(); BuilderWithSetterPrefixAndExistedMethods rtn = obj.toBuilder().build(); System.out.println(rtn); }
main
11,644
BuilderWithDefaultInnerFieldsBuilder (Object bar) { this.bar$value = bar; this.bar$set = true; return this; }
barManual
11,645
void (String[] args) { }
main
11,646
void (String[] args) { }
main
11,647
void (String[] args) { }
main
11,648
void (String[] args) { }
main
11,649
void (String[] args) { }
main
11,650
void (String[] args) { }
main
11,651
void (String[] args) { }
main
11,652
void (String[] args) { }
main
11,653
void (String[] args) { }
main
11,654
void (String[] args) { }
main
11,655
void (String[] args) { }
main
11,656
void (String[] args) { }
main
11,657
String () { return fName; }
getName
11,658
void () { Parent x = Parent.builder().field1(5).build(); }
test
11,659
void () { }
foo
11,660
void (java.util.ArrayList<java.lang.String> list) { }
bar
11,661
void (java.util.ArrayList<java.lang.String> list) { }
bar
11,662
void () { }
innerMostMethod
11,663
void (Object[]... keys) {}
varargs
11,664
void () { }
a
11,665
void (java.util.List<String> l) { }
b
11,666
void (java.util.List<Integer> l, String[] a, Integer... varargs) { }
c
11,667
void (String[][][][] d) { }
d
11,668
void (T s, java.util.List<T> l, T[] a, T... varargs) { }
f
11,669
void (Number g) { }
g
11,670
void (java.util.ArrayList<String> list) { }
setList
11,671
int () { return 42; }
getInt
11,672
void (String[] args) { ValueWithGeneric176<String> valueObject = ValueWithGeneric176.of("thing1", 10); System.out.println(valueObject); }
main
11,673
void (String[] args) { final ValueWithPackagePrivate test = new ValueWithPackagePrivate(1, 2, 3, 4, 5, 6, 7); System.out.println(test); }
main
11,674
void (String[] args) { final ValueStaticConstructor test = ValueStaticConstructor.of(1); System.out.println(test); }
main
11,675
void () { this.withMyField(""); }
methodCallingWith
11,676
void (String[] args) { System.out.println(new Foo("one")); }
main
11,677
Zoo () { return new Zoo("tomon", "pumbaa"); }
create
11,678
void () { this.withMyField(""); }
methodCallingWith
11,679
void (String[] args) { ValueBuilder builder = new ValueBuilder("1", 2, 3.0); System.out.println(builder); }
main
11,680
void () { Val val = new Val("otherFinal"); }
test
11,681
boolean (Object o, Object o2) { return o.equals(o2); }
equals
11,682
int (Float someFloat) { return Objects.hash(someFloat); }
hashCode
11,683
int () { return 42; }
hashCode
11,684
boolean (Object other) { return false; }
canEqual
11,685
int () { return 42; }
hashCode
11,686
boolean (Object other) { return false; }
equals
11,687
int () { return 42; }
hashCode
11,688
boolean (Object other) { return false; }
equals
11,689
boolean (Object other) { return true; }
canEqual
11,690
int (int in) { return in + CONSTANT; }
addSomething
11,691
void (String[] args) { final WithAndBuilderDefaultOnFieldAndValueOnClass build = WithAndBuilderDefaultOnFieldAndValueOnClass.builder() .field1("1") .field2(List.of("2")) .build(); final WithAndBuilderDefaultOnFieldAndValueOnClass field2 = build.withField2(List.of("3")); System.out.println(field2); }
main
11,692
void () { Child<Integer> x = Child.<Integer>builder().field3(0.0).field1(5).item("").build(); }
test
11,693
int () { return 2; }
method
11,694
String (Parent instance) { return "staticMethod"; }
staticMethod
11,695
void () { Child x = Child.builder().field3(0.0).field1(5).item("").build().toBuilder().build(); }
test
11,696
void () { Child<Integer> x = Child.<Integer>builder2().field3(1).field1("value").item("").build(); }
test
11,697
void () { GrandChild x = GrandChild.builder().grandChildField("").parentField(5).childField(2.5).build(); }
test
11,698
void () { Child x = Child.builder().field3(0.0).field1(5).item("").build(); }
test
11,699
B () { field1 = 0; return self(); }
resetToDefault