Unnamed: 0
int64 0
305k
| body
stringlengths 7
52.9k
| name
stringlengths 1
185
|
|---|---|---|
11,400
|
void (String[] args) { System.out.println(EnumClass.ENUM1.name()); }
|
main
|
11,401
|
void () { <warning descr="'val' already marks variables final.">final</warning> val FIVE = 5; }
|
test
|
11,402
|
WithSuperBuilder<Integer> (String s, int i, double d) { WithSuperBuilder<Integer> result = WithSuperBuilder.<Integer>builder().build(); return result; }
|
calculateSomething
|
11,403
|
void () { BuilderDefaultValue.builder() .mustSet(1) .canSet(1); BuilderDefaultValue.builder() .<error descr="Cannot resolve method 'canNotSet(int)'">canNotSet</error>(1); new BuilderDefaultValue(1,1); BuilderDefaultValue bdv = BuilderDefaultValue.builder() .mustSet(1) .canSet(1) .build(); bdv.withCanSet(2).withMustSet(2); }
|
testMe
|
11,404
|
void () { BuilderDefaultValue.builder() .mustSet(1) .canSet(1); BuilderDefaultValue.builder() .<error descr="Cannot resolve method 'canNotSet' in 'BuilderDefaultValueBuilder'">canNotSet</error>(1); new BuilderDefaultValue(1,1); BuilderDefaultValue bdv = BuilderDefaultValue.builder() .mustSet(1) .canSet(1) .build(); bdv.withCanSet(2).withMustSet(2); }
|
testMe
|
11,405
|
void (int x) { System.out.println(x); }
|
makeMe
|
11,406
|
void (int x) { System.out.println(x); }
|
makeMe
|
11,407
|
String () { return "someValue"; }
|
someMethod
|
11,408
|
String () { return "someValue"; }
|
someMethod
|
11,409
|
String () { return "someValue"; }
|
someMethod
|
11,410
|
RecursionType () { return new RecursionType(); }
|
invalidMethod
|
11,411
|
Integer () { return 1; }
|
calcDelegatorInteger
|
11,412
|
Integer (int param1) { return 1; }
|
calcDelegatorWithParam
|
11,413
|
Integer (int param1, String param2) { return 1; }
|
calcDelegatorWithParams
|
11,414
|
Integer () { return 1; }
|
calcDelegatorInteger
|
11,415
|
void (String[] args) { LOG1.info("Using LOG1 Logger"); }
|
main
|
11,416
|
void (String[] args) { log.info("Using LOG1 Logger"); }
|
main
|
11,417
|
void (int param) { bar<caret> = param; }
|
setBar
|
11,418
|
void (Date param) { Bar<caret> = param; }
|
setBar
|
11,419
|
void (int param) { finalField<caret> = param; }
|
setFinalField
|
11,420
|
void (Object param...) { this.bar<caret> = param; }
|
setBar
|
11,421
|
void (int param) { instanceField = param; }
|
setInstanceField
|
11,422
|
void (int param) { new Foo().bar<caret> = param; }
|
setBar
|
11,423
|
void (Long bar) { bar<caret> = bar; }
|
setBar
|
11,424
|
void (boolean param) { valid<caret> = param; }
|
setValid
|
11,425
|
void (Logger param) { log<caret> = param; }
|
setLog
|
11,426
|
void (Date param) { creationDate<caret> = param; }
|
setCreationDate
|
11,427
|
void (int param) { bar<caret> = 0; }
|
setBar
|
11,428
|
void (int param) { bar = param; // Keep this comment }
|
setBar
|
11,429
|
int () { return 0; }
|
completelyIrrevelantMethod
|
11,430
|
void (Long param) { this.bar<caret> = (param); }
|
setBar
|
11,431
|
void (final Long param) { this.bar<caret> = param; }
|
setBar
|
11,432
|
void (int param) { bar++; bar<caret> = param; }
|
setBar
|
11,433
|
void (char param) { bar<caret> = param; }
|
setBar
|
11,434
|
void () { bar<caret> = bar; }
|
setBar
|
11,435
|
void (int param, int dummy) { bar<caret> = param; }
|
setBar
|
11,436
|
void (int param) { bar = param; }
|
setBar
|
11,437
|
void (boolean param) { baz = param; }
|
setBaz
|
11,438
|
void (int increment) { count<caret> += increment; }
|
setCount
|
11,439
|
void (int param) { bar = param; }
|
setBar
|
11,440
|
void (int param) { bar = param; }
|
setBar
|
11,441
|
void (boolean param) { PrimitiveBooleanValue = param; }
|
setPrimitiveBooleanValue
|
11,442
|
void (int param) { InstanceField.this.fooBar = param; }
|
setFooBar
|
11,443
|
void (int param) { bar = param; }
|
setBar
|
11,444
|
void (boolean param) { Baz = param; }
|
setBaz
|
11,445
|
void (int param) { AllInstanceFields.this.fooBar = param; }
|
setFooBar
|
11,446
|
void (int param) { number = param; }
|
setNumber
|
11,447
|
void (@NotNull Integer param) { bar<caret> = param; }
|
setBar
|
11,448
|
void (int param) { bar<caret> = param; }
|
setBar
|
11,449
|
void (int param) { bar<caret> = param; }
|
setBar
|
11,450
|
void (Long param) { this.bar<caret> = param; }
|
setBar
|
11,451
|
void (int param) { bar<caret> = param; }
|
set1Bar
|
11,452
|
void (int param) { project.OneFullyQualifiedClass.this.bar<caret> = param; }
|
setBar
|
11,453
|
int () { return bar<caret>; }
|
getBar
|
11,454
|
void (int param) { bar<caret> = param; }
|
set
|
11,455
|
void (int param) { anotherField<caret> = param; }
|
setBar
|
11,456
|
void (int param) { bar = param; }
|
setBar
|
11,457
|
void (int param) { bar = param; }
|
setBar
|
11,458
|
void (boolean param) { this.Baz = param; }
|
setBaz
|
11,459
|
void (int param) { AllInstanceFields.this.fooBar = param; }
|
setFooBar
|
11,460
|
void (Date param) { releaseDate<caret> = param; }
|
setReleaseDate
|
11,461
|
void (int param) { canditateField = param; }
|
setCanditateField
|
11,462
|
void (int param) { bar<caret> = bar; }
|
setBar
|
11,463
|
void (Long param) { this.bar = param;; }
|
setBar
|
11,464
|
void (int param) { //Keep this comment QualifiedClass.this.bar<caret> = param; }
|
setBar
|
11,465
|
void (Long bar) { this.bar<caret> = this.bar; }
|
setBar
|
11,466
|
void (Date param) { processDate<caret> = param; }
|
setProcessDate
|
11,467
|
void (int param) { bar<caret> = param; }
|
setBar
|
11,468
|
void (int param) { bar<caret> = param; }
|
setBar
|
11,469
|
void (int param) { candidateField<caret> = param; }
|
setCandidateField
|
11,470
|
int () { return 0; }
|
completelyIrrevelantMethod
|
11,471
|
void (String[] args) { System.out.println(new Child()); }
|
main
|
11,472
|
void (String[] args) { System.out.println(new Child("xxx")); }
|
main
|
11,473
|
void () { System.out.println("hello"); }
|
hello
|
11,474
|
int () { return 42; }
|
answerToLife
|
11,475
|
void () { System.out.println("foo"); }
|
foo
|
11,476
|
void () { System.out.println("foobar"); }
|
foobar
|
11,477
|
void () { System.out.println("errorStatic"); }
|
errorStatic
|
11,478
|
void () { System.out.println("error1"); }
|
error1
|
11,479
|
void () { System.out.println("error2"); }
|
error2
|
11,480
|
String () { return "something"; }
|
value
|
11,481
|
void () { BuilderDefaultValue.builder() .mustSet(1) .canSet(1); BuilderDefaultValue.builder() .<error descr="Cannot resolve method 'canNotSet(int)'">canNotSet</error>(1); new BuilderDefaultValue(1,1); BuilderDefaultValue bdv = BuilderDefaultValue.builder() .mustSet(1) .canSet(1) .build(); bdv.withCanSet(2).withMustSet(2); }
|
testMe
|
11,482
|
void () { BuilderDefaultValue.builder() .mustSet(1) .canSet(1); BuilderDefaultValue.builder() .<error descr="Cannot resolve method 'canNotSet' in 'BuilderDefaultValueBuilder'">canNotSet</error>(1); new BuilderDefaultValue(1,1); BuilderDefaultValue bdv = BuilderDefaultValue.builder() .mustSet(1) .canSet(1) .build(); bdv.withCanSet(2).withMustSet(2); }
|
testMe
|
11,483
|
String () { return "someValue"; }
|
someMethod
|
11,484
|
String () { return "someValue"; }
|
someMethod
|
11,485
|
String () { return "someValue"; }
|
someMethod
|
11,486
|
void () { // should be here if (<warning descr="'bIsTrueFinal == true' can be simplified to 'bIsTrueFinal'">bIsTrueFinal == true</warning>) { System.out.println("ConstantConditions"); } if (<warning descr="'b == true' can be simplified to 'b'">b == true</warning>) { System.out.println("ConstantConditions"); } }
|
test
|
11,487
|
void () { val a = 1; val b = "a2"; val c = new int[]{1}; val d = System.getProperty("sss"); // 'val' is not allowed in old-style for loops for (<error descr="'val' is not allowed in old-style for loops">val i = 0;</error> i < 10; i++) { val j = 2; } // 'val' is not compatible with array initializer expressions. Use the full form (new int[] { ... } instead of just { ... }) <error descr="'val' is not compatible with array initializer expressions. Use the full form (new int[] { ... } instead of just { ... })">val e = <error descr="Array initializer is not allowed here">{"xyz"}</error>;</error> // 'val' is not allowed with lambda expressions. <error descr="'val' is not allowed with lambda expressions.">val f = <error descr="<lambda expression> is not a functional interface">() -> "xyz"</error>;</error> // 'val' on a local variable requires an initializer expression <error descr="'val' on a local variable requires an initializer expression">val g;</error> for (val h : <error descr="Cannot resolve symbol 'Arrays'">Arrays</error>.asList("a", "b", "c")) { System.out.println(h); } }
|
test
|
11,488
|
void (<error descr="'val' works only on local variables and on foreach loops">val x</error>) { String val = "val"; System.out.println(val); }
|
test
|
11,489
|
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SomesComplex that = (SomesComplex) o; return value.equals(that.value); }
|
equals
|
11,490
|
int () { return value.hashCode(); }
|
hashCode
|
11,491
|
void (String[] args) { SomesComplex complex = new SomesComplex("This is very complex"); System.out.println(complex); SomeDifferent different = new SomeDifferent("This is something different"); System.out.println(different); }
|
main
|
11,492
|
void () { // Doesn't occur here if (b) System.out.println("no warning"); // But does occur here and with other primitives if (b == true) System.out.println("ConstantConditions"); if (i == 0) System.out.println("ConstantConditions"); // Does occur on objects if (s.isEmpty()) System.out.println("ConstantConditions"); if (o == null) System.out.println("ConstantConditions"); // Must occur here if (<warning descr="Condition 'thisIsTrueFinalField.isEmpty()' is always 'true'">thisIsTrueFinalField.isEmpty()</warning>) System.out.println("ConstantConditions"); }
|
test
|
11,493
|
String () { String iAmNull = null; return iAmNull.or("hELlO, WORlD!".toTitleCase()); }
|
test
|
11,494
|
void () { String[] arr = null; String str = null; <warning descr="Passing 'null' argument to parameter annotated as @NotNull">arr</warning>.fill(str); }
|
testArrays
|
11,495
|
String (String in) { if (in.isEmpty()) return in; return "" + Character.toTitleCase(in.charAt(0)) + in.substring(1).toLowerCase(); }
|
toTitleCase
|
11,496
|
int () { return bar<caret>; }
|
getBar
|
11,497
|
Date () { return Bar<caret>; }
|
getBar
|
11,498
|
int () { return finalField<caret>; }
|
getFinalField
|
11,499
|
int () { return instanceField; }
|
getInstanceField
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.