Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
12,900
boolean (PsiElement another) { if (another instanceof LombokLightFieldBuilder anotherLightField) { boolean stillEquivalent = getName().equals(anotherLightField.getName()) && getType().equals(anotherLightField.getType()); if (stillEquivalent) { final PsiClass containingClass = getContainingClass(); final PsiClass anothe...
isEquivalentTo
12,901
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; LombokLightFieldBuilder that = (LombokLightFieldBuilder) o; return Objects.equals(myName, that.myName) && Objects.equals(myNameIdentifier, that.myNameIdentifier) && Objects.equals(myModifierList, that.myModifierL...
equals
12,902
int () { return Objects.hash(myName, myNameIdentifier, myModifierList, getContainingClass()); }
hashCode
12,903
Collection<PsiAnnotation> (@NotNull PsiClass psiClass) { return Collections.emptyList(); }
collectProcessedAnnotations
12,904
Collection<LombokProblem> (@NotNull PsiAnnotation psiAnnotation) { // TODO warning: "You're assigning an auto-cleanup variable to something else. This is a bad idea." final ProblemValidationSink problemNewBuilder = new ProblemValidationSink(); PsiLocalVariable psiVariable = PsiTreeUtil.getParentOfType(psiAnnotation, Ps...
verifyAnnotation
12,905
void (@NotNull PsiLocalVariable psiVariable, @NotNull String cleanupName, @NotNull ProblemValidationSink problemNewBuilder) { final PsiType psiType = psiVariable.getType(); if (psiType instanceof PsiClassType psiClassType) { final PsiClass psiClassOfField = psiClassType.resolve(); final PsiMethod[] methods; if (psiClas...
validateCleanUpMethodExists
12,906
void (@NotNull ProblemValidationSink problemNewBuilder, @NotNull PsiLocalVariable psiVariable) { if (!psiVariable.hasInitializer()) { problemNewBuilder.addErrorMessage("inspection.message.cleanup.variable.declarations.need.to.be.initialized"); } }
validateInitializerExist
12,907
Collection<PsiAnnotation> (@NotNull PsiClass psiClass) { return Collections.emptyList(); }
collectProcessedAnnotations
12,908
Collection<LombokProblem> (@NotNull PsiAnnotation psiAnnotation) { final ProblemValidationSink problemBuilder = new ProblemValidationSink(); PsiMethod psiMethod = PsiTreeUtil.getParentOfType(psiAnnotation, PsiMethod.class); if (null != psiMethod) { final PsiClass containingClass = psiMethod.getContainingClass(); if (nu...
verifyAnnotation
12,909
void (@NotNull ProblemSink problemNewBuilder, @NotNull PsiAnnotation psiAnnotation, @NotNull PsiMethod psiMethod, @NotNull PsiClass containingClass) { @NlsSafe final String lockFieldName = PsiAnnotationUtil.getStringAnnotationValue(psiAnnotation, "value", ""); if (StringUtil.isNotEmpty(lockFieldName)) { final boolean i...
validateReferencedField
12,910
boolean (@NotNull PsiVariable psiVariable) { if (psiVariable instanceof PsiLocalVariable) { return isVal((PsiLocalVariable) psiVariable); } if (!(psiVariable instanceof PsiParameter psiParameter)) { return false; } PsiTypeElement typeElement = psiParameter.getTypeElement(); if (typeElement == null) { return false; } re...
isVal
12,911
boolean (@NotNull PsiVariable psiVariable) { if (psiVariable instanceof PsiLocalVariable) { return isVar((PsiLocalVariable) psiVariable); } if (!(psiVariable instanceof PsiParameter psiParameter)) { return false; } PsiTypeElement typeElement = psiParameter.getTypeElement(); if (typeElement == null) { return false; } re...
isVar
12,912
boolean (@NotNull PsiLocalVariable psiLocalVariable) { if (psiLocalVariable.hasInitializer()) { final PsiTypeElement typeElement = psiLocalVariable.getTypeElement(); return isPossibleVal(typeElement.getText()) && isVal(resolveQualifiedName(typeElement)); } return false; }
isVal
12,913
boolean (@NotNull PsiLocalVariable psiLocalVariable) { if (psiLocalVariable.hasInitializer()) { final PsiTypeElement typeElement = psiLocalVariable.getTypeElement(); return isPossibleVar(typeElement.getText()) && isVar(resolveQualifiedName(typeElement)); } return false; }
isVar
12,914
boolean (@NotNull PsiLocalVariable psiLocalVariable) { if (psiLocalVariable.hasInitializer()) { final PsiTypeElement typeElement = psiLocalVariable.getTypeElement(); return isPossibleValOrVar(typeElement.getText()) && isValOrVar(resolveQualifiedName(typeElement)); } return false; }
isValOrVar
12,915
boolean (@NotNull PsiParameter psiParameter) { if (psiParameter.getParent() instanceof PsiForeachStatement) { final PsiTypeElement typeElement = psiParameter.getTypeElement(); return null != typeElement && isPossibleValOrVar(typeElement.getText()) && isValOrVar(resolveQualifiedName(typeElement)); } return false; }
isValOrVarForEach
12,916
boolean (@Nullable String fullQualifiedName) { return isVal(fullQualifiedName) || isVar(fullQualifiedName); }
isValOrVar
12,917
boolean (@Nullable String shortName) { return isPossibleVal(shortName) || isPossibleVar(shortName); }
isPossibleValOrVar
12,918
boolean (@Nullable String shortName) { return LOMBOK_VAL_NAME.equals(shortName); }
isPossibleVal
12,919
boolean (@Nullable String fullQualifiedName) { return LombokClassNames.VAL.equals(fullQualifiedName); }
isVal
12,920
boolean (@Nullable String shortName) { return LOMBOK_VAR_NAME.equals(shortName); }
isPossibleVar
12,921
boolean (@Nullable String fullQualifiedName) { return LombokClassNames.VAR.equals(fullQualifiedName) || LombokClassNames.EXPERIMENTAL_VAR.equals(fullQualifiedName); }
isVar
12,922
String (@NotNull PsiTypeElement typeElement) { PsiJavaCodeReferenceElement reference = typeElement.getInnermostComponentReferenceElement(); if (reference == null) { return null; } return reference.getQualifiedName(); }
resolveQualifiedName
12,923
Collection<PsiAnnotation> (@NotNull PsiClass psiClass) { return Collections.emptyList(); }
collectProcessedAnnotations
12,924
Collection<LombokProblem> (@NotNull PsiAnnotation psiAnnotation) { return Collections.emptyList(); }
verifyAnnotation
12,925
void (@NotNull final PsiLocalVariable psiLocalVariable, @NotNull final ProblemsHolder holder) { final PsiTypeElement typeElement = psiLocalVariable.getTypeElement(); final String typeElementText = typeElement.getText(); boolean isVal = isPossibleVal(typeElementText) && isVal(resolveQualifiedName(typeElement)); boolean ...
verifyVariable
12,926
void (@NotNull final PsiParameter psiParameter, @NotNull final ProblemsHolder holder) { final PsiTypeElement typeElement = psiParameter.getTypeElement(); final String typeElementText = null != typeElement ? typeElement.getText() : null; boolean isVal = isPossibleVal(typeElementText) && isVal(resolveQualifiedName(typeEl...
verifyParameter
12,927
boolean (@NotNull PsiTypeElement typeElement) { final PsiElement parent = typeElement.getParent(); return (parent instanceof PsiLocalVariable && isValOrVar((PsiLocalVariable) parent)) || (parent instanceof PsiParameter && isValOrVarForEach((PsiParameter) parent)); }
canInferType
12,928
PsiType (PsiTypeElement typeElement) { PsiType psiType = null; if (canInferType(typeElement)) { final PsiElement parent = typeElement.getParent(); if (parent instanceof PsiLocalVariable) { psiType = processLocalVariableInitializer(((PsiLocalVariable) parent).getInitializer()); } else { psiType = processParameterDeclara...
inferType
12,929
PsiType (final PsiExpression psiExpression) { PsiType result = null; if (null != psiExpression && !(psiExpression instanceof PsiArrayInitializerExpression)) { result = RecursionManager.doPreventingRecursion(psiExpression, true, () -> { PsiType type = psiExpression.getType(); // This is how IntelliJ resolves intersectio...
processLocalVariableInitializer
12,930
PsiType (PsiElement parentDeclarationScope) { PsiType result = null; if (parentDeclarationScope instanceof PsiForeachStatement foreachStatement) { final PsiExpression iteratedValue = foreachStatement.getIteratedValue(); if (iteratedValue != null) { result = JavaGenericsUtil.getCollectionItemType(iteratedValue); } } ret...
processParameterDeclaration
12,931
Collection<Processor> (String key, Supplier<Collection<Processor>> function) { return PROCESSOR_CACHE.computeIfAbsent(key, s -> function.get()); }
getWithCache
12,932
LombokProcessorManager () { return ApplicationManager.getApplication().getService(LombokProcessorManager.class); }
getInstance
12,933
AllArgsConstructorProcessor () { return myAllArgsConstructorProcessor; }
getAllArgsConstructorProcessor
12,934
NoArgsConstructorProcessor () { return myNoArgsConstructorProcessor; }
getNoArgsConstructorProcessor
12,935
RequiredArgsConstructorProcessor () { return myRequiredArgsConstructorProcessor; }
getRequiredArgsConstructorProcessor
12,936
LogProcessor () { return myLogProcessor; }
getLogProcessor
12,937
Log4jProcessor () { return myLog4jProcessor; }
getLog4jProcessor
12,938
Log4j2Processor () { return myLog4j2Processor; }
getLog4j2Processor
12,939
Slf4jProcessor () { return mySlf4jProcessor; }
getSlf4jProcessor
12,940
XSlf4jProcessor () { return myXSlf4jProcessor; }
getXSlf4jProcessor
12,941
CommonsLogProcessor () { return myCommonsLogProcessor; }
getCommonsLogProcessor
12,942
JBossLogProcessor () { return myJBossLogProcessor; }
getJBossLogProcessor
12,943
FloggerProcessor () { return myFloggerProcessor; }
getFloggerProcessor
12,944
CustomLogProcessor () { return myCustomLogProcessor; }
getCustomLogProcessor
12,945
DataProcessor () { return myDataProcessor; }
getDataProcessor
12,946
EqualsAndHashCodeProcessor () { return myEqualsAndHashCodeProcessor; }
getEqualsAndHashCodeProcessor
12,947
GetterProcessor () { return myGetterProcessor; }
getGetterProcessor
12,948
SetterProcessor () { return mySetterProcessor; }
getSetterProcessor
12,949
ToStringProcessor () { return myToStringProcessor; }
getToStringProcessor
12,950
WitherProcessor () { return myWitherProcessor; }
getWitherProcessor
12,951
BuilderPreDefinedInnerClassFieldProcessor () { return myBuilderPreDefinedInnerClassFieldProcessor; }
getBuilderPreDefinedInnerClassFieldProcessor
12,952
BuilderPreDefinedInnerClassMethodProcessor () { return myBuilderPreDefinedInnerClassMethodProcessor; }
getBuilderPreDefinedInnerClassMethodProcessor
12,953
BuilderClassProcessor () { return myBuilderClassProcessor; }
getBuilderClassProcessor
12,954
BuilderProcessor () { return myBuilderProcessor; }
getBuilderProcessor
12,955
BuilderClassMethodProcessor () { return myBuilderClassMethodProcessor; }
getBuilderClassMethodProcessor
12,956
BuilderMethodProcessor () { return myBuilderMethodProcessor; }
getBuilderMethodProcessor
12,957
SuperBuilderPreDefinedInnerClassFieldProcessor () { return mySuperBuilderPreDefinedInnerClassFieldProcessor; }
getSuperBuilderPreDefinedInnerClassFieldProcessor
12,958
SuperBuilderPreDefinedInnerClassMethodProcessor () { return mySuperBuilderPreDefinedInnerClassMethodProcessor; }
getSuperBuilderPreDefinedInnerClassMethodProcessor
12,959
SuperBuilderClassProcessor () { return mySuperBuilderClassProcessor; }
getSuperBuilderClassProcessor
12,960
SuperBuilderProcessor () { return mySuperBuilderProcessor; }
getSuperBuilderProcessor
12,961
ValueProcessor () { return myValueProcessor; }
getValueProcessor
12,962
UtilityClassProcessor () { return myUtilityClassProcessor; }
getUtilityClassProcessor
12,963
StandardExceptionProcessor () { return myStandardExceptionProcessor; }
getStandardExceptionProcessor
12,964
FieldNameConstantsOldProcessor () { return myFieldNameConstantsOldProcessor; }
getFieldNameConstantsOldProcessor
12,965
FieldNameConstantsFieldProcessor () { return myFieldNameConstantsFieldProcessor; }
getFieldNameConstantsFieldProcessor
12,966
FieldNameConstantsProcessor () { return myFieldNameConstantsProcessor; }
getFieldNameConstantsProcessor
12,967
FieldNameConstantsPredefinedInnerClassFieldProcessor () { return myFieldNameConstantsPredefinedInnerClassFieldProcessor; }
getFieldNameConstantsPredefinedInnerClassFieldProcessor
12,968
DelegateFieldProcessor () { return myDelegateFieldProcessor; }
getDelegateFieldProcessor
12,969
GetterFieldProcessor () { return myGetterFieldProcessor; }
getGetterFieldProcessor
12,970
SetterFieldProcessor () { return mySetterFieldProcessor; }
getSetterFieldProcessor
12,971
WitherFieldProcessor () { return myWitherFieldProcessor; }
getWitherFieldProcessor
12,972
DelegateMethodProcessor () { return myDelegateMethodProcessor; }
getDelegateMethodProcessor
12,973
CleanupProcessor () { return myCleanupProcessor; }
getCleanupProcessor
12,974
SynchronizedProcessor () { return mySynchronizedProcessor; }
getSynchronizedProcessor
12,975
JacksonizedProcessor () { return myJacksonizedProcessor; }
getJacksonizedProcessor
12,976
Collection<Processor> () { return Arrays.asList( myAllArgsConstructorProcessor, myNoArgsConstructorProcessor, myRequiredArgsConstructorProcessor, myLogProcessor, myLog4jProcessor, myLog4j2Processor, mySlf4jProcessor, myXSlf4jProcessor, myCommonsLogProcessor, myJBossLogProcessor, myFloggerProcessor, myCustomLogProcessor...
getAllProcessors
12,977
Collection<ModifierProcessor> () { return Arrays.asList(new FieldDefaultsModifierProcessor(), new UtilityClassModifierProcessor(), new ValModifierProcessor(), new ValueModifierProcessor()); }
getLombokModifierProcessors
12,978
Collection<Processor> (@NotNull Class<? extends PsiElement> supportedClass) { LombokProcessorManager manager = getInstance(); return manager.getWithCache("bySupportedClass_" + supportedClass.getName(), () -> ContainerUtil.filter(manager.getAllProcessors(), p -> p.isSupportedClass(supportedClass)) ); }
getProcessors
12,979
Collection<Processor> (@NotNull PsiAnnotation psiAnnotation) { LombokProcessorManager manager = getInstance(); PsiJavaCodeReferenceElement nameReferenceElement = psiAnnotation.getNameReferenceElement(); if (nameReferenceElement == null) { return Collections.emptyList(); } String referenceName = nameReferenceElement.get...
getProcessors
12,980
Collection<PsiAnnotation> (@NotNull PsiClass psiClass) { return Collections.emptyList(); }
collectProcessedAnnotations
12,981
Collection<LombokProblem> (@NotNull PsiAnnotation psiAnnotation) { final ProblemValidationSink validationSink = new ProblemValidationSink(); final PsiModifierListOwner psiModifierListOwner; final PsiMethod psiMethod = PsiTreeUtil.getParentOfType(psiAnnotation, PsiMethod.class); if (null != psiMethod) { psiModifierListO...
verifyAnnotation
12,982
boolean (@NotNull PsiModifierListOwner psiModifierListOwner, ProblemSink validationSink) { final boolean hasBuilder = PsiAnnotationSearchUtil.isAnnotatedWith(psiModifierListOwner, LombokClassNames.BUILDER); final boolean hasSuperBuilder = PsiAnnotationSearchUtil.isAnnotatedWith(psiModifierListOwner, LombokClassNames.SU...
validateAnnotationOwner
12,983
boolean (@NotNull PsiAnnotation psiAnnotation) { return true; }
supportAnnotationVariant
12,984
void (@NotNull Collection<? extends PsiModifierListOwner> definedMethods) { definedMethods.removeIf(definedMethod -> PsiAnnotationSearchUtil.isAnnotatedWith(definedMethod, LombokClassNames.TOLERATE)); }
filterToleratedElements
12,985
boolean (@NotNull PsiAnnotation psiAnnotation, @NotNull PsiClass psiClass, @NotNull String annotationParameter, @NotNull ConfigKey configKey) { final boolean result; final Boolean declaredAnnotationValue = PsiAnnotationUtil.getDeclaredBooleanAnnotationValue(psiAnnotation, annotationParameter); if (null == declaredAnnot...
readAnnotationOrConfigProperty
12,986
LombokPsiElementUsage (@NotNull PsiField psiField, @NotNull PsiAnnotation psiAnnotation) { return LombokPsiElementUsage.NONE; }
checkFieldUsage
12,987
BuilderInfo (@NotNull PsiParameter psiParameter) { final BuilderInfo result = new BuilderInfo(); result.variableInClass = psiParameter; result.fieldInBuilderType = psiParameter.getType(); result.deprecated = hasDeprecatedAnnotation(psiParameter); result.fieldInitializer = null; result.hasBuilderDefaultAnnotation = fals...
fromPsiParameter
12,988
boolean (@NotNull PsiModifierListOwner modifierListOwner) { return PsiAnnotationSearchUtil.isAnnotatedWith(modifierListOwner, Deprecated.class.getName()); }
hasDeprecatedAnnotation
12,989
BuilderInfo (@NotNull PsiField psiField) { final BuilderInfo result = new BuilderInfo(); result.variableInClass = psiField; result.deprecated = isDeprecated(psiField); result.fieldInBuilderType = psiField.getType(); result.fieldInitializer = psiField.getInitializer(); result.hasBuilderDefaultAnnotation = PsiAnnotationS...
fromPsiField
12,990
BuilderInfo (@NotNull PsiRecordComponent psiRecordComponent) { final BuilderInfo result = new BuilderInfo(); result.variableInClass = psiRecordComponent; result.deprecated = hasDeprecatedAnnotation(psiRecordComponent); result.fieldInBuilderType = psiRecordComponent.getType(); result.fieldInitializer = psiRecordComponen...
fromPsiRecordComponent
12,991
boolean (@NotNull PsiField psiField) { return PsiImplUtil.isDeprecatedByDocTag(psiField) || hasDeprecatedAnnotation(psiField); }
isDeprecated
12,992
BuilderInfo (@NotNull PsiSubstitutor builderSubstitutor) { fieldInBuilderType = builderSubstitutor.substitute(fieldInBuilderType); return this; }
withSubstitutor
12,993
BuilderInfo (String visibilityModifier) { this.visibilityModifier = visibilityModifier; return this; }
withVisibilityModifier
12,994
BuilderInfo (String setterPrefix) { this.setterPrefix = setterPrefix; return this; }
withSetterPrefix
12,995
BuilderInfo (@NotNull PsiClass builderClass) { this.builderClass = builderClass; this.builderClassType = PsiClassUtil.getTypeWithGenerics(builderClass); return this; }
withBuilderClass
12,996
BuilderInfo (@NotNull PsiClassType builderClassType) { this.builderClassType = builderClassType; return this; }
withBuilderClassType
12,997
BuilderInfo (@NotNull String builderChainResult) { this.builderChainResult = builderChainResult; return this; }
withBuilderChainResult
12,998
BuilderInfo () { obtainViaAnnotation = PsiAnnotationSearchUtil.findAnnotation(variableInClass, BUILDER_OBTAIN_VIA_ANNOTATION); if (null != obtainViaAnnotation) { viaFieldName = PsiAnnotationUtil.getStringAnnotationValue(obtainViaAnnotation, BUILDER_OBTAIN_VIA_FIELD, ""); viaMethodName = PsiAnnotationUtil.getStringAnnot...
withObtainVia
12,999
boolean () { boolean result = true; PsiModifierList modifierList = variableInClass.getModifierList(); if (null != modifierList) { //Skip static fields. result = !modifierList.hasModifierProperty(PsiModifier.STATIC); // skip initialized final fields unless annotated with @Builder.Default final boolean isInitializedFinal...
useForBuilder