Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
10,400
String (String string) { return string; }
toString
10,401
String () { return "ToStringWithNamedExistingMethods(someInt=" + this.someInt + ")"; }
toString
10,402
RequiredArgsConstructorStaticNameAccessPrivate (final int x) { return new RequiredArgsConstructorStaticNameAccessPrivate(x); }
of
10,403
RequiredArgsConstructorStaticNameAccessProtected (final int x) { return new RequiredArgsConstructorStaticNameAccessProtected(x); }
of
10,404
RequiredArgsConstructorStaticNameAccessPackage (final int x) { return new RequiredArgsConstructorStaticNameAccessPackage(x); }
of
10,405
RequiredArgsConstructorStaticNameAccessModule (final int x) { return new RequiredArgsConstructorStaticNameAccessModule(x); }
of
10,406
RequiredArgsConstructorStaticNameAccessPublic (final int x) { return new RequiredArgsConstructorStaticNameAccessPublic(x); }
of
10,407
void (String[] args) { Foo<String, IllegalArgumentException> foo = new Foo<>(new HashMap<String, IllegalArgumentException>()); System.out.println(foo); HashMap<Integer, IllegalStateException> hashMap = new HashMap<>(); Foo<Integer, IllegalStateException> myFoo = Foo.of(hashMap); Map<Integer, IllegalStateException> bar = myFoo.buildBar(); System.out.println(bar); Foo<Integer, NullPointerException> exceptionFoo = Foo.of(new HashMap<Integer, NullPointerException>()); System.out.println(exceptionFoo.buildBar()); }
main
10,408
AllArgsConstructorStaticNameAccessPrivate (final int x, final String name) { return new AllArgsConstructorStaticNameAccessPrivate(x, name); }
of
10,409
AllArgsConstructorStaticNameAccessProtected (final int x, final String name) { return new AllArgsConstructorStaticNameAccessProtected(x, name); }
of
10,410
AllArgsConstructorStaticNameAccessPackage (final int x, final String name) { return new AllArgsConstructorStaticNameAccessPackage(x, name); }
of
10,411
AllArgsConstructorStaticNameAccessModule (final int x, final String name) { return new AllArgsConstructorStaticNameAccessModule(x, name); }
of
10,412
AllArgsConstructorStaticNameAccessPublic (final int x, final String name) { return new AllArgsConstructorStaticNameAccessPublic(x, name); }
of
10,413
boolean (final java.lang.Object o) { if (o == this) return true; if (!(o instanceof ConflictingStaticConstructorNames)) return false; final ConflictingStaticConstructorNames other = (ConflictingStaticConstructorNames) o; if (!other.canEqual((java.lang.Object) this)) return false; return true; }
equals
10,414
boolean (final java.lang.Object other) { return other instanceof ConflictingStaticConstructorNames; }
canEqual
10,415
int () { int result = 1; return result; }
hashCode
10,416
T () { return this.object; }
getObject
10,417
int () { return this.i; }
getI
10,418
void (String[] args) { Foo<String> stringFoo = new Foo<>("", 2); Foo<String> foo1 = Foo.of("String2", 123); Foo<String> foo2 = Foo.of2("String2", 4423); System.out.println(stringFoo); System.out.println(foo1); System.out.println(foo2); }
main
10,419
int () { return this.x; }
getX
10,420
void (String[] args) { final NoArgsWithDefinedConstructorsIsForced testClass = new NoArgsWithDefinedConstructorsIsForced(); System.out.println(testClass); }
main
10,421
String () { return this.test; }
getTest
10,422
String () { return this.test2; }
getTest2
10,423
int () { return this.test3; }
getTest3
10,424
RequiredArgsConstructorStaticName (final int x) { return new RequiredArgsConstructorStaticName(x); }
staticname
10,425
String () { return "method"; }
method
10,426
double () { return 2.0; }
method2
10,427
void (String param) { final java.lang.String fieldV = field; final int a = 10; final int b = 20; { final java.lang.String methodV = method(); final java.lang.String foo = fieldV + methodV; } }
testVal
10,428
void () { try { final int x = 1 / 0; } catch (ArithmeticException e) { final int y = 0; } }
testValInCatchBlock
10,429
String () { return "method"; }
method
10,430
double () { return 2.0; }
method2
10,431
void (String param) { final java.lang.String fieldV = field; final java.lang.String methodV = method(); final java.lang.String paramV = param; final java.lang.String valOfVal = fieldV; final java.lang.String operatorV = fieldV + valOfVal; final short fieldW = field2; final double methodW = method2(); byte localVar = 3; final int operatorW = fieldW + localVar; }
testVal
10,432
void () { java.util.Map<String, Number> m = java.util.Collections.emptyMap(); final java.util.Map<java.lang.String, java.lang.Number> foo = (System.currentTimeMillis() > 0) ? m : java.util.Collections.<String, Number>emptyMap(); }
easyLub
10,433
void () { Integer i = 20; Double d = 20.0; final double thisShouldBePrimitiveDouble = (System.currentTimeMillis() > 0) ? i : d; }
sillyLubWithUnboxingThatProducesErrorThatVarIsPrimitive
10,434
void () { java.util.List<String> list = new java.util.ArrayList<String>(); java.util.Set<String> set = new java.util.HashSet<String>(); final java.util.Collection<java.lang.String> thisShouldBeCollection = (System.currentTimeMillis() > 0) ? list : set; thisShouldBeCollection.add(""); String foo = thisShouldBeCollection.iterator().next(); }
hardLub
10,435
void () { java.util.List<String> list = java.util.Arrays.asList("Hello, World!"); for (final java.lang.String shouldBeString : list) { System.out.println(shouldBeString.toLowerCase()); final java.lang.String shouldBeString2 = shouldBeString; } }
enhancedFor
10,436
void () { java.util.List<String> list = java.util.Arrays.asList("Hello, World!"); for (val shouldBe = 1, marked = "", error = 1.0; ; ) { System.out.println(""); } }
basicFor
10,437
void () { final java.lang.Object c = d; }
unresolvableExpression
10,438
void () { val e = {"foo", "bar"}; }
arrayInitializer
10,439
void () { List<String> list = new ArrayList<String>(); list.add("Hello, World!"); final java.lang.String shouldBeString = list.get(0); final java.util.List<java.lang.String> shouldBeListOfString = list; final java.util.List<java.lang.String> shouldBeListOfStringToo = Arrays.asList("hello", "world"); final java.lang.String shouldBeString2 = shouldBeListOfString.get(0); }
testGenerics
10,440
void () { final java.util.List<java.lang.Object> huh = Collections.emptyList(); final java.util.List<java.lang.Number> huh2 = Collections.<Number>emptyList(); }
testGenericsInference
10,441
void () { final int x = 10; final long y = 5 + 3L; }
testPrimitives
10,442
void () { final java.lang.Runnable y = new Runnable(){ public void run() { } }; }
testAnonymousInnerClass
10,443
void () { }
run
10,444
void (List<? extends Number> lower, List<? super Number> upper) { final java.lang.Number a = lower.get(0); final java.lang.Object b = upper.get(0); final java.util.List<? extends java.lang.Number> c = lower; final java.util.List<? super java.lang.Number> d = upper; List<?> unbound = lower; final java.util.List<?> e = unbound; }
testBounds
10,445
void () { final java.util.ArrayList<java.lang.String> a = new ArrayList<String>(); final java.util.Vector<java.lang.String> b = new Vector<String>(); final boolean c = 1 < System.currentTimeMillis(); final java.util.AbstractList<java.lang.String> d = c ? a : b; java.util.RandomAccess confirm = c ? a : b; }
testCompound
10,446
void () { final java.lang.Object nully = null; }
nullType
10,447
void () { final int[] intArray = new int[]{1, 2, 3}; final java.lang.Object[][] multiDimArray = new Object[][]{{}}; final int[] copy = intArray; final java.lang.Object[] single = multiDimArray[0]; final int singleInt = copy[0]; }
testArrays
10,448
void () { final int x = 10; final java.lang.String y = ""; }
test
10,449
void () { Element propElement = new Element(); for (final java.lang.Object attribute : propElement.attributes()) { final ValRawType.Attribute attr = (Attribute)attribute; } }
test
10,450
List () { return null; }
attributes
10,451
void () { final java.lang.String foo = ""; List<Inner> list = new ArrayList<Inner>(); final ValOutersWithGenerics<Z>.Inner elem = list.get(0); }
testOutersWithGenerics
10,452
void () { class Local<A> { } final Local<java.lang.String> q = new Local<String>(); }
testLocalClasses
10,453
void () { final ValOutersWithGenerics<java.lang.String> outer = new ValOutersWithGenerics<String>(); final ValOutersWithGenerics<java.lang.String>.Inner inner1 = outer.new Inner(); final ValOutersWithGenerics<java.lang.String>.InnerWithGenerics<java.lang.Integer> inner2 = outer.new InnerWithGenerics<Integer>(); }
test
10,454
void () { List<Inner> list = new ArrayList<Inner>(); final ValOutersWithGenerics<java.lang.String>.Inner elem = list.get(0); }
testSubClassOfOutersWithGenerics
10,455
void (Map<String, String> map) { for (final java.util.Map.Entry<java.lang.String, java.lang.String> e : map.entrySet()) { } }
loop
10,456
void () { final char[] shouldBeCharArray = field.toCharArray(); final int shouldBeInt = CONSTANT; final java.lang.Object lock = new Object(); synchronized (lock) { final int field = 20; //Shadowing final int inner = 10; switch (field) { case 5: final char[] shouldBeCharArray2 = shouldBeCharArray; final int innerInner = inner; } } final java.lang.String shouldBeString = field; //Unshadowing }
testComplex
10,457
void (String[] args) { class Local { final int x; String name; @java.lang.SuppressWarnings("all") public Local(final int x) { this.x = x; } @java.lang.SuppressWarnings("all") public int getX() { return this.x; } @java.lang.SuppressWarnings("all") public String getName() { return this.name; } @java.lang.SuppressWarnings("all") public void setName(final String name) { this.name = name; } @java.lang.Override @java.lang.SuppressWarnings("all") public boolean equals(final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Local)) return false; final Local other = (Local) o; if (!other.canEqual((java.lang.Object) this)) return false; if (this.getX() != other.getX()) return false; final java.lang.Object this$name = this.getName(); final java.lang.Object other$name = other.getName(); if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false; return true; } @java.lang.SuppressWarnings("all") protected boolean canEqual(final java.lang.Object other) { return other instanceof Local; } @java.lang.Override @java.lang.SuppressWarnings("all") public int hashCode() { final int PRIME = 59; int result = 1; result = result * PRIME + this.getX(); final java.lang.Object $name = this.getName(); result = result * PRIME + ($name == null ? 43 : $name.hashCode()); return result; } @java.lang.Override @java.lang.SuppressWarnings("all") public java.lang.String toString() { return "Local(x=" + this.getX() + ", name=" + this.getName() + ")"; } } }
main
10,458
int () { return this.x; }
getX
10,459
String () { return this.name; }
getName
10,460
void (final String name) { this.name = name; }
setName
10,461
boolean (final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Local)) return false; final Local other = (Local) o; if (!other.canEqual((java.lang.Object) this)) return false; if (this.getX() != other.getX()) return false; final java.lang.Object this$name = this.getName(); final java.lang.Object other$name = other.getName(); if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false; return true; }
equals
10,462
boolean (final java.lang.Object other) { return other instanceof Local; }
canEqual
10,463
int () { final int PRIME = 59; int result = 1; result = result * PRIME + this.getX(); final java.lang.Object $name = this.getName(); result = result * PRIME + ($name == null ? 43 : $name.hashCode()); return result; }
hashCode
10,464
String () { return this.name; }
getName
10,465
void (@lombok.NonNull final String name) { if (name == null) { throw new java.lang.NullPointerException("name"); } this.name = name; }
setName
10,466
boolean (final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Local.InnerLocal)) return false; final InnerLocal other = (InnerLocal) o; if (!other.canEqual((java.lang.Object) this)) return false; final java.lang.Object this$name = this.getName(); final java.lang.Object other$name = other.getName(); if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false; return true; }
equals
10,467
boolean (final java.lang.Object other) { return other instanceof Local.InnerLocal; }
canEqual
10,468
int () { final int PRIME = 59; int result = 1; final java.lang.Object $name = this.getName(); result = result * PRIME + ($name == null ? 43 : $name.hashCode()); return result; }
hashCode
10,469
int () { return this.x; }
getX
10,470
boolean (final java.lang.Object o) { if (o == this) return true; if (!(o instanceof Local)) return false; final Local other = (Local) o; if (!other.canEqual((java.lang.Object) this)) return false; if (this.getX() != other.getX()) return false; return true; }
equals
10,471
boolean (final java.lang.Object other) { return other instanceof Local; }
canEqual
10,472
int () { final int PRIME = 59; int result = 1; result = result * PRIME + this.getX(); return result; }
hashCode
10,473
void (final int x) { this.x = x; }
setX
10,474
void (final int y) { this.y = y; }
setY
10,475
boolean (final java.lang.Object o) { if (o == this) return true; if (!(o instanceof DataWithGetterNone)) return false; final DataWithGetterNone other = (DataWithGetterNone) o; if (!other.canEqual((java.lang.Object) this)) return false; if (this.x != other.x) return false; if (this.y != other.y) return false; final java.lang.Object this$z = this.z; final java.lang.Object other$z = other.z; if (this$z == null ? other$z != null : !this$z.equals(other$z)) return false; return true; }
equals
10,476
boolean (final java.lang.Object other) { return other instanceof DataWithGetterNone; }
canEqual
10,477
int () { final int PRIME = 59; int result = 1; result = result * PRIME + this.x; result = result * PRIME + this.y; final java.lang.Object $z = this.z; result = result * PRIME + ($z == null ? 43 : $z.hashCode()); return result; }
hashCode
10,478
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
10,479
void () { System.out.println("Run"); }
run
10,480
void () { }
run
10,481
T () { return this.command; }
getCommand
10,482
Runnable () { return this.callback; }
getCallback
10,483
boolean (final java.lang.Object o) { if (o == this) return true; if (!(o instanceof DataWithGeneric176)) return false; final DataWithGeneric176<?> other = (DataWithGeneric176<?>) o; if (!other.canEqual((java.lang.Object) this)) return false; final java.lang.Object this$command = this.getCommand(); final java.lang.Object other$command = other.getCommand(); if (this$command == null ? other$command != null : !this$command.equals(other$command)) return false; final java.lang.Object this$callback = this.getCallback(); final java.lang.Object other$callback = other.getCallback(); if (this$callback == null ? other$callback != null : !this$callback.equals(other$callback)) return false; return true; }
equals
10,484
boolean (final java.lang.Object other) { return other instanceof DataWithGeneric176; }
canEqual
10,485
int () { final int PRIME = 59; int result = 1; final java.lang.Object $command = this.getCommand(); result = result * PRIME + ($command == null ? 43 : $command.hashCode()); final java.lang.Object $callback = this.getCallback(); result = result * PRIME + ($callback == null ? 43 : $callback.hashCode()); return result; }
hashCode
10,486
void (final int x) { this.x = x; }
setX
10,487
void (final int y) { this.y = y; }
setY
10,488
boolean (final java.lang.Object o) { if (o == this) return true; if (!(o instanceof DataWithGetter)) return false; final DataWithGetter other = (DataWithGetter) o; if (!other.canEqual((java.lang.Object) this)) return false; if (this.getX() != other.getX()) return false; if (this.getY() != other.getY()) return false; final java.lang.Object this$z = this.getZ(); final java.lang.Object other$z = other.getZ(); if (this$z == null ? other$z != null : !this$z.equals(other$z)) return false; return true; }
equals
10,489
boolean (final java.lang.Object other) { return other instanceof DataWithGetter; }
canEqual
10,490
int () { final int PRIME = 59; int result = 1; result = result * PRIME + this.getX(); result = result * PRIME + this.getY(); final java.lang.Object $z = this.getZ(); result = result * PRIME + ($z == null ? 43 : $z.hashCode()); return result; }
hashCode
10,491
int () { return this.x; }
getX
10,492
int () { return this.y; }
getY
10,493
String () { return this.z; }
getZ
10,494
int () { return this.x; }
getX
10,495
boolean (final java.lang.Object o) { if (o == this) return true; if (!(o instanceof DataIgnore)) return false; final DataIgnore other = (DataIgnore) o; if (!other.canEqual((java.lang.Object) this)) return false; if (this.getX() != other.getX()) return false; return true; }
equals
10,496
boolean (final java.lang.Object other) { return other instanceof DataIgnore; }
canEqual
10,497
int () { final int PRIME = 59; int result = 1; result = result * PRIME + this.getX(); return result; }
hashCode
10,498
int () { return this.x; }
getX
10,499
int () { return this.y; }
getY