Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
252,500 | boolean (@NotNull Project project, @NotNull VirtualFile file) { for (ExtraPlaceChecker checker : EP_NAME.getExtensionList()) { if (checker.accept(project, file)) { return true; } } if (!ProjectFileIndex.getInstance(project).isInContent(file)) { return false; } return true; } | belongsToProject |
252,501 | boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final TodoIndexEntry that = (TodoIndexEntry)o; return caseSensitive == that.caseSensitive && pattern.equals(that.pattern); } | equals |
252,502 | int () { int result = pattern.hashCode(); result = 31 * result + (caseSensitive ? 1 : 0); return result; } | hashCode |
252,503 | String () { return "TodoIndexEntry[pattern=" + pattern + ", caseSensitive=" + caseSensitive + "]"; } | toString |
252,504 | int () { return 1; } | getVersion |
252,505 | boolean (@NotNull List<String> words, boolean caseSensitive, @NotNull FileContent content) { Map<IdIndexEntry, Integer> idIndexData = PlainTextIdIndexer.getIdIndexData(content); return words.stream().allMatch(word -> idIndexData.containsKey(new IdIndexEntry(word, caseSensitive))); } | idIndexContainAllWords |
252,506 | TextSearchResult (@NotNull String text, Processor<? super VirtualFile> processor, @NotNull GlobalSearchScope scope) { IntSet keys = TrigramBuilder.getTrigrams(text); if (keys.isEmpty()) return TextSearchResult.NO_TRIGRAMS; return FileBasedIndex.getInstance().getFilesWithKey(TrigramIndex.INDEX_ID, keys, f -> { ProgressM... | processFilesWithText |
252,507 | boolean (@NotNull VirtualFile file) { FileType fileType = file.getFileType(); return !file.isDirectory() && TrigramIndex.isIndexable(fileType) && !ProjectCoreUtil.isProjectOrWorkspaceFile(file, fileType) && !SingleRootFileViewProvider.isTooLargeForIntelligence(file); } | isInSearchableScope |
252,508 | boolean () { return Boolean.parseBoolean(System.getProperty("find.use.indexing.searcher.extensions", "true")); } | useIndexingSearchExtensions |
252,509 | boolean () { return TrigramTextSearchService.useIndexingSearchExtensions(); } | isEnabled |
252,510 | boolean (FileType fileType) { return !fileType.isBinary() && isEnabled() && (!FileBasedIndex.IGNORE_PLAIN_TEXT_FILES || fileType != PlainTextFileType.INSTANCE); } | isIndexable |
252,511 | KeyDescriptor<Integer> () { return EnumeratorIntegerDescriptor.INSTANCE; } | getKeyDescriptor |
252,512 | boolean () { return true; } | dependsOnFileContent |
252,513 | int () { return 4; } | getVersion |
252,514 | boolean () { return false; } | needsForwardIndexWhenSharing |
252,515 | DataExternalizer<Collection<Integer>> () { return new DataExternalizer<>() { @Override public void save(@NotNull DataOutput out, @NotNull Collection<Integer> value) throws IOException { final int numberOfValues = value.size(); int[] buffer = SPARE_BUFFER_LOCAL.getBuffer(numberOfValues); int ptr = 0; for (Integer i : va... | createExternalizer |
252,516 | Collection<T> () { return models.values(); } | getNodes |
252,517 | Iterator<T> (final ModuleRootModel model) { final List<T> dependencies = new ArrayList<>(); model.orderEntries().compileOnly().forEachModule(module -> { T depModel = models.get(module); if (depModel != null) { dependencies.add(depModel); } return true; }); return dependencies.iterator(); } | getIn |
252,518 | Couple<Module> (@NotNull Module currentModule, @NotNull Module toDependOn) { assert currentModule != toDependOn; // whatsa lotsa of @&#^%$ codes-a! final Map<Module, ModifiableRootModel> models = new LinkedHashMap<>(); Project project = currentModule.getProject(); for (Module module : ModuleManager.getInstance(project)... | addingDependencyFormsCircularity |
252,519 | boolean (@NotNull PsiDirectory psiDirectory) { return isSourceRoot(psiDirectory.getVirtualFile(), psiDirectory.getProject()); } | isSourceRoot |
252,520 | boolean (@NotNull VirtualFile directoryFile, @NotNull Project project) { final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(project).getFileIndex(); return directoryFile.equals(fileIndex.getSourceRootForFile(directoryFile)); } | isSourceRoot |
252,521 | boolean (@NotNull PsiDirectory directory) { return isInSource(directory.getVirtualFile(), directory.getProject()); } | isInSource |
252,522 | boolean (@NotNull VirtualFile directoryFile, @NotNull Project project) { final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex(); return projectFileIndex.isInSourceContent(directoryFile); } | isInSource |
252,523 | boolean (@NotNull PsiFile file) { VirtualFile vFile = file.getVirtualFile(); return vFile != null && isInTestSource(vFile, file.getProject()); } | isInTestSource |
252,524 | boolean (@NotNull VirtualFile directoryFile, @NotNull Project project) { final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex(); return projectFileIndex.isInTestSourceContent(directoryFile); } | isInTestSource |
252,525 | boolean (@NotNull VirtualFile virtualFile, @NotNull final Project project) { ProjectFileIndex fileIndex = ProjectFileIndex.getInstance(project); return fileIndex.isInSourceContent(virtualFile) && virtualFile.equals(fileIndex.getSourceRootForFile(virtualFile)); } | isModuleSourceRoot |
252,526 | SourceFolder (@NotNull VirtualFile root, @NotNull Project project) { final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex(); if (!root.equals(projectFileIndex.getSourceRootForFile(root))) return null; final Module module = projectFileIndex.getModuleForFile(root); if (module == ... | getModuleSourceRoot |
252,527 | boolean (@NotNull VirtualFile directoryFile, @NotNull Project project) { final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex(); if (projectFileIndex.isInLibraryClasses(directoryFile)) { final VirtualFile parent = directoryFile.getParent(); return parent == null || !projectFile... | isLibraryRoot |
252,528 | boolean (@NotNull PsiDirectory directory) { return isModuleContentRoot(directory.getVirtualFile(), directory.getProject()); } | isModuleContentRoot |
252,529 | boolean (@NotNull final VirtualFile directoryFile, @NotNull Project project) { final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex(); final VirtualFile contentRootForFile = projectFileIndex.getContentRootForFile(directoryFile); return directoryFile.equals(contentRootForFile); ... | isModuleContentRoot |
252,530 | String (@NotNull final VirtualFile root, @NotNull Project project) { if (project.isDefault()) return null; ProjectFileIndex fileIndex = ProjectFileIndex.getInstance(project); if (fileIndex.isExcluded(root) && root.equals(fileIndex.getContentRootForFile(root, false))) { return fileIndex.getUnloadedModuleNameForFile(root... | findUnloadedModuleByContentRoot |
252,531 | String (@NotNull final VirtualFile file, @NotNull Project project) { if (project.isDefault()) return null; return ProjectFileIndex.getInstance(project).getUnloadedModuleNameForFile(file); } | findUnloadedModuleByFile |
252,532 | boolean (@NotNull PsiDirectory psiDirectory) { return psiDirectory.getVirtualFile().equals(psiDirectory.getProject().getBaseDir()); } | isProjectHome |
252,533 | boolean (@NotNull PsiFile psiFile) { if (psiFile instanceof PsiCodeFragment) return false; final VirtualFile file = psiFile.getVirtualFile(); if (file == null) return false; final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(psiFile.getProject()).getFileIndex(); return !projectFileIndex.isInSource... | isOutsideSourceRoot |
252,534 | ExcludeFolder (@NotNull Module module, @NotNull VirtualFile root) { for (ContentEntry entry : ModuleRootManager.getInstance(module).getContentEntries()) { for (ExcludeFolder folder : entry.getExcludeFolders()) { if (root.equals(folder.getFile())) { return folder; } } } return null; } | findExcludeFolder |
252,535 | Module () { return myModule; } | getModule |
252,536 | Collection<ContentEntry> () { return myContentEntries; } | getContent |
252,537 | Project () { return myModule.getProject(); } | getProject |
252,538 | JpsModuleSourceRoot () { return mySourceRoot; } | getSourceRoot |
252,539 | boolean () { return mySourceRoot.getRootType().isForTests(); } | isTestSource |
252,540 | String () { final @Nullable JavaSourceRootProperties properties = getJavaProperties(); return properties != null ? properties.getPackagePrefix() : ""; } | getPackagePrefix |
252,541 | JavaSourceRootProperties () { if (mySourceRoot.getRootType() == JavaSourceRootType.SOURCE) { return mySourceRoot.getProperties(JavaSourceRootType.SOURCE); } if (mySourceRoot.getRootType() == JavaSourceRootType.TEST_SOURCE) { return mySourceRoot.getProperties(JavaSourceRootType.TEST_SOURCE); } return null; } | getJavaProperties |
252,542 | void (@NotNull String packagePrefix) { JavaSourceRootProperties properties = getJavaProperties(); if (properties != null) { properties.setPackagePrefix(packagePrefix); } } | setPackagePrefix |
252,543 | JpsModuleSourceRoot () { return mySourceRoot; } | getJpsElement |
252,544 | VirtualFile () { return myRoot.getFile(); } | getFile |
252,545 | String () { return myRoot.getUrl(); } | getUrl |
252,546 | List<SourceFolder> (@NotNull JpsModuleSourceRootType<?> rootType) { return getSourceFolders(Collections.singleton(rootType)); } | getSourceFolders |
252,547 | List<SourceFolder> (@NotNull Set<? extends JpsModuleSourceRootType<?>> rootTypes) { List<SourceFolder> folders = new SmartList<>(); for (JpsSourceFolder folder : mySourceFolders) { if (rootTypes.contains(folder.getRootType())) { folders.add(folder); } } return folders; } | getSourceFolders |
252,548 | VirtualFile[] (ContentFolder[] sourceFolders) { ArrayList<VirtualFile> result = new ArrayList<>(sourceFolders.length); for (ContentFolder sourceFolder : sourceFolders) { final VirtualFile file = sourceFolder.getFile(); if (file != null) { result.add(file); } } return VfsUtilCore.toVirtualFileArray(result); } | getFiles |
252,549 | List<String> () { List<String> excluded = new ArrayList<>(); for (JpsExcludeFolder folder : myExcludeFolders) { excluded.add(folder.getUrl()); } for (DirectoryIndexExcludePolicy excludePolicy : DirectoryIndexExcludePolicy.EP_NAME.getExtensions(myRootModel.getProject())) { for (VirtualFilePointer pointer : excludePolicy... | getExcludeFolderUrls |
252,550 | SourceFolder (@NotNull VirtualFile file, boolean isTestSource) { return addSourceFolder(file, isTestSource, ""); } | addSourceFolder |
252,551 | SourceFolder (@NotNull VirtualFile file, boolean isTestSource, @NotNull String packagePrefix) { return addSourceFolder(file.getUrl(), isTestSource, packagePrefix); } | addSourceFolder |
252,552 | SourceFolder (final String url, boolean isTestSource, String packagePrefix) { final JavaSourceRootType rootType = isTestSource ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE; JavaSourceRootProperties properties = JpsJavaExtensionService.getInstance().createSourceRootProperties(packagePrefix); return addSo... | addSourceFolder |
252,553 | SourceFolder (@NotNull String url, boolean isTestSource) { return addSourceFolder(url, isTestSource, ""); } | addSourceFolder |
252,554 | void (@NotNull SourceFolder sourceFolder) { final JpsSourceFolder folder = (JpsSourceFolder)sourceFolder; mySourceFolders.remove(folder); myModule.removeSourceRoot(folder.getSourceRoot().getUrl(), folder.getSourceRoot().getRootType()); Disposer.dispose(folder); } | removeSourceFolder |
252,555 | void () { List<JpsModuleSourceRoot> toRemove = new ArrayList<>(); for (JpsSourceFolder folder : mySourceFolders) { toRemove.add(folder.getSourceRoot()); Disposer.dispose(folder); } mySourceFolders.clear(); for (JpsModuleSourceRoot root : toRemove) { myModule.removeSourceRoot(root.getUrl(), root.getRootType()); } } | clearSourceFolders |
252,556 | ExcludeFolder (@NotNull VirtualFile file) { return addExcludeFolder(file.getUrl()); } | addExcludeFolder |
252,557 | ExcludeFolder (@NotNull String url) { final JpsExcludeFolder folder = new JpsExcludeFolder(url, this); myModule.getExcludeRootsList().addUrl(url); myExcludeFolders.add(folder); return folder; } | addExcludeFolder |
252,558 | ExcludeFolder (@NotNull String url, boolean isAutomaticallyImported) { return addExcludeFolder(url); } | addExcludeFolder |
252,559 | void (@NotNull ExcludeFolder excludeFolder) { JpsExcludeFolder folder = (JpsExcludeFolder)excludeFolder; myExcludeFolders.remove(folder); myModule.getExcludeRootsList().removeUrl(folder.getUrl()); Disposer.dispose(folder); } | removeExcludeFolder |
252,560 | boolean (@NotNull String url) { for (JpsExcludeFolder folder : myExcludeFolders) { if (folder.getUrl().equals(url)) { myExcludeFolders.remove(folder); myModule.getExcludeRootsList().removeUrl(url); Disposer.dispose(folder); return true; } } return false; } | removeExcludeFolder |
252,561 | void () { List<String> toRemove = new ArrayList<>(); for (JpsExcludeFolder folder : myExcludeFolders) { toRemove.add(folder.getUrl()); Disposer.dispose(folder); } myExcludeFolders.clear(); for (String url : toRemove) { myModule.getExcludeRootsList().removeUrl(url); } } | clearExcludeFolders |
252,562 | List<String> () { return myExcludePatterns; } | getExcludePatterns |
252,563 | void (@NotNull String pattern) { myExcludePatterns.add(pattern); myModule.addExcludePattern(getUrl(), pattern); } | addExcludePattern |
252,564 | void (@NotNull String pattern) { myExcludePatterns.remove(pattern); myModule.removeExcludePattern(getUrl(), pattern); } | removeExcludePattern |
252,565 | void (@NotNull List<String> patterns) { for (String pattern : myExcludePatterns) { myModule.removeExcludePattern(getUrl(), pattern); } myExcludePatterns.clear(); for (String pattern : patterns) { addExcludePattern(pattern); } } | setExcludePatterns |
252,566 | ModuleRootModel () { return myRootModel; } | getRootModel |
252,567 | boolean () { return false; } | isSynthetic |
252,568 | void () { for (JpsSourceFolder folder : mySourceFolders) { Disposer.dispose(folder); } for (JpsExcludeFolder folder : myExcludeFolders) { Disposer.dispose(folder); } } | dispose |
252,569 | VirtualFile () { return myFilePointer.getFile(); } | getFile |
252,570 | ContentEntry () { return myContentEntry; } | getContentEntry |
252,571 | String () { return myFilePointer.getUrl(); } | getUrl |
252,572 | boolean () { return false; } | isSynthetic |
252,573 | void () { } | dispose |
252,574 | void (String path, String macroName) { addReplacement(FileUtilRt.toSystemIndependentName(path), "$" + macroName + "$", true); } | addMacroReplacement |
252,575 | void (String path, String macroExpr, boolean overwrite) { path = Strings.trimEnd(path, "/"); putIfAbsent(path, macroExpr, overwrite); for (String protocol : PathMacroProtocolHolder.getProtocols()) { putIfAbsent(protocol + ":" + path, protocol + ":" + macroExpr, overwrite); putIfAbsent(protocol + ":/" + path, protocol +... | addReplacement |
252,576 | void (final String path, final String substitution, final boolean overwrite) { if (overwrite || !myMacroMap.containsKey(path)) { myMacroMap.put(path, substitution); } } | putIfAbsent |
252,577 | String (@NotNull String text, boolean caseSensitive) { for (String path : getPathIndex()) { text = replacePathMacro(text, path, caseSensitive); } return text; } | substitute |
252,578 | String (@NotNull String text, final @NotNull String path, boolean caseSensitive) { if (text.length() < path.length() || path.isEmpty()) { return text; } if (!(caseSensitive ? text.startsWith(path) : StringUtilRt.startsWithIgnoreCase(text, path))) { return text; } //check that this is complete path (ends with "/" or "!/... | replacePathMacro |
252,579 | CharSequence (@NotNull String text, boolean caseSensitive) { CharSequence result = text; for (String path : getPathIndex()) { result = replacePathMacroRecursively(result, path, caseSensitive); } return result; } | substituteRecursively |
252,580 | CharSequence (@NotNull CharSequence text, @NotNull String path, boolean caseSensitive) { if ((text.length() < path.length()) || path.isEmpty()) { return text; } StringBuilder newText = new StringBuilder(); boolean isWindowsRoot = path.endsWith(":/"); int i = 0; while (i < text.length()) { int occurrenceOfPath = caseSen... | replacePathMacroRecursively |
252,581 | int (@NotNull String replacement) { if (replacement.contains("..") || replacement.contains("$" + PathMacroUtil.USER_HOME_NAME + "$") || replacement.contains("$" + PathMacroUtil.APPLICATION_HOME_DIR + "$") || replacement.contains("$" + PathMacrosImpl.MAVEN_REPOSITORY + "$")) { return 1; } if (replacement.contains(PathMa... | getIndex |
252,582 | int (@NotNull String key) { key = StringUtil.trimStart(key, "jar:"); key = StringUtil.trimStart(key, "file:"); while (key.startsWith("/")) { key = key.substring(1); } return key.length(); } | stripPrefix |
252,583 | List<String> () { if (pathIndex != null && pathIndex.size() == myMacroMap.size()) { return pathIndex; } List<Map.Entry<String, String>> entries = new ArrayList<>(myMacroMap.entrySet()); Object2IntMap<String> weights = new Object2IntOpenHashMap<>(entries.size()); for (Map.Entry<String, String> entry : entries) { weights... | getPathIndex |
252,584 | boolean (Object obj) { if (obj == this) return true; if (!(obj instanceof ReplacePathToMacroMap)) return false; return myMacroMap.equals(((ReplacePathToMacroMap)obj).myMacroMap); } | equals |
252,585 | int () { return myMacroMap.hashCode(); } | hashCode |
252,586 | void (String path, String replacement) { myMacroMap.put(path, replacement); } | put |
252,587 | String () { return "macroMap: " + myMacroMap + "\n\npathsIndex: " + StringUtil.join(pathIndex, "\n"); } | toString |
252,588 | Set<String> (final @NotNull Element e) { return getMacroNames(e, new CompositePathMacroFilter(MACRO_FILTER_EXTENSION_POINT_NAME.getExtensionList()), PathMacrosImpl.getInstanceEx()); } | getMacroNames |
252,589 | Set<String> (@NotNull Element root, @Nullable PathMacroFilter filter, @NotNull PathMacrosImpl pathMacros) { PathMacrosCollector collector = new PathMacrosCollector(); collector.substitute(root, true, false, filter); Set<String> preResult = collector.myMacroMap.keySet(); if (preResult.isEmpty()) { return Collections.emp... | getMacroNames |
252,590 | CharSequence (@NotNull String text, boolean caseSensitive) { if (Strings.isEmpty(text)) { return text; } myMatcher.reset(text); while (myMatcher.find()) { myMacroMap.put(myMatcher.group(1), null); } return text; } | substituteRecursively |
252,591 | String (@NotNull String text, boolean caseSensitive) { if (Strings.isEmpty(text)) { return text; } int startPos = -1; if (text.charAt(0) == '$') { startPos = 0; } else { for (String protocol : PathMacroProtocolHolder.getProtocols()) { if (text.length() > protocol.length() + 4 && text.startsWith(protocol) && text.charAt... | substitute |
252,592 | int () { return myMacroMap.hashCode(); } | hashCode |
252,593 | TestModuleProperties (@NotNull Module module) { return module.getService(TestModuleProperties.class); } | getInstance |
252,594 | boolean (@NotNull VirtualFile file, @NotNull Project project) { return ReadAction.compute(() -> ProjectFileIndex.getInstance(project).isInTestSourceContent(file)); } | isTestSource |
252,595 | long () { return myManager.getModificationCount(); } | getModificationCount |
252,596 | ModifiableRootModel (@NotNull RootConfigurationAccessor accessor) { return getModifiableModel(accessor); } | getModifiableModelForMultiCommit |
252,597 | ModuleRootManagerEx (@NotNull Module module) { return (ModuleRootManagerEx) module.getComponent(ModuleRootManager.class); } | getInstanceEx |
252,598 | OrderRootType () { return getOrderRootType(AnnotationOrderRootType.class); } | getInstance |
252,599 | boolean () { return true; } | skipWriteIfEmpty |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.