Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
77,000
String (@Nullable String name) { if (StringUtil.isEmptyOrSpaces(name)) { return null; } for (String[] stringArray : myPropertyNames) { if (stringArray[0].equals(name)) { return stringArray.length > 1 ? stringArray[1] : stringArray[0]; } } return null; }
getPropertyDescription
77,001
boolean (@NotNull PsiElement psiElement) { PsiElement parentElement = psiElement.getParent(); if (parentElement instanceof PsiConditionalExpression) return true; PsiPolyadicExpression parentExpr = ObjectUtils.tryCast(parentElement, PsiPolyadicExpression.class); return parentExpr != null && parentExpr.getParent() instan...
belongsToConditionalExpression
77,002
PsiExpressionCodeFragment (@NotNull final String text, @Nullable final PsiElement context, @Nullable final PsiType expectedType, final boolean isPhysical) { return new PsiExpressionCodeFragmentImpl(myProject, isPhysical, "fragment.java", text, expectedType, context); }
createExpressionCodeFragment
77,003
JavaCodeFragment (@NotNull final String text, @Nullable final PsiElement context, final boolean isPhysical) { return new PsiCodeFragmentImpl(myProject, JavaElementType.STATEMENTS, isPhysical, "fragment.java", text, context); }
createCodeBlockCodeFragment
77,004
PsiTypeCodeFragment (@NotNull final String text, @Nullable final PsiElement context, final boolean isPhysical) { return createTypeCodeFragment(text, context, isPhysical, 0); }
createTypeCodeFragment
77,005
PsiTypeCodeFragment (@NotNull final String text, @Nullable final PsiElement context, final boolean isPhysical, final int flags) { return new PsiTypeCodeFragmentImpl(myProject, isPhysical, "fragment.java", text, flags, context); }
createTypeCodeFragment
77,006
PsiJavaCodeReferenceCodeFragment (@NotNull final String text, @Nullable final PsiElement context, final boolean isPhysical, final boolean isClassesAccepted) { return new PsiJavaCodeReferenceCodeFragmentImpl(myProject, isPhysical, "fragment.java", text, isClassesAccepted, context); }
createReferenceCodeFragment
77,007
JavaCodeFragment (@NotNull String text, @Nullable PsiElement context, boolean isPhysical) { return new PsiCodeFragmentImpl(myProject, JavaElementType.MEMBERS, isPhysical, "fragment.java", text, context); }
createMemberCodeFragment
77,008
JVMElementFactory (Project project) { return JavaPsiFacade.getElementFactory(project); }
getFactory
77,009
PsiReferenceProvider () { return myProvider; }
getClassReferenceProvider
77,010
Lexer (@NotNull final PsiFile file) { if (file instanceof PsiJavaFile && !(file instanceof JspFile)) { return JavaParserDefinition.createLexer(((PsiJavaFile)file).getLanguageLevel()); } return null; }
getIndexingLexer
77,011
TokenSet (@NotNull final PsiFile file) { if (file instanceof PsiJavaFile && !(file instanceof ServerPageFile)) { return TokenSet.orSet(StdTokenSets.COMMENT_BIT_SET, XML_COMMENT_BIT_SET, JavaDocTokenType.ALL_JAVADOC_TOKENS, XML_DATA_CHARS); } return null; }
getCommentTokenSet
77,012
int (final IElementType tokenType) { return tokenType == JavaTokenType.END_OF_LINE_COMMENT || tokenType == JavaTokenType.C_STYLE_COMMENT ? 2 : tokenType == JavaDocElementType.DOC_COMMENT ? 3 : 0; }
getCommentStartDelta
77,013
int (final IElementType tokenType) { return tokenType == JavaTokenType.C_STYLE_COMMENT || tokenType == JavaDocElementType.DOC_COMMENT ? 2 : 0; }
getCommentEndDelta
77,014
String (@NotNull IElementType tokenType) { return tokenType == JavaTokenType.C_STYLE_COMMENT || tokenType == JavaDocElementType.DOC_COMMENT ? "*" : ""; }
getCharsAllowedInContinuationPrefix
77,015
SearchScope (@NotNull final Project project) { return GlobalSearchScope.getScopeRestrictedByFileTypes(GlobalSearchScope.allScope(project), StdFileTypes.JSP, StdFileTypes.JSPX, XmlFileType.INSTANCE, XHtmlFileType.INSTANCE); }
getScope
77,016
void (@NotNull ImplicitToStringSearch.SearchParameters parameters, @NotNull Processor<? super PsiExpression> consumer) { PsiMethod targetMethod = parameters.getTargetMethod(); Project project = PsiUtilCore.getProjectInReadAction(targetMethod); PsiClass aClass = ReadAction.compute(() -> targetMethod.getContainingClass()...
processQuery
77,017
boolean (VirtualFile file, int[] offsets, PsiManager manager, PsiMethod targetMethod, Processor<? super PsiExpression> consumer, DumbService dumbService) { return dumbService.runReadActionInSmartMode(() -> { PsiFile psiFile = Objects.requireNonNull(manager.findFile(file)); if (!(psiFile instanceof PsiJavaFile)) { LOG.e...
processFile
77,018
boolean (@NotNull PsiExpression expr, @NotNull Processor<? super PsiExpression> consumer, @NotNull PsiMethod targetMethod) { PsiType type = expr.getType(); if (type instanceof PsiPrimitiveType) { type = ((PsiPrimitiveType)type).getBoxedType(expr); } PsiClass aClass = PsiUtil.resolveClassInClassTypeOnly(type); if (aClas...
processPolyadicExprOperand
77,019
PsiMethod () { return myMethod; }
getMethod
77,020
PsiElement () { return myMethod; }
getNavigationElement
77,021
PsiManager () { return myMethod.getManager(); }
getManager
77,022
PsiElement () { return this; }
getDeclaration
77,023
String () { return myName; }
getName
77,024
void (PsiElement element) { }
init
77,025
PsiElement () { return myMethod; }
getParent
77,026
String () { return JavaBundle.message("bean.property"); }
getTypeName
77,027
TextRange () { return TextRange.from(0, 0); }
getTextRange
77,028
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; BeanPropertyElement element = (BeanPropertyElement)o; if (!myMethod.equals(element.myMethod)) return false; if (!myName.equals(element.myName)) return false; return true; }
equals
77,029
int () { int result = myMethod.hashCode(); result = 31 * result + myName.hashCode(); return result; }
hashCode
77,030
LocalQuickFix[] (String propertyName, @NotNull @JvmCommon PsiClass psiClass, @Nullable PsiType type, final boolean createSetter) { return IntentionWrapper.wrapToQuickFixes(createActions(propertyName, psiClass, type, createSetter), psiClass.getContainingFile()); }
createFixes
77,031
IntentionAction[] (String propertyName, @NotNull @JvmCommon PsiClass psiClass, @Nullable PsiType type, final boolean createSetter) { if (psiClass instanceof PsiCompiledElement) return IntentionAction.EMPTY_ARRAY; final Project project = psiClass.getProject(); if (type == null) { type = JavaPsiFacade.getElementFactory(p...
createActions
77,032
PsiNamedElement () { return new BeanPropertyElement(myMethod, getName()) { @Override public PsiType getPropertyType() { return BeanProperty.this.getPropertyType(); } }; }
getPsiElement
77,033
PsiType () { return BeanProperty.this.getPropertyType(); }
getPropertyType
77,034
String () { final String name = PropertyUtilBase.getPropertyName(myMethod, myAcceptBoxedBooleanIsPrefix); return name == null ? "" : name; }
getName
77,035
PsiType () { PsiType type; if (PropertyUtilBase.isSimplePropertyGetter(myMethod, myAcceptBoxedBooleanIsPrefix)) { type = myMethod.getReturnType(); } else if (PropertyUtilBase.isSimplePropertySetter(myMethod)) { type = myMethod.getParameterList().getParameters()[0].getType(); } else { type = null; } assert type != null;...
getPropertyType
77,036
PsiMethod () { return myMethod; }
getMethod
77,037
Icon (int flags) { return IconManager.getInstance().getPlatformIcon(PlatformIcons.Property); }
getIcon
77,038
PsiExpression () { ASTNode exprChild = calcTreeElement().findChildByType(ElementType.EXPRESSION_BIT_SET); if (exprChild == null) return null; return (PsiExpression)SourceTreeToPsiMap.treeElementToPsi(exprChild); }
getExpression
77,039
PsiType () { PsiType type = myExpectedType; if (type != null && !type.isValid()) { return null; } return type; }
getExpectedType
77,040
void (@Nullable PsiType type) { myExpectedType = type; if (type != null) { LOG.assertTrue(type.isValid()); } }
setExpectedType
77,041
void (@NotNull PsiErrorElement element) { throw new MyTypeSyntaxException(element); }
visitErrorElement
77,042
boolean () { return getOriginalFile().getUserData(PsiUtil.VALID_VOID_TYPE_IN_CODE_FRAGMENT) != null; }
isVoidValid
77,043
PsiJavaCodeReferenceElement () { final CompositeElement treeElement = calcTreeElement(); LOG.assertTrue (treeElement.getFirstChildNode().getElementType() == JavaElementType.JAVA_CODE_REFERENCE); return (PsiJavaCodeReferenceElement)SourceTreeToPsiMap.treeElementToPsi(treeElement.getFirstChildNode()); }
getReferenceElement
77,044
boolean () { return myIsClassesAccepted; }
isClassesAccepted
77,045
Language () { return getContentElementType().getLanguage(); }
getLanguage
77,046
PsiCodeFragmentImpl () { final PsiCodeFragmentImpl clone = (PsiCodeFragmentImpl)cloneImpl((FileElement)calcTreeElement().clone()); clone.myPhysical = false; clone.myOriginalFile = this; clone.myPseudoImports = new LinkedHashMap<>(myPseudoImports); FileManager fileManager = ((PsiManagerEx)getManager()).getFileManager();...
clone
77,047
FileViewProvider () { if (myViewProvider != null) return myViewProvider; return super.getViewProvider(); }
getViewProvider
77,048
FileType () { return JavaFileType.INSTANCE; }
getFileType
77,049
PsiElement () { return myContext != null && myContext.isValid() ? myContext : super.getContext(); }
getContext
77,050
PsiType () { return myThisType; }
getThisType
77,051
void (PsiType psiType) { myThisType = psiType; }
setThisType
77,052
PsiType () { return mySuperType; }
getSuperType
77,053
void (final PsiType superType) { mySuperType = superType; }
setSuperType
77,054
String () { return StringUtil.join(myPseudoImports.values(), ","); }
importsToString
77,055
void (String imports) { StringTokenizer tokenizer = new StringTokenizer(imports, ","); while (tokenizer.hasMoreTokens()) { String qName = tokenizer.nextToken(); String name = PsiNameHelper.getShortClassName(qName); myPseudoImports.put(name, qName); } }
addImportsFromString
77,056
void (VisibilityChecker checker) { myVisibilityChecker = checker; }
setVisibilityChecker
77,057
VisibilityChecker () { return myVisibilityChecker; }
getVisibilityChecker
77,058
boolean () { return myPhysical; }
isPhysical
77,059
void (@NotNull PsiElementVisitor visitor) { if (visitor instanceof JavaElementVisitor) { ((JavaElementVisitor)visitor).visitCodeFragment(this); } else { visitor.visitFile(this); } }
accept
77,060
boolean (@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, PsiElement lastParent, @NotNull PsiElement place) { final ElementClassHint classHint = processor.getHint(ElementClassHint.KEY); if (classHint == null || classHint.shouldProcess(ElementClassHint.DeclarationKind.CLASS)) { final NameHint nameHint ...
processDeclarations
77,061
String () { return "PsiCodeFragment:" + getName(); }
toString
77,062
boolean (@NotNull PsiClass aClass) { final String className = aClass.getName(); final String qName = aClass.getQualifiedName(); if (qName == null) return false; //if (!myPseudoImports.containsKey(className)){ myPseudoImports.put(className, qName); myManager.beforeChange(false); // to clear resolve caches! if (isPhysica...
importClass
77,063
void () { myPseudoImports.remove(myClassName); }
undo
77,064
void () { myPseudoImports.put(myClassName, myQName); }
redo
77,065
ExceptionHandler () { return myExceptionHandler; }
getExceptionHandler
77,066
void (@NotNull final IntentionActionsFilter filter) { myIntentionActionsFilter = filter; }
setIntentionActionsFilter
77,067
IntentionActionsFilter () { return myIntentionActionsFilter; }
getIntentionActionsFilter
77,068
void (GlobalSearchScope scope) { myResolveScope = scope; }
forceResolveScope
77,069
GlobalSearchScope () { return myResolveScope; }
getForcedResolveScope
77,070
GlobalSearchScope () { if (myResolveScope != null) return myResolveScope; return super.getResolveScope(); }
getResolveScope
77,071
void (final ExceptionHandler exceptionHandler) { myExceptionHandler = exceptionHandler; }
setExceptionHandler
77,072
PsiType (PsiCallExpression methodCall) { ExpectedTypeInfo expectedType = ExpectedTypesProvider.getSingleExpectedTypeForCompletion(methodCall); return expectedType == null ? (PsiPrimitiveType)PsiTypes.nullType() : expectedType.getType(); }
getDefaultExpectedType
77,073
boolean () { return false; }
inferRuntimeExceptionForThrownBoundWithNoConstraints
77,074
PsiType (PsiManager manager, PsiType guess, ConstraintType constraintType) { if (guess != null && !(guess instanceof PsiWildcardType) && guess != PsiTypes.nullType()) { if (constraintType == ConstraintType.SUPERTYPE) return PsiWildcardType.createExtends(manager, guess); else if (constraintType == ConstraintType.SUBTYPE...
adjustInferredType
77,075
boolean () { return true; }
isVarargsIgnored
77,076
boolean () { return true; }
inferLowerBoundForFreshVariables
77,077
boolean () { return true; }
requestForBoxingExplicitly
77,078
boolean (@NotNull PsiElement element) { return false; }
isImplicitUsage
77,079
boolean (@NotNull PsiElement element) { return false; }
isImplicitRead
77,080
boolean (@NotNull PsiElement element) { if (element instanceof PsiField field && field.hasModifierProperty(PsiModifier.VOLATILE)) { return CachedValuesManager.getCachedValue(field, () -> new CachedValueProvider.Result<>(isAtomicWrite(field), PsiModificationTracker.MODIFICATION_COUNT)); } return false; }
isImplicitWrite
77,081
boolean (@NotNull PsiField field) { PsiType type = field.getType(); if (PsiTypes.intType().equals(type)) { return isAtomicWrite(field, ATOMIC_INTEGER_FIELD_UPDATER); } if (PsiTypes.longType().equals(type)) { return isAtomicWrite(field, ATOMIC_LONG_FIELD_UPDATER); } if (!(type instanceof PsiPrimitiveType)) { return isAt...
isAtomicWrite
77,082
boolean (@NotNull PsiField field, @NonNls String updaterName) { SearchScope scope = getCheapSearchScope(field); if (scope == null) { return false; } Query<PsiReference> fieldQuery = ReferencesSearch.search(field, scope); return !fieldQuery.forEach((PsiReference reference) -> findAtomicUpdaters(reference, updaterName));...
isAtomicWrite
77,083
boolean (@NotNull PsiReference reference, @NotNull String updaterName) { if (!(reference instanceof JavaLangClassMemberReference)) { // optimization return true; } PsiMethodCallExpression methodCall = PsiTreeUtil.getParentOfType(reference.getElement(), PsiMethodCallExpression.class); if (methodCall == null || !isCallTo...
findAtomicUpdaters
77,084
boolean (@NotNull PsiReference reference) { PsiElement element = reference.getElement(); PsiReferenceExpression methodExpression = ObjectUtils.tryCast(skipParenthesizedExprUp(element.getParent()), PsiReferenceExpression.class); if (methodExpression != null && (methodExpression instanceof PsiMethodReferenceExpression ||...
findWrites
77,085
SearchScope (@NotNull PsiField field) { SearchScope scope = field.getUseScope(); if (scope instanceof LocalSearchScope) { return scope; } String name = field.getName(); Project project = field.getProject(); PsiSearchHelper searchHelper = PsiSearchHelper.getInstance(project); if (scope instanceof GlobalSearchScope && se...
getCheapSearchScope
77,086
ElementPattern<PsiElement> (ElementPattern<? extends PsiElement> argumentsPattern) { return psiElement().afterLeaf("(").withParent( or(psiExpression().withParent(argumentsPattern), psiElement().withParent(PsiTypeElement.class) // special case for getConstructor(int.class) because 'int' is a keyword .withSuperParent(2, ...
beginningOfArguments
77,087
void (@NotNull CompletionParameters parameters, @NotNull CompletionResultSet result) { if (parameters.getCompletionType() != CompletionType.BASIC) { return; } final PsiElement position = parameters.getPosition(); if (!isInJavaContext(position)) { return; } if (BEGINNING_OF_ANNOTATION_ARGUMENTS.accepts(position)) { addV...
fillCompletionVariants
77,088
void (PsiElement position, BiConsumer<? super PsiClass, ? super Boolean> variantAdder) { PsiMethodCallExpression methodCall = PsiTreeUtil.getParentOfType(position, PsiMethodCallExpression.class); if (methodCall != null) { ReflectiveClass ownerClass = getReflectiveClass(methodCall.getMethodExpression().getQualifierExpre...
addVariants
77,089
void (@NotNull PsiClass psiClass, boolean isDeclared, @NotNull CompletionResultSet result) { Set<PsiAnnotation> declaredAnnotations = isDeclared ? ContainerUtil.immutableSet(AnnotationUtil.getAllAnnotations(psiClass, false, null, false)) : null; PsiAnnotation[] annotations = AnnotationUtil.getAllAnnotations(psiClass, t...
addAnnotationClasses
77,090
void (@NotNull PsiClass psiClass, boolean isDeclared, @NotNull CompletionResultSet result) { PsiMethod[] constructors = psiClass.getConstructors(); for (PsiMethod constructor : constructors) { LookupElement lookupElement = JavaLookupElementBuilder.forMethod(constructor, PsiSubstitutor.EMPTY) .withInsertHandler(JavaRefl...
addConstructorParameterTypes
77,091
void (@NotNull InsertionContext context, @NotNull LookupElement item) { Object object = item.getObject(); if (object instanceof PsiClass) { String className = ((PsiClass)object).getQualifiedName(); if (className != null) { handleParametersInsertion(context, className + ".class"); } } }
handleAnnotationClassInsertion
77,092
void (@NotNull InsertionContext context, @NotNull LookupElement item) { Object object = item.getObject(); if (object instanceof PsiMethod) { String text = getParameterTypesText((PsiMethod)object); if (text != null) { handleParametersInsertion(context, text); } } }
handleConstructorSignatureInsertion
77,093
void (@NotNull InsertionContext context, @NotNull String text) { PsiElement newElement = PsiUtilCore.getElementAtOffset(context.getFile(), context.getStartOffset()); PsiExpressionList parameterList = PsiTreeUtil.getParentOfType(newElement, PsiExpressionList.class); if (parameterList != null) { final TextRange range = p...
handleParametersInsertion
77,094
boolean (@NotNull PsiMethod method, ProcessingContext context) { PsiClass containingClass = method.getContainingClass(); return InheritanceUtil.isInheritor(containingClass, false, myInterfaceName); }
accepts
77,095
PsiMethodPattern (String... methodNames) { return psiMethod().withName(methodNames).definedInClass(JAVA_LANG_INVOKE_METHOD_HANDLES_LOOKUP); }
methodPattern
77,096
void (@NotNull CompletionParameters parameters, @NotNull CompletionResultSet result) { final PsiElement position = parameters.getPosition(); if (!isInJavaContext(position)) { return; } if (METHOD_TYPE_ARGUMENT_PATTERN.accepts(position)) { addMethodHandleVariants(position, result); } else if (FIELD_TYPE_ARGUMENT_PATTERN...
fillCompletionVariants
77,097
void (@NotNull PsiElement position, @NotNull Consumer<? super LookupElement> result) { final PsiMethodCallExpression methodCall = PsiTreeUtil.getParentOfType(position, PsiMethodCallExpression.class); if (methodCall != null) { final String methodName = methodCall.getMethodExpression().getReferenceName(); if (methodName ...
addMethodHandleVariants
77,098
void (@NotNull ReflectiveClass ownerClass, @NotNull PsiElement context, @NotNull Consumer<? super LookupElement> result) { final PsiMethod[] constructors = ownerClass.getPsiClass().getConstructors(); if (constructors.length != 0) { lookupMethodTypes(Arrays.stream(constructors), context, result); } else { result.consume...
addConstructorSignatures
77,099
void (@NotNull ReflectiveClass psiClass, @NotNull String methodName, boolean isStaticExpected, @NotNull PsiElement context, @NotNull Consumer<? super LookupElement> result) { final PsiMethod[] methods = psiClass.getPsiClass().findMethodsByName(methodName, false); if (methods.length != 0) { final Stream<PsiMethod> metho...
addMethodSignatures