Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
12,700
String () { return value; }
getValue
12,701
boolean () { return stopBubbling; }
isStopBubbling
12,702
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ConfigValue that = (ConfigValue) o; if (stopBubbling != that.stopBubbling) return false; return value != null ? value.equals(that.value) : that.value == null; }
equals
12,703
int () { int result = value != null ? value.hashCode() : 0; result = 31 * result + (stopBubbling ? 1 : 0); return result; }
hashCode
12,704
String () { return "ConfigValue {" + value + ", " + stopBubbling + "}"; }
toString
12,705
String () { return configKey; }
getConfigKey
12,706
String () { return configDefaultValue; }
getConfigDefaultValue
12,707
ConfigKey (String configStringKey) { for (ConfigKey keys : values()) { if (keys.getConfigKey().equalsIgnoreCase(configStringKey)) { return keys; } } return null; }
fromConfigStringKey
12,708
String () { return key; }
getKey
12,709
String () { return nonNullAnnotation; }
getNonNullAnnotation
12,710
String () { return nullableAnnotation; }
getNullableAnnotation
12,711
boolean () { return typeUse; }
isTypeUse
12,712
void (@NotNull List<? extends @NotNull VFileEvent> events) { for (VFileEvent event : events) { VirtualFile eventFile = event.getFile(); if (null != eventFile) { final CharSequence nameSequence = eventFile.getNameSequence(); if (Strings.endsWith(nameSequence, "lombok.config")) { final FileType fileType = FileTypeRegistr...
before
12,713
ConfigDiscovery () { return ApplicationManager.getApplication().getService(ConfigDiscovery.class); }
getInstance
12,714
LombokNullAnnotationLibrary (@NotNull PsiClass psiClass) { final String configProperty = getStringLombokConfigProperty(ConfigKey.ADD_NULL_ANNOTATIONS, psiClass); if (StringUtil.isNotEmpty(configProperty)) { for (LombokNullAnnotationLibraryDefned library : LombokNullAnnotationLibraryDefned.values()) { if (library.getKey...
getAddNullAnnotationLombokConfigProperty
12,715
Collection<String> (@NotNull ConfigKey configKey, @NotNull PsiClass psiClass) { return getConfigProperty(configKey, psiClass); }
getMultipleValueLombokConfigProperty
12,716
String (@NotNull ConfigKey configKey, @NotNull PsiClass psiClass) { Collection<String> result = getConfigProperty(configKey, psiClass); if (!result.isEmpty()) { return result.iterator().next(); } return configKey.getConfigDefaultValue(); }
getStringLombokConfigProperty
12,717
boolean (@NotNull ConfigKey configKey, @NotNull PsiClass psiClass) { final String configProperty = getStringLombokConfigProperty(configKey, psiClass); return Boolean.parseBoolean(configProperty); }
getBooleanLombokConfigProperty
12,718
Collection<String> (@NotNull ConfigKey configKey, @NotNull PsiClass psiClass) { @Nullable PsiFile psiFile = calculatePsiFile(psiClass); if (psiFile != null) { return discoverPropertyWithCache(configKey, psiFile); } return Collections.singletonList(configKey.getConfigDefaultValue()); }
getConfigProperty
12,719
PsiFile (@NotNull PsiClass psiClass) { PsiFile psiFile = psiClass.getContainingFile(); if (psiFile != null) { psiFile = psiFile.getOriginalFile(); } return psiFile; }
calculatePsiFile
12,720
Collection<String> (@NotNull ConfigKey configKey, @NotNull PsiFile psiFile) { return CachedValuesManager.getCachedValue(psiFile, () -> { Map<ConfigKey, Collection<String>> result = ConcurrentFactoryMap.createMap(configKeyInner -> discoverProperty(configKeyInner, psiFile)); return CachedValueProvider.Result.create(resul...
discoverPropertyWithCache
12,721
Collection<String> (@NotNull ConfigKey configKey, @NotNull PsiFile psiFile) { if (configKey.isConfigScalarValue()) { return discoverScalarProperty(configKey, psiFile); } return discoverCollectionProperty(configKey, psiFile); }
discoverProperty
12,722
Collection<String> (@NotNull ConfigKey configKey, @NotNull PsiFile psiFile) { @Nullable VirtualFile currentFile = psiFile.getVirtualFile(); while (currentFile != null) { ConfigValue configValue = readProperty(configKey, psiFile.getProject(), currentFile); if (null != configValue) { if (null == configValue.getValue()) {...
discoverScalarProperty
12,723
FileBasedIndex () { return FileBasedIndex.getInstance(); }
getFileBasedIndex
12,724
ConfigValue (@NotNull ConfigKey configKey, @NotNull Project project, @NotNull VirtualFile directory) { GlobalSearchScope directoryScope = GlobalSearchScopes.directoryScope(project, directory, false); List<ConfigValue> values = getFileBasedIndex().getValues(LombokConfigIndex.NAME, configKey, directoryScope); if (!values...
readProperty
12,725
Collection<String> (@NotNull ConfigKey configKey, @NotNull PsiFile file) { List<String> properties = new ArrayList<>(); final Project project = file.getProject(); @Nullable VirtualFile currentFile = file.getVirtualFile(); while (currentFile != null) { final ConfigValue configValue = readProperty(configKey, project, cur...
discoverCollectionProperty
12,726
KeyDescriptor<ConfigKey> () { return new EnumDataDescriptor<>(ConfigKey.class); }
getKeyDescriptor
12,727
DataExternalizer<ConfigValue> () { return new DataExternalizer<>() { @Override public void save(@NotNull DataOutput out, ConfigValue configValue) throws IOException { var isNotNullValue = configValue.getValue() != null; out.writeBoolean(isNotNullValue); if (isNotNullValue) { EnumeratorStringDescriptor.INSTANCE.save(out...
getValueExternalizer
12,728
boolean () { return true; }
dependsOnFileContent
12,729
int () { return 14; }
getVersion
12,730
String () { return nonNullAnnotation; }
getNonNullAnnotation
12,731
String () { return nullableAnnotation; }
getNullableAnnotation
12,732
boolean () { return typeUse; }
isTypeUse
12,733
LombokNullAnnotationLibrary (String value) { if (StringUtil.toLowerCase(value).startsWith("custom:")) { String customConfigValue = value.substring("custom:".length()); final boolean useType = StringUtil.toLowerCase(customConfigValue).startsWith("type_use:"); if (useType) { customConfigValue = customConfigValue.substrin...
parseCustom
12,734
boolean (String fqn) { boolean atStart = true; for (int i = 0; i < fqn.length(); i++) { char c = fqn.charAt(i); if (Character.isJavaIdentifierStart(c)) { atStart = false; continue; } if (atStart) return false; if (c == '.') { atStart = true; continue; } if (Character.isJavaIdentifierPart(c)) continue; return false; } r...
verifyTypeName
12,735
void (@NotNull ActionContext context, @NotNull PsiClass psiClass, @NotNull ModPsiUpdater updater) { final PsiModifierList modifiers = psiClass.getModifierList(); if (modifiers != null) { modifiers.setModifierProperty(PsiModifier.ABSTRACT, true); modifiers.setModifierProperty(PsiModifier.STATIC, true); } }
invoke
12,736
String () { return LombokBundle.message("make.abstract.and.static.modifier.quickfix.family.name"); }
getFamilyName
12,737
void (@NotNull ActionContext context, @NotNull PsiClass element, @NotNull ModPsiUpdater updater) { final PsiField field = elementToRemove.getElement(); if (field != null) { final Collection<PsiReference> all = ReferencesSearch.search(field).findAll(); List<PsiElement> refs = ContainerUtil.map(all, ref -> updater.getWri...
invoke
12,738
String () { return LombokBundle.message("intention.family.name.slf4j.annotation"); }
getFamilyName
12,739
String () { return LombokBundle.message("intention.name.create.new.field.s", myName); }
getFamilyName
12,740
void (@NotNull ActionContext context, @NotNull PsiClass myClass, @NotNull ModPsiUpdater updater) { PsiElement lBrace = myClass.getLBrace(); if (lBrace == null) return; final PsiElementFactory psiElementFactory = JavaPsiFacade.getElementFactory(context.project()); final PsiField psiField = psiElementFactory.createField(...
invoke
12,741
LocalQuickFix (@NotNull PsiClass psiClass, @NotNull String annotationFQN, @Nullable String annotationParam) { PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(psiClass.getProject()); PsiAnnotation newAnnotation = elementFactory.createAnnotationFromText("@" + annotationFQN + "(" + StringUtil.notNullize...
createAddAnnotationQuickFix
12,742
LocalQuickFix (@NotNull PsiModifierListOwner owner, @NotNull String modifier, boolean shouldHave, final boolean showContainingClass) { return LocalQuickFix.from(new ModifierFix(owner, modifier, shouldHave, showContainingClass)); }
createModifierListFix
12,743
LocalQuickFix (@NotNull PsiClass psiClass, @NotNull String name, @NotNull PsiType psiType, @Nullable String initializerText, String... modifiers) { return LocalQuickFix.from(new CreateFieldQuickFix(psiClass, name, psiType, initializerText, modifiers)); }
createNewFieldFix
12,744
LocalQuickFix (@NotNull PsiAnnotation psiAnnotation, @NotNull String name, @Nullable String newValue) { return LocalQuickFix.from(new ChangeAnnotationParameterQuickFix(psiAnnotation, name, newValue)); }
createChangeAnnotationParameterFix
12,745
PsiElementVisitor (@NotNull final ProblemsHolder holder, final boolean isOnTheFly) { return new LombokElementVisitor(holder); }
createVisitor
12,746
void (final @NotNull PsiAnnotation annotation) { if (annotation.hasQualifiedName(SPRING_QUALIFIER_FQN)) { PsiAnnotationOwner annotationOwner = annotation.getOwner(); if (annotationOwner instanceof PsiModifierList) { PsiElement annotationOwnerParent = ((PsiModifierList)annotationOwner).getParent(); if (annotationOwnerPa...
visitAnnotation
12,747
String () { return "param"; }
getTagName
12,748
String () { return "SETTER"; }
getJavaDocMethodMarkup
12,749
boolean ( @NotNull PsiMethod method, @NotNull List<Pair<PsiField, PsiMethod>> instanceCandidates, @NotNull List<Pair<PsiField, PsiMethod>> staticCandidates ) { if (!method.hasModifierProperty(PsiModifier.PUBLIC) || method.isConstructor() || !method.hasParameters() || method.getParameterList().getParameters().length != ...
processMethod
12,750
PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { Module module = ModuleUtilCore.findModuleForFile(holder.getFile()); if (!LombokLibraryUtil.hasLombokClasses(module)) { return PsiElementVisitor.EMPTY_VISITOR; } return createVisitor(holder, isOnTheFly); }
buildVisitor
12,751
PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { return new LombokDefinitionVisitor(holder); }
createVisitor
12,752
void (@NotNull PsiField field) { super.visitField(field); findRedundantDefinition(field, field.getContainingClass()); }
visitField
12,753
void (@NotNull PsiField field, PsiClass containingClass) { if (field.getType().equalsToText(LOGGER_SLF4J_FQCN)) { final PsiExpression initializer = field.getInitializer(); if (initializer != null && containingClass != null) { if (initializer.getText().contains(format(LOGGER_INITIALIZATION, containingClass.getQualifiedN...
findRedundantDefinition
12,754
String () { return "return"; }
getTagName
12,755
String () { return "GETTER"; }
getJavaDocMethodMarkup
12,756
boolean ( @NotNull PsiMethod method, @NotNull List<Pair<PsiField, PsiMethod>> instanceCandidates, @NotNull List<Pair<PsiField, PsiMethod>> staticCandidates ) { final PsiType returnType = method.getReturnType(); if (!method.hasModifierProperty(PsiModifier.PUBLIC) || method.isConstructor() || method.hasParameters() || me...
processMethod
12,757
PsiElementVisitor (@NotNull final ProblemsHolder holder, final boolean isOnTheFly) { return new LombokGetterOrSetterMayBeUsedVisitor(holder, null); }
createVisitor
12,758
void (@NotNull PsiJavaFile psiJavaFile) { }
visitJavaFile
12,759
void (@NotNull PsiClass psiClass) { List<PsiField> annotatedFields = new ArrayList<>(); List<Pair<PsiField, PsiMethod>> instanceCandidates = new ArrayList<>(); List<Pair<PsiField, PsiMethod>> staticCandidates = new ArrayList<>(); for (PsiMethod method : psiClass.getMethods()) { processMethod(method, instanceCandidates,...
visitClass
12,760
void (@NotNull PsiMethod psiMethod) { List<Pair<PsiField, PsiMethod>> fieldsAndMethods = new ArrayList<>(); if (!processMethod(psiMethod, fieldsAndMethods, fieldsAndMethods)) return; if (!fieldsAndMethods.isEmpty()) { final Pair<PsiField, PsiMethod> psiFieldPsiMethodPair = fieldsAndMethods.get(0); warnOrFix(psiFieldPsi...
visitMethodForFix
12,761
void ( @NotNull PsiClass psiClass, @NotNull List<Pair<PsiField, PsiMethod>> fieldsAndMethods, @NotNull List<PsiField> annotatedFields ) { if (myHolder != null) { String className = psiClass.getName(); final PsiIdentifier psiClassNameIdentifier = psiClass.getNameIdentifier(); final LocalQuickFix fix = new LombokGetterOr...
warnOrFix
12,762
void (@NotNull PsiField field, @NotNull PsiMethod method) { if (myHolder != null) { String fieldName = field.getName(); final LocalQuickFix fix = new LombokGetterOrSetterMayBeUsedFix(fieldName); myHolder.registerProblem(method, getFieldErrorMessage(fieldName), fix); } else if (myLombokGetterOrSetterMayBeUsedFix != null...
warnOrFix
12,763
String () { return getFixName(myText); }
getName
12,764
String () { return getFixFamilyName(); }
getFamilyName
12,765
void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { if (element instanceof PsiMethod) { new LombokGetterOrSetterMayBeUsedVisitor(null, this).visitMethodForFix((PsiMethod)element); } else if (element instanceof PsiClass) { new LombokGetterOrSetterMayBeUsedVisitor(null, this).vi...
applyFix
12,766
void (@NotNull PsiField field, @NotNull PsiMethod method) { if (!addLombokAnnotation(field)) return; removeMethodAndMoveJavaDoc(field, method); }
effectivelyDoFix
12,767
void (@NotNull PsiClass aClass, @NotNull List<Pair<PsiField, PsiMethod>> fieldsAndMethods, @NotNull List<PsiField> annotatedFields) { if (!addLombokAnnotation(aClass)) return; for (Pair<PsiField, PsiMethod> fieldAndMethod : fieldsAndMethods) { PsiField field = fieldAndMethod.getFirst(); PsiMethod method = fieldAndMetho...
effectivelyDoFix
12,768
boolean (@NotNull PsiModifierListOwner fieldOrClass) { final PsiModifierList modifierList = fieldOrClass.getModifierList(); if (modifierList == null) { return false; } Project project = fieldOrClass.getProject(); final PsiElementFactory factory = JavaPsiFacade.getElementFactory(project); final PsiAnnotation annotation ...
addLombokAnnotation
12,769
void (@NotNull PsiField field, @NotNull PsiMethod method) { final PsiElementFactory factory = JavaPsiFacade.getElementFactory(field.getProject()); CommentTracker tracker = new CommentTracker(); PsiDocComment methodJavaDoc = method.getDocComment(); if (methodJavaDoc != null) { tracker.text(methodJavaDoc); PsiDocComment ...
removeMethodAndMoveJavaDoc
12,770
PsiElementVisitor (@NotNull final ProblemsHolder holder, final boolean isOnTheFly) { return new LombokElementVisitor(holder); }
createVisitor
12,771
void (final @NotNull PsiAnnotation annotation) { checkFor("lombok.experimental.Builder", LombokClassNames.BUILDER, annotation); checkFor("lombok.experimental.Value", LombokClassNames.VALUE, annotation); checkFor("lombok.experimental.Wither", LombokClassNames.WITH, annotation); }
visitAnnotation
12,772
void (String deprecatedAnnotationFQN, String newAnnotationFQN, PsiAnnotation psiAnnotation) { if (psiAnnotation.hasQualifiedName(deprecatedAnnotationFQN)) { final PsiModifierListOwner listOwner = PsiTreeUtil.getParentOfType(psiAnnotation, PsiModifierListOwner.class, false); if (null != listOwner) { holder.registerProbl...
checkFor
12,773
PsiElementVisitor (@NotNull final ProblemsHolder holder, final boolean isOnTheFly) { return new LombokElementVisitor(holder); }
createVisitor
12,774
void (@NotNull PsiLocalVariable variable) { super.visitLocalVariable(variable); valProcessor.verifyVariable(variable, holder); }
visitLocalVariable
12,775
void (@NotNull PsiParameter parameter) { super.visitParameter(parameter); valProcessor.verifyParameter(parameter, holder); }
visitParameter
12,776
void (@NotNull PsiAnnotation annotation) { super.visitAnnotation(annotation); final Collection<LombokProblem> problems = new HashSet<>(); for (Processor inspector : LombokProcessorManager.getProcessors(annotation)) { problems.addAll(inspector.verifyAnnotation(annotation)); } for (LombokProblem problem : problems) { hol...
visitAnnotation
12,777
void (@NotNull PsiMethodCallExpression methodCall) { super.visitMethodCallExpression(methodCall); PsiExpressionList list = methodCall.getArgumentList(); PsiReferenceExpression referenceToMethod = methodCall.getMethodExpression(); boolean isThisOrSuper = referenceToMethod.getReferenceNameElement() instanceof PsiKeyword;...
visitMethodCallExpression
12,778
boolean (PsiModifierListOwner psiModifierListOwner) { PsiVariable psiVariable = (PsiVariable) psiModifierListOwner; return ValProcessor.isVal(psiVariable); }
shouldCheck
12,779
PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { return new LombokRedundantModifiersVisitor(holder); }
createVisitor
12,780
void (@NotNull PsiClass aClass) { super.visitClass(aClass); this.visit(aClass); }
visitClass
12,781
void (@NotNull PsiField field) { super.visitField(field); this.visit(field); }
visitField
12,782
void (@NotNull PsiMethod method) { super.visitMethod(method); this.visit(method); }
visitMethod
12,783
void (@NotNull PsiLocalVariable variable) { super.visitLocalVariable(variable); this.visit(variable); }
visitLocalVariable
12,784
void (@NotNull PsiParameter parameter) { super.visitParameter(parameter); this.visit(parameter); }
visitParameter
12,785
void (PsiModifierListOwner psiModifierListOwner) { for (RedundantModifiersInfo redundantModifiersInfo : redundantModifiersInfo) { RedundantModifiersInfoType infoType = redundantModifiersInfo.getType(); PsiModifierListOwner parentModifierListOwner = PsiTreeUtil.getParentOfType(psiModifierListOwner, PsiModifierListOwner....
visit
12,786
String[] () { return modifiers; }
getModifiers
12,787
String () { return description; }
getDescription
12,788
String () { return dontRunOnModifier; }
getDontRunOnModifier
12,789
RedundantModifiersInfoType () { return redundantModifiersInfoType; }
getType
12,790
boolean (PsiModifierListOwner psiModifierListOwner) { return true; }
shouldCheck
12,791
PsiExpressionList () { return null; }
getArgumentList
12,792
PsiEnumConstantInitializer () { return null; }
getInitializingClass
12,793
PsiEnumConstantInitializer () { final PsiElementFactory factory = JavaPsiFacade.getElementFactory(getProject()); return factory.createEnumConstantFromText("foo{}", null).getInitializingClass(); }
getOrCreateInitializingClass
12,794
PsiMethod () { return null; }
resolveMethod
12,795
JavaResolveResult () { return JavaResolveResult.EMPTY; }
resolveMethodGenerics
12,796
PsiMethod () { return null; }
resolveConstructor
12,797
LombokLightModifierList () { return myModifierList; }
getModifierList
12,798
PsiElement () { if (getContainingClass() != null) { return getContainingClass().getScope(); } return super.getScope(); }
getScope
12,799
PsiElement () { return getContainingClass(); }
getParent