Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
250,400 | boolean (Object o) { if (this == o) return true; return o instanceof ModuleWithDependentsScope && myModules.equals(((ModuleWithDependentsScope)o).myModules); } | equals |
250,401 | int () { return myModules.hashCode(); } | calcHashCode |
250,402 | int () { return myEntries.hashCode(); } | calcHashCode |
250,403 | boolean (Object object) { if (object == this) return true; if (object == null || object.getClass() != LibraryRuntimeClasspathScope.class) return false; final LibraryRuntimeClasspathScope that = (LibraryRuntimeClasspathScope)object; return that.myEntries.equals(myEntries); } | equals |
250,404 | void (final @NotNull Module module, final @NotNull Set<? super Module> processedModules, final @NotNull Set<? super Library> processedLibraries, final @NotNull Set<? super Sdk> processedSdk, @NotNull Condition<? super OrderEntry> condition) { if (!processedModules.add(module)) return; ModuleRootManager.getInstance(modu... | buildEntries |
250,405 | Object2IntMap<VirtualFile> (@NotNull LibraryOrderEntry libraryOrderEntry, final Object2IntMap<VirtualFile> value) { final Library library = libraryOrderEntry.getLibrary(); if (library != null && processedLibraries.add(library)) { addAll(value, libraryOrderEntry.getRootFiles(OrderRootType.CLASSES)); addAll(value, librar... | visitLibraryOrderEntry |
250,406 | Object2IntMap<VirtualFile> (final @NotNull ModuleSourceOrderEntry moduleSourceOrderEntry, final Object2IntMap<VirtualFile> value) { processedModules.add(moduleSourceOrderEntry.getOwnerModule()); addAll(value, moduleSourceOrderEntry.getRootModel().getSourceRoots()); return value; } | visitModuleSourceOrderEntry |
250,407 | Object2IntMap<VirtualFile> (@NotNull ModuleOrderEntry moduleOrderEntry, Object2IntMap<VirtualFile> value) { final Module depModule = moduleOrderEntry.getModule(); if (depModule != null) { addAll(value, ModuleRootManager.getInstance(depModule).getSourceRoots()); } return value; } | visitModuleOrderEntry |
250,408 | Object2IntMap<VirtualFile> (final @NotNull JdkOrderEntry jdkOrderEntry, final Object2IntMap<VirtualFile> value) { final Sdk jdk = jdkOrderEntry.getJdk(); if (jdk != null && processedSdk.add(jdk)) { addAll(value, jdkOrderEntry.getRootFiles(OrderRootType.CLASSES)); addAll(value, jdkOrderEntry.getRootFiles(OrderRootType.S... | visitJdkOrderEntry |
250,409 | boolean (@NotNull VirtualFile file) { return myEntries.containsKey(getFileRoot(file)); } | contains |
250,410 | int (@NotNull VirtualFile file1, @NotNull VirtualFile file2) { if (file1.equals(file2)) return 0; final VirtualFile r1 = getFileRoot(file1); final VirtualFile r2 = getFileRoot(file2); final int i1 = myEntries.getInt(r1); final int i2 = myEntries.getInt(r2); if (i1 == i2) return 0; if (i1 == -1) return -1; if (i2 == -1)... | compare |
250,411 | List<VirtualFile> () { if (myEntries.isEmpty()) return Collections.emptyList(); VirtualFile[] result = new VirtualFile[myEntries.size()]; for (Object2IntMap.Entry<VirtualFile> entry : myEntries.object2IntEntrySet()) { result[entry.getIntValue()] = entry.getKey(); } return Arrays.asList(result); } | getRoots |
250,412 | boolean (@NotNull Module aModule) { return false; } | isSearchInModuleContent |
250,413 | boolean () { return true; } | isSearchInLibraries |
250,414 | void (Object2IntMap<? super VirtualFile> entries, VirtualFile[] files) { for (VirtualFile file : files) { if (!entries.containsKey(file)) { entries.put(file, entries.size()); } } } | addAll |
250,415 | int () { return 31 * super.calcHashCode() + (myJdkName == null ? 0 : myJdkName.hashCode()); } | calcHashCode |
250,416 | boolean (Object object) { if (object == null) return false; if (object == this) return true; if (object.getClass() != getClass()) return false; return Objects.equals(myJdkName, ((JdkScope)object).myJdkName) && super.equals(object); } | equals |
250,417 | boolean (@NotNull VirtualFile file) { return myEntries.containsKey(getFileRoot(file)); } | contains |
250,418 | int (@NotNull VirtualFile file1, @NotNull VirtualFile file2) { int pos1 = myEntries.getInt(getFileRoot(file1)); int pos2 = myEntries.getInt(getFileRoot(file2)); return Integer.compare(pos2, pos1); } | compare |
250,419 | boolean (@NotNull Module aModule) { return false; } | isSearchInModuleContent |
250,420 | boolean () { return true; } | isSearchInLibraries |
250,421 | boolean (Object o) { if (this == o) return true; if (!(o instanceof LibraryScopeBase)) return false; return myEntries.keySet().equals(((LibraryScopeBase)o).myEntries.keySet()); } | equals |
250,422 | int () { return myEntries.keySet().hashCode(); } | calcHashCode |
250,423 | Object2IntMap<VirtualFile> () { OrderRootsEnumerator en = getOrderEnumeratorForOptions().roots(entry -> { if (entry instanceof ModuleOrderEntry || entry instanceof ModuleSourceOrderEntry) return OrderRootType.SOURCES; return OrderRootType.CLASSES; }); Set<VirtualFile> roots = new LinkedHashSet<>(); Collections.addAll(r... | calcRoots |
250,424 | OrderEnumerator () { OrderEnumerator en = ModuleRootManager.getInstance(myModule).orderEntries(); en.recursively(); if (hasOption(COMPILE_ONLY)) en.exportedOnly().compileOnly(); if (!hasOption(LIBRARIES)) en.withoutLibraries().withoutSdk(); if (!hasOption(MODULES)) en.withoutDepModules(); if (!hasOption(TESTS)) en.prod... | getOrderEnumeratorForOptions |
250,425 | Set<Module> () { Set<Module> modules = new HashSet<>(); OrderEnumerator en = getOrderEnumeratorForOptions(); en.forEach(each -> { if (each instanceof ModuleOrderEntry) { ContainerUtil.addIfNotNull(modules, ((ModuleOrderEntry)each).getModule()); } else if (each instanceof ModuleSourceOrderEntry) { ContainerUtil.addIfNot... | calcModules |
250,426 | Module () { return myModule; } | getModule |
250,427 | boolean (@ScopeConstant int option) { return BitUtil.isSet(myOptions, option); } | hasOption |
250,428 | String () { return hasOption(COMPILE_ONLY) ? IndexingBundle.message("search.scope.module", myModule.getName()) : IndexingBundle.message("search.scope.module.runtime", myModule.getName()); } | getDisplayName |
250,429 | boolean (@NotNull Module aModule) { Set<Module> allModules = myModules; if (allModules == null) { myModules = allModules = new HashSet<>(calcModules()); } return allModules.contains(aModule); } | isSearchInModuleContent |
250,430 | boolean (@NotNull Module aModule, boolean testSources) { return isSearchInModuleContent(aModule) && (hasOption(TESTS) || !testSources); } | isSearchInModuleContent |
250,431 | boolean () { return hasOption(LIBRARIES); } | isSearchInLibraries |
250,432 | boolean (@NotNull VirtualFile file) { // in case of single file source if (mySingleFileSourcesTracker.isSourceDirectoryInModule(file, myModule)) return true; VirtualFile root = myProjectFileIndex.getModuleSourceOrLibraryClassesRoot(file); return root != null && myRoots.containsKey(root); } | contains |
250,433 | int (@NotNull VirtualFile file1, @NotNull VirtualFile file2) { VirtualFile r1 = myProjectFileIndex.getModuleSourceOrLibraryClassesRoot(file1); VirtualFile r2 = myProjectFileIndex.getModuleSourceOrLibraryClassesRoot(file2); if (Comparing.equal(r1, r2)) return 0; if (r1 == null) return -1; if (r2 == null) return 1; Objec... | compare |
250,434 | Collection<VirtualFile> () { List<VirtualFile> result = new ArrayList<>(myRoots.keySet()); result.sort(Comparator.comparingInt(myRoots::getInt)); return result; } | getRoots |
250,435 | VirtualFileEnumeration () { IntSet result = new IntOpenHashSet(); for (VirtualFile file : myRoots.keySet()) { if (file instanceof VirtualFileWithId) { int[] children = VirtualFileManager.getInstance().listAllChildIds(((VirtualFileWithId)file).getId()); result.addAll(IntList.of(children)); } } return new MyVirtualFileEn... | doExtractFilIdEnumeration |
250,436 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ModuleWithDependenciesScope that = (ModuleWithDependenciesScope)o; return myOptions == that.myOptions && myModule.equals(that.myModule); } | equals |
250,437 | int () { return 31 * myModule.hashCode() + myOptions; } | calcHashCode |
250,438 | String () { return "Module-with-dependencies:" + myModule.getName() + " compile-only:" + hasOption(COMPILE_ONLY) + " include-libraries:" + hasOption(LIBRARIES) + " include-other-modules:" + hasOption(MODULES) + " include-tests:" + hasOption(TESTS); } | toString |
250,439 | boolean (int fileId) { return myResult.contains(fileId); } | contains |
250,440 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MyVirtualFileEnumeration that = (MyVirtualFileEnumeration)o; return myResult.equals(that.myResult); } | equals |
250,441 | int () { return Objects.hash(myResult); } | hashCode |
250,442 | String () { return Arrays.toString(myResult.toIntArray()); } | toString |
250,443 | String () { return AnalysisBundle.message("library.0", myLibraryName); } | getDisplayName |
250,444 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; return myLibrary.equals(((LibraryScope)o).myLibrary); } | equals |
250,445 | int () { return 31 * super.calcHashCode() + myLibrary.hashCode(); } | calcHashCode |
250,446 | Library () { return myLibrary; } | getLibrary |
250,447 | PsiElementVisitor (final @NotNull ProblemsHolder holder, boolean isOnTheFly) { return new PsiElementVisitor() { @Override public void visitFile(@NotNull PsiFile file) { if (!file.getLanguage().equals(file.getViewProvider().getBaseLanguage())) { // There is a possible case that more than a single virtual file/editor con... | buildVisitor |
250,448 | void (@NotNull PsiFile file) { if (!file.getLanguage().equals(file.getViewProvider().getBaseLanguage())) { // There is a possible case that more than a single virtual file/editor contains more than one language (e.g. php and html). // We want to process a virtual file once than, hence, ignore all non-base psi files. re... | visitFile |
250,449 | void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final PsiElement psiElement = descriptor.getPsiElement(); if (!(psiElement instanceof PsiFile)) { return; } final String lineSeparator = FileDocumentManager.getInstance().getLineSeparator(null, project); final VirtualFile virtualFile = ((PsiFile)p... | applyFix |
250,450 | boolean () { return true; } | isDirectory |
250,451 | long () { return 0; } | getLength |
250,452 | VirtualFile[] () { return myChildren.isEmpty() ? EMPTY_ARRAY : myChildren.toArray(VirtualFile.EMPTY_ARRAY); } | getChildren |
250,453 | long () { return -1; } | getModificationStamp |
250,454 | boolean () { return false; } | isDirectory |
250,455 | long () { return myContents.length; } | getLength |
250,456 | VirtualFile[] () { return null; } | getChildren |
250,457 | void () { final DummyFileSystem fs = (DummyFileSystem)getFileSystem(); fs.fireBeforeContentsChange(requestor, DummyFileImpl.this); final long oldModStamp = myModificationStamp; myContents = toByteArray(); myModificationStamp = newModificationStamp >= 0 ? newModificationStamp : LocalTimeCounter.currentTime(); fs.fireCon... | close |
250,458 | long () { return myModificationStamp; } | getModificationStamp |
250,459 | void (long modificationStamp, Object requestor) { myModificationStamp = modificationStamp; } | setModificationStamp |
250,460 | void (final @NotNull Project project) { onProjectOpened(project); } | projectOpened |
250,461 | void (@NotNull Project project) { registerDisposeCallback(project); } | projectClosed |
250,462 | String () { return myProtocol; } | getProtocol |
250,463 | VirtualFile (@NotNull String name) { return super.createRoot(name); } | createRoot |
250,464 | T (@NotNull String path) { return myCachedFiles.get(path); } | findFileByPath |
250,465 | String (@NotNull String path) { VirtualFile file = findFileByPath(path); return file != null ? getPresentableUrl(file) : super.extractPresentableUrl(path); } | extractPresentableUrl |
250,466 | String (@NotNull VirtualFile file) { return file.getPresentableName(); } | getPresentableUrl |
250,467 | void (@NotNull VirtualFile vFile, @NotNull String newName) { throw new UnsupportedOperationException("not implemented"); } | doRenameFile |
250,468 | Collection<T> () { return myCachedFiles.values().stream() .filter(Objects::nonNull) .filter(VirtualFile::isValid) .collect(Collectors.toList()); } | getCachedFiles |
250,469 | void () { clearCache(); if (ApplicationManager.getApplication().isUnitTestMode()) { cleanup(); } } | onProjectClosed |
250,470 | void (@NotNull Project project) { clearCache(); } | onProjectOpened |
250,471 | void (@NotNull Project project) { if (Boolean.TRUE.equals(DISPOSE_CALLBACK.get(project))) return; // use Disposer instead of ProjectManagerListener#projectClosed() because Disposer.dispose(project) // is called later and some cached files should stay valid till the last moment Disposer.register(project, () -> onProject... | registerDisposeCallback |
250,472 | void () { for (Project project : ProjectManager.getInstance().getOpenProjects()) { if (project.isOpen()) onProjectOpened(project); } } | initProjectMap |
250,473 | void () { retainFiles(VirtualFile::isValid); } | clearCache |
250,474 | void (@NotNull Predicate<? super VirtualFile> c) { for (Map.Entry<String, T> entry : myCachedFiles.entrySet()) { T t = entry.getValue(); if (t == null || !c.test(t)) { //CFM::entrySet returns copy myCachedFiles.remove(entry.getKey()); } } } | retainFiles |
250,475 | void () { myCachedFiles.clear(); } | cleanup |
250,476 | void (Object requestor, @NotNull VirtualFile vFile, @NotNull String newName) { String oldName = vFile.getName(); beforeFileRename(vFile, requestor, oldName, newName); try { doRenameFile(vFile, newName); } finally { fileRenamed(vFile, requestor, oldName, newName); } } | renameFile |
250,477 | void (@NotNull VirtualFile file, Object requestor, @NotNull String oldName, @NotNull String newName) { fireBeforePropertyChange(requestor, file, VirtualFile.PROP_NAME, oldName, newName); myCachedFiles.remove(file.getPath()); } | beforeFileRename |
250,478 | void (@NotNull VirtualFile file, Object requestor, @NotNull String oldName, @NotNull String newName) { //noinspection unchecked myCachedFiles.put(file.getPath(), (T)file); firePropertyChanged(requestor, file, VirtualFile.PROP_NAME, oldName, newName); } | fileRenamed |
250,479 | String (@NotNull String name) { return StringUtil.replace(name, "/", "&slash;"); } | escapeSlash |
250,480 | String (@NotNull String name) { return StringUtil.replace(name, "&slash;", "/"); } | unescapeSlash |
250,481 | VirtualFileSystem () { return myFileSystem; } | getFileSystem |
250,482 | String () { if (myParent == null) { return myName; } return myParent.getPath() + "/" + myName; } | getPath |
250,483 | String () { return myName; } | getName |
250,484 | boolean () { return true; } | isWritable |
250,485 | boolean () { return myIsValid; } | isValid |
250,486 | VirtualFile () { return myParent; } | getParent |
250,487 | long () { return -1; } | getTimeStamp |
250,488 | void (boolean asynchronous, boolean recursive, Runnable postRunnable) { } | refresh |
250,489 | DummyFileSystem () { return (DummyFileSystem)VirtualFileManager.getInstance().getFileSystem(PROTOCOL); } | getInstance |
250,490 | VirtualFile (@NotNull String name) { DummyDirectoryImpl root = new DummyDirectoryImpl(this, null, name); fireFileCreated(null, root); return root; } | createRoot |
250,491 | String () { return PROTOCOL; } | getProtocol |
250,492 | VirtualFile (@NotNull String path) { // LOG.error("method not implemented"); return null; } | findFileByPath |
250,493 | String (@NotNull String path) { return path; } | extractPresentableUrl |
250,494 | void (boolean asynchronous) { } | refresh |
250,495 | VirtualFile (@NotNull String path) { return findFileByPath(path); } | refreshAndFindFileByPath |
250,496 | void (Object requestor, @NotNull VirtualFile vFile, @NotNull String newName) { final String oldName = vFile.getName(); fireBeforePropertyChange(requestor, vFile, VirtualFile.PROP_NAME, oldName, newName); ((DummyFileBase)vFile).setName(newName); firePropertyChanged(requestor, vFile, VirtualFile.PROP_NAME, oldName, newNa... | renameFile |
250,497 | void (final Object requestor, final @NotNull VirtualFile file) { super.fireBeforeContentsChange(requestor, file); } | fireBeforeContentsChange |
250,498 | void (final Object requestor, final @NotNull VirtualFile file, final long oldModificationStamp) { super.fireContentsChanged(requestor, file, oldModificationStamp); } | fireContentsChanged |
250,499 | VirtualFile (Object requestor, @NotNull VirtualFile vDir, @NotNull String dirName) { final DummyDirectoryImpl dir = (DummyDirectoryImpl)vDir; DummyFileBase child = new DummyDirectoryImpl(this, dir, dirName); dir.addChild(child); fireFileCreated(requestor, child); return child; } | createChildDirectory |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.