Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
250,300
Icon (final boolean expanded) { return PlatformIcons.CLOSED_MODULE_GROUP_ICON; }
getIcon
250,301
boolean () { return checkFlag(IS_DELETED_MASK); }
isDeleted
250,302
boolean () { if (isDeleted()) return false; return ReadAction.compute(() -> { if (getRefManager().getProject().isDisposed()) return false; final PsiFile file = myID.getContainingFile(); //no need to check resolve in offline mode if (ApplicationManager.getApplication().isHeadlessEnvironment()) { return file != null && f...
isValid
250,303
RefModule () { final RefEntity owner = getOwner(); return owner instanceof RefElement ? ((RefElement)owner).getModule() : null; }
getModule
250,304
String () { return getName(); }
getExternalName
250,305
VirtualFile () { return myID.getVirtualFile(); }
getVirtualFile
250,306
boolean () { return checkFlag(IS_REACHABLE_MASK); }
isReachable
250,307
void (boolean reachable) { setFlag(reachable, IS_REACHABLE_MASK); }
setReachable
250,308
boolean () { for (RefElement refCaller : getInReferences()) { if (((RefElementImpl)refCaller).isSuspicious()) return true; } return false; }
hasSuspiciousCallers
250,309
void (boolean built) { setFlag(built, REFERENCES_BUILT_MASK); }
setReferencesBuilt
250,310
boolean () { return checkFlag(REFERENCES_BUILT_MASK); }
areReferencesBuilt
250,311
void (boolean entry) { setFlag(entry, IS_ENTRY_MASK); }
setEntry
250,312
boolean () { return checkFlag(IS_ENTRY_MASK); }
isEntry
250,313
boolean () { return checkFlag(IS_PERMANENT_ENTRY_MASK); }
isPermanentEntry
250,314
RefElement () { return this; }
getContainingEntry
250,315
void (boolean permanentEntry) { setFlag(permanentEntry, IS_PERMANENT_ENTRY_MASK); }
setPermanentEntry
250,316
boolean () { return !isReachable(); }
isSuspicious
250,317
void () { setFlag(true, IS_DELETED_MASK); if (getOwner() != null) { getOwner().removeChild(this); } for (RefElement refCallee : getOutReferences()) { ((RefElementImpl)refCallee).removeInReference(this); } for (RefElement refCaller : getInReferences()) { ((RefElementImpl)refCaller).removeOutReference(this); } }
referenceRemoved
250,318
boolean () { return checkFlag(IS_INITIALIZED_MASK); }
isInitialized
250,319
void (final String text) { mySuppressions = text.split("[, ]"); }
addSuppression
250,320
boolean (String @NotNull ... toolIds) { if (mySuppressions != null) { for (@NonNls String suppression : mySuppressions) { if (ArrayUtil.contains(suppression, toolIds)) { return true; } if (suppression.equalsIgnoreCase(SuppressionUtil.ALL)) { return true; } } } final RefEntity entity = getOwner(); return entity instance...
isSuppressed
250,321
void (final @NotNull RefVisitor visitor) { ApplicationManager.getApplication().runReadAction(() -> visitor.visitDirectory(this)); }
accept
250,322
boolean () { if (isDeleted()) return false; return ReadAction.compute(() -> { if (getRefManager().getProject().isDisposed()) return false; VirtualFile directory = getVirtualFile(); return directory != null && directory.isValid(); }); }
isValid
250,323
String () { return getName(); //todo relative name }
getQualifiedName
250,324
String () { final PsiElement element = getPsiElement(); assert element != null; return ((PsiDirectory)element).getVirtualFile().getPath(); }
getExternalName
250,325
String () { return myName; }
getName
250,326
String () { return myName; }
getQualifiedName
250,327
String () { return getName(); }
toString
250,328
void (final @NotNull RefVisitor refVisitor) { DumbService.getInstance(myManager.getProject()).runReadActionInSmartMode(() -> refVisitor.visitElement(this)); }
accept
250,329
String () { return myName; }
getExternalName
250,330
RefManagerImpl () { return myManager; }
getRefManager
250,331
boolean () { return myIsPersistent; }
isPersistent
250,332
String () { return myFQName; }
getFQName
250,333
RefEntity () { return myRefElement; }
getRefElement
250,334
void (Element parentNode) { Element element = new Element(ENTRY_POINT); element.setAttribute(TYPE_ATTR, myType); element.setAttribute(FQNAME_ATTR, getFQName()); parentNode.addContent(element); }
writeExternal
250,335
boolean (@NotNull RefManager manager) { if (myRefElement != null) { return myRefElement instanceof RefElement && myRefElement.isValid(); } myRefElement = manager.getReference(myType, getFQName()); return myRefElement != null; }
resolve
250,336
void () { myRefElement = null; }
freeReference
250,337
PsiFile () { return (PsiFile)super.getPsiElement(); }
getPsiElement
250,338
void (final @NotNull RefVisitor visitor) { ApplicationManager.getApplication().runReadAction(() -> visitor.visitFile(this)); }
accept
250,339
String () { final PsiFile psiFile = getPsiElement(); final VirtualFile virtualFile = psiFile != null ? psiFile.getVirtualFile() : null; return virtualFile != null ? virtualFile.getUrl() : getName(); }
getExternalName
250,340
RefModule () { return myRefModule; }
getModule
250,341
boolean () { return true; }
isValid
250,342
Icon (final boolean expanded) { return PlatformIcons.PROJECT_ICON; }
getIcon
250,343
TextAttributesKey (@NotNull String scope) { return ourCache.get(scope); }
getScopeTextAttributeKey
250,344
LibraryScopeCache (@NotNull Project project) { return project.getService(LibraryScopeCache.class); }
getInstance
250,345
int (Module[] object) { return Arrays.hashCode(object); }
hashCode
250,346
boolean (Module[] o1, Module[] o2) { return Arrays.equals(o1, o2); }
equals
250,347
GlobalSearchScope () { return myLibrariesOnlyScope; }
getLibrariesOnlyScope
250,348
GlobalSearchScope (@NotNull List<? extends Module> modulesLibraryIsUsedIn) { Module[] array = modulesLibraryIsUsedIn.toArray(Module.EMPTY_ARRAY); GlobalSearchScope scope = myLibraryScopes.get(array); return scope != null ? scope : ConcurrencyUtil.cacheOrGet(myLibraryScopes, array, new LibraryRuntimeClasspathScope(myPro...
getScopeForLibraryUsedIn
250,349
GlobalSearchScope (@NotNull List<? extends OrderEntry> orderEntries) { return myLibraryResolveScopeCache.get(orderEntries); }
getLibraryScope
250,350
GlobalSearchScope (@NotNull List<? extends OrderEntry> orderEntries) { return myLibraryUseScopeCache.get(orderEntries); }
getLibraryUseScope
250,351
GlobalSearchScope (@NotNull List<? extends OrderEntry> orderEntries) { List<Module> modulesLibraryUsedIn = new ArrayList<>(); LibraryOrderEntry lib = null; for (OrderEntry entry : orderEntries) { if (entry instanceof JdkOrderEntry) { return getScopeForSdk((JdkOrderEntry)entry); } if (entry instanceof LibraryOrderEntry)...
calcLibraryScope
250,352
int (@NotNull VirtualFile file1, @NotNull VirtualFile file2) { boolean c1 = preferred.contains(file1); boolean c2 = preferred.contains(file2); if (c1 && !c2) return 1; if (c2 && !c1) return -1; return super.compare(file1, file2); }
compare
250,353
GlobalSearchScope (@NotNull JdkOrderEntry jdkOrderEntry) { final String jdkName = jdkOrderEntry.getJdkName(); if (jdkName == null) return GlobalSearchScope.allScope(myProject); GlobalSearchScope scope = mySdkScopes.get(jdkName); if (scope == null) { scope = new JdkScope(myProject, jdkOrderEntry); return ConcurrencyUtil...
getScopeForSdk
250,354
GlobalSearchScope (@NotNull List<? extends OrderEntry> entries) { Set<Module> modulesWithLibrary = new HashSet<>(entries.size()); Set<Module> modulesWithSdk = new HashSet<>(entries.size()); for (OrderEntry entry : entries) { (entry instanceof JdkOrderEntry ? modulesWithSdk : modulesWithLibrary).add(entry.getOwnerModule...
calcLibraryUseScope
250,355
boolean (@NotNull VirtualFile file) { return super.contains(file) && myIndex.isInLibrary(file); }
contains
250,356
boolean (@NotNull Module aModule) { return false; }
isSearchInModuleContent
250,357
boolean () { return true; }
isSearchInLibraries
250,358
String () { return "Libraries only in (" + myBaseScope + ")"; }
toString
250,359
void (Collection<? extends PsiReference> references) { myReferences.addAll(references); }
addReferences
250,360
List<PsiReference> () { return ContainerUtil.concat(myReferences, it -> it instanceof PsiReferencesWrapper ? ((PsiReferencesWrapper)it).getReferences() : Collections.singleton(it) ); }
getReferences
250,361
void (PsiReference reference) { myReferences.add(reference); }
addReference
250,362
void (TextRange rangeInElement) { super.setRangeInElement(rangeInElement); }
setRangeInElement
250,363
PsiElement () { final ResolveResult[] resolveResults = multiResolve(false); return resolveResults.length == 1 ? resolveResults[0].getElement() : null; }
resolve
250,364
boolean () { return ContainerUtil.and(myReferences, it -> it.isSoft()); }
isSoft
250,365
String () { final PsiReference reference = chooseReference(); return reference == null ? myReferences.get(0).getCanonicalText() : reference.getCanonicalText(); }
getCanonicalText
250,366
boolean (@NotNull PsiElement element) { for (PsiReference reference : myReferences) { if (reference.isReferenceTo(element)) return true; } return false; }
isReferenceTo
250,367
ResolveResult[] (final boolean incompleteCode) { LinkedHashSet<ResolveResult> result = new LinkedHashSet<>(); for (PsiReference reference : myReferences) { if (reference instanceof PsiPolyVariantReference) { for (ResolveResult rr : ((PsiPolyVariantReference)reference).multiResolve(incompleteCode)) { if (rr.isValidResul...
innerResolve
250,368
double (@NotNull PsiReference o1) { if (o1 instanceof PriorityReference) return ((PriorityReference)o1).getPriority(); return PsiReferenceRegistrar.DEFAULT_PRIORITY; }
getPriority
250,369
String () { final PsiReference reference = chooseReference(); return reference instanceof EmptyResolveMessageProvider ? ((EmptyResolveMessageProvider)reference).getUnresolvedMessagePattern() : AnalysisBundle.message("cannot.resolve.symbol"); }
getUnresolvedMessagePattern
250,370
String () { //noinspection HardCodedStringLiteral return "PsiDynaReference containing " + myReferences; }
toString
250,371
PsiFileReference () { for (PsiReference reference : myReferences) { if (reference instanceof FileReferenceOwner) { return ((FileReferenceOwner)reference).getLastFileReference(); } } return null; }
getLastFileReference
250,372
PsiReference[] (PsiReference[] references, int offset) { return StreamEx.of(references) .flatMap(ref -> ref instanceof PsiDynaReference<?> ? StreamEx.of(((PsiDynaReference<?>)ref).myReferences).filter(it -> it.getRangeInElement().contains(offset)) : StreamEx.of(ref) ).toArray(PsiReference.EMPTY_ARRAY); }
filterByOffset
250,373
void () { super.cancel(); }
cancel
250,374
boolean () { return super.isCanceled(); }
isCanceled
250,375
boolean (@NotNull VirtualFile file) { return ((ModuleWithDependentsScope)getDelegate()).contains(file, true); }
contains
250,376
String () { return "Restricted by tests: (" + myBaseScope + ")"; }
toString
250,377
GlobalSearchScope (@ModuleWithDependenciesScope.ScopeConstant int options) { GlobalSearchScope scope = myScopeCache.get(options); if (scope == null) { scope = new ModuleWithDependenciesScope(myModule, options); myScopeCache.put(options, scope); } return scope; }
getCachedScope
250,378
GlobalSearchScope () { return getCachedScope(ModuleWithDependenciesScope.COMPILE_ONLY | ModuleWithDependenciesScope.TESTS); }
getModuleScope
250,379
GlobalSearchScope (boolean includeTests) { return getCachedScope(ModuleWithDependenciesScope.COMPILE_ONLY | (includeTests ? ModuleWithDependenciesScope.TESTS : 0)); }
getModuleScope
250,380
GlobalSearchScope () { return getCachedScope(ModuleWithDependenciesScope.COMPILE_ONLY | ModuleWithDependenciesScope.TESTS | ModuleWithDependenciesScope.LIBRARIES); }
getModuleWithLibrariesScope
250,381
GlobalSearchScope () { return getCachedScope(ModuleWithDependenciesScope.COMPILE_ONLY | ModuleWithDependenciesScope.TESTS | ModuleWithDependenciesScope.MODULES); }
getModuleWithDependenciesScope
250,382
GlobalSearchScope () { return new ModuleContentScope(myModule); }
getModuleContentScope
250,383
GlobalSearchScope () { ModuleWithDependenciesContentScope scope = myModuleWithDependenciesContentScope; if (scope == null) { myModuleWithDependenciesContentScope = scope = new ModuleWithDependenciesContentScope(myModule); } return scope; }
getModuleContentWithDependenciesScope
250,384
GlobalSearchScope (boolean includeTests) { return getCachedScope(ModuleWithDependenciesScope.COMPILE_ONLY | ModuleWithDependenciesScope.MODULES | ModuleWithDependenciesScope.LIBRARIES | (includeTests ? ModuleWithDependenciesScope.TESTS : 0)); }
getModuleWithDependenciesAndLibrariesScope
250,385
GlobalSearchScope () { return getModuleTestsWithDependentsScope().getDelegate(); }
getModuleWithDependentsScope
250,386
ModuleWithDependentsTestScope () { ModuleWithDependentsTestScope scope = myModuleTestsWithDependentsScope; if (scope == null) { myModuleTestsWithDependentsScope = scope = new ModuleWithDependentsTestScope(myModule); } return scope; }
getModuleTestsWithDependentsScope
250,387
GlobalSearchScope (boolean includeTests) { return getCachedScope( ModuleWithDependenciesScope.MODULES | ModuleWithDependenciesScope.LIBRARIES | (includeTests ? ModuleWithDependenciesScope.TESTS : 0)); }
getModuleRuntimeScope
250,388
GlobalSearchScope () { return getCachedScope(0); }
getModuleProductionSourceScope
250,389
GlobalSearchScope () { return getCachedScope(ModuleWithDependenciesScope.TESTS); }
getModuleTestSourceScope
250,390
void () { myScopeCache.clear(); myModuleTestsWithDependentsScope = null; myModuleWithDependenciesContentScope = null; }
clearCache
250,391
boolean (@NotNull VirtualFile file) { Module moduleOfFile = myProjectFileIndex.getModuleForFile(file); return moduleOfFile != null && myModules.contains(moduleOfFile); }
contains
250,392
boolean (@NotNull Module aModule) { return myModules.contains(aModule); }
isSearchInModuleContent
250,393
boolean () { return false; }
isSearchInLibraries
250,394
String () { return "Modules:" + Arrays.toString(myModules.toArray(Module.EMPTY_ARRAY)); }
toString
250,395
ModuleIndex (@NotNull Project project) { return CachedValuesManager.getManager(project).getCachedValue(project, () -> { ModuleIndex index = new ModuleIndex(); for (Module module : ModuleManager.getInstance(project).getModules()) { for (OrderEntry orderEntry : ModuleRootManager.getInstance(module).getOrderEntries()) { i...
getModuleIndex
250,396
boolean (@NotNull VirtualFile file) { return contains(file, false); }
contains
250,397
boolean (@NotNull Module module) { return myModules.contains(module); }
isSearchInModuleContent
250,398
boolean () { return false; }
isSearchInLibraries
250,399
Collection<UnloadedModuleDescription> () { Project project = getProject(); ModuleManager moduleManager = ModuleManager.getInstance(Objects.requireNonNull(project)); return myRootModules .stream() .flatMap(module -> DirectoryIndex.getInstance(project).getDependentUnloadedModules(module).stream()) .map(moduleManager::get...
getUnloadedModulesBelongingToScope