Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
287,600 | boolean (@NotNull FileViewProvider topLevelViewProvider) { return Boolean.TRUE.equals(topLevelViewProvider.getUserData(DO_POSTPROCESS_FORMATTING_ONLY_FOR_INJECTED_FRAGMENTS)); } | shouldFormatOnlyInjectedCode |
287,601 | void (@NotNull ModalityState modalityState, @NotNull Runnable runnable) { Application app = ApplicationManager.getApplication(); if (app.isDispatchThread()) { runnable.run(); } else { app.invokeLater(runnable, modalityState); } } | invokeLaterIfNeeded |
287,602 | void (@NotNull ModalityState modalityState, @NotNull Condition<?> expired, @NotNull Runnable runnable) { Application app = ApplicationManager.getApplication(); if (app.isDispatchThread()) { runnable.run(); } else { app.invokeLater(runnable, modalityState, expired); } } | invokeLaterIfNeeded |
287,603 | Collection<R> () { return Collections.emptyList(); } | findAll |
287,604 | R () { return null; } | findFirst |
287,605 | boolean (@NotNull Processor<? super R> consumer) { return true; } | forEach |
287,606 | boolean (@NotNull Processor<? super T> consumer) { return delegateProcessResults(myDelegate, new MyProcessor(consumer)); } | processResults |
287,607 | AsyncFuture<Boolean> (@NotNull Processor<? super T> consumer) { return myDelegate.forEachAsync(new MyProcessor(consumer)); } | forEachAsync |
287,608 | boolean (S o) { for (Class<? extends T> aClass : myClasses) { if (aClass.isInstance(o)) { //noinspection unchecked return myConsumer.process((T)o); } } return true; } | process |
287,609 | boolean (Object o) { if (this == o) return true; if (!(o instanceof FileIconKey)) return false; FileIconKey that = (FileIconKey)o; if (myFlags != that.myFlags) return false; if (myStamp != that.myStamp) return false; if (!myFile.equals(that.myFile)) return false; if (!Objects.equals(myProject, that.myProject)) return false; if (!Objects.equals(myInitialLanguage, that.myInitialLanguage)) return false; return true; } | equals |
287,610 | int () { return Objects.hash(myFile, myProject, myFlags, myStamp); } | hashCode |
287,611 | boolean () { return myPathSet.isEmpty(); } | isEmpty |
287,612 | void (@Nullable String path) { addAllLast(chooseFirstTimeItems(path), myPath); } | add |
287,613 | void (@NotNull String path) { myPath.remove(path); myPathTail.remove(path); myPathSet.remove(path); } | remove |
287,614 | void () { myPath.clear(); myPathTail.clear(); myPathSet.clear(); } | clear |
287,615 | void (VirtualFile file) { String path = LOCAL_PATH.fun(file); String trimmed = path != null ? path.trim() : ""; if (!trimmed.isEmpty() && myPathSet.add(trimmed)) { myPath.add(trimmed); } } | add |
287,616 | void (String path) { int index = 0; for (String element : chooseFirstTimeItems(path)) { myPath.add(index, element); myPathSet.add(element); index++; } } | addFirst |
287,617 | void (String path) { addAllLast(chooseFirstTimeItems(path), myPathTail); } | addTail |
287,618 | Iterable<String> (@Nullable String path) { if (path == null) { return Collections.emptyList(); } else { return JBIterable.from(StringUtil.tokenize(path, File.pathSeparator)).filter(element -> { element = element.trim(); return !element.isEmpty() && !myPathSet.contains(element); }); } } | chooseFirstTimeItems |
287,619 | void (Iterable<String> elements, List<? super String> toArray) { for (String element : elements) { toArray.add(element); myPathSet.add(element); } } | addAllLast |
287,620 | String () { return StringUtil.join(getPathList(), File.pathSeparator); } | getPathsString |
287,621 | List<String> () { List<String> result = new ArrayList<>(); result.addAll(myPath); result.addAll(myPathTail); return result; } | getPathList |
287,622 | List<VirtualFile> () { return JBIterable.from(getPathList()).filterMap(PATH_TO_LOCAL_VFILE).toList(); } | getVirtualFiles |
287,623 | List<VirtualFile> () { return JBIterable.from(getPathList()).filterMap(PATH_TO_DIR).toList(); } | getRootDirs |
287,624 | void (List<String> allClasspath) { for (String path : allClasspath) { add(path); } } | addAll |
287,625 | void (File[] files) { addAllFiles(Arrays.asList(files)); } | addAllFiles |
287,626 | void (List<? extends File> files) { for (File file : files) { add(file); } } | addAllFiles |
287,627 | void (File file) { add(FileUtil.toCanonicalPath(file.getAbsolutePath()).replace('/', File.separatorChar)); } | add |
287,628 | void (File file) { addFirst(FileUtil.toCanonicalPath(file.getAbsolutePath()).replace('/', File.separatorChar)); } | addFirst |
287,629 | void (Collection<? extends VirtualFile> files) { for (VirtualFile file : files) { add(file); } } | addVirtualFiles |
287,630 | void (VirtualFile[] files) { addVirtualFiles(Arrays.asList(files)); } | addVirtualFiles |
287,631 | MessageBusFactory () { return ApplicationManager.getApplication().getService(MessageBusFactory.class); } | getInstance |
287,632 | MessageBus (@NotNull MessageBusOwner owner) { return getInstance().createMessageBus(owner, null); } | newMessageBus |
287,633 | MessageBus (@NotNull MessageBusOwner owner, @Nullable MessageBus parentBus) { if (parentBus == null) { return new RootBus(owner); } CompositeMessageBus parent = (CompositeMessageBus)parentBus; if (parent.getParent() == null) { return new CompositeMessageBus(owner, parent); } else { return new MessageBusImpl(owner, parent); } } | createMessageBus |
287,634 | RootBus (@NotNull MessageBusOwner owner) { return new RootBus(owner); } | createRootBus |
287,635 | MethodHandle (@NotNull Method method, Object @Nullable [] args) { // method name cannot be used as a key because for one class maybe several methods with the same name and different set of parameters return CACHE.get(method.getDeclaringClass()).computeIfAbsent(method, method1 -> { method1.setAccessible(true); MethodHandle result; try { result = LOOKUP.unreflect(method1); } catch (IllegalAccessException e) { throw new RuntimeException(e); } return args == null ? result : result.asSpreader(Object[].class, args.length); }); } | compute |
287,636 | void (@NotNull T listener) { SimpleMessageBusConnection connection = myMessageBus.simpleConnect(); connection.subscribe(myTopic, listener); myListenerToConnectionMap.put(listener, connection); } | add |
287,637 | void (@NotNull T listener, @NotNull Disposable parentDisposable) { Disposer.register(parentDisposable, new Disposable() { @Override public void dispose() { myListenerToConnectionMap.remove(listener); } }); MessageBusConnection connection = myMessageBus.connect(parentDisposable); connection.subscribe(myTopic, listener); myListenerToConnectionMap.put(listener, connection); } | add |
287,638 | void () { myListenerToConnectionMap.remove(listener); } | dispose |
287,639 | void (@NotNull T listener) { SimpleMessageBusConnection connection = myListenerToConnectionMap.remove(listener); if (connection != null) { connection.disconnect(); } } | remove |
287,640 | GraphAlgorithms () { return ApplicationManager.getApplication().getService(GraphAlgorithms.class); } | getInstance |
287,641 | GraphFactory () { return ApplicationManager.getApplication().getService(GraphFactory.class); } | getInstance |
287,642 | Logger () { return Logger.getInstance(ThreadingAssertions.class); } | getLogger |
287,643 | void () { if (!EDT.isCurrentThreadEdt()) { throwThreadAccessException(MUST_EXECUTE_UNDER_EDT); } } | assertEventDispatchThread |
287,644 | void () { if (EDT.isCurrentThreadEdt()) { throwThreadAccessException(MUST_NOT_EXECUTE_UNDER_EDT); } } | assertBackgroundThread |
287,645 | void () { if (!ApplicationManager.getApplication().isReadAccessAllowed()) { throwThreadAccessException(MUST_EXECUTE_INSIDE_READ_ACTION); } } | assertReadAccess |
287,646 | void () { if (!ApplicationManager.getApplication().isReadAccessAllowed()) { getLogger().error(createThreadAccessException(MUST_EXECUTE_INSIDE_READ_ACTION)); } } | softAssertReadAccess |
287,647 | void () { if (ApplicationManager.getApplication().isReadAccessAllowed()) { throwThreadAccessException(MUST_NOT_EXECUTE_INSIDE_READ_ACTION); } } | assertNoReadAccess |
287,648 | void () { if (!ApplicationManager.getApplication().isWriteIntentLockAcquired()) { throwThreadAccessException(MUST_EXECUTE_IN_WRITE_INTENT_READ_ACTION); } } | assertWriteIntentReadAccess |
287,649 | void () { if (!ApplicationManager.getApplication().isWriteAccessAllowed()) { throwThreadAccessException(MUST_EXECUTE_INSIDE_WRITE_ACTION); } } | assertWriteAccess |
287,650 | void (@NotNull @NonNls String message) { throw createThreadAccessException(message); } | throwThreadAccessException |
287,651 | RuntimeExceptionWithAttachments (@NonNls @NotNull String message) { return new RuntimeExceptionWithAttachments( message + "; see " + DOCUMENTATION_URL + " for details" + "\n" + getThreadDetails(), new Attachment("threadDump.txt", ThreadDumper.dumpThreadsToString()) ); } | createThreadAccessException |
287,652 | String () { Thread current = Thread.currentThread(); Thread edt = EDT.getEventDispatchThread(); return "Current thread: " + describe(current) + " (EventQueue.isDispatchThread()=" + EventQueue.isDispatchThread() + ")\n" + "SystemEventQueueThread: " + (edt == current ? "(same)" : describe(edt)); } | getThreadDetails |
287,653 | String (@Nullable Thread o) { return o == null ? "null" : o + " " + System.identityHashCode(o); } | describe |
287,654 | Path () { return PathManager.getIndexRoot().resolve("indices.enum"); } | getEnumFile |
287,655 | void () { reloadEnumFile(getEnumFile()); } | reloadEnumFile |
287,656 | void (@NotNull Path enumFile) { if (enumFile.equals(nameToIdRegistry.getFile())) { return; } SimpleStringPersistentEnumerator newNameToIdRegistry = new SimpleStringPersistentEnumerator(getEnumFile()); Map<String, Integer> newInvertedState = newNameToIdRegistry.getInvertedState(); Map<String, Integer> oldInvertedState = nameToIdRegistry.getInvertedState(); oldInvertedState.forEach((oldKey, oldId) -> { Integer newId = newInvertedState.get(oldKey); if (newId == null) { int createdId = newNameToIdRegistry.enumerate(oldKey); if (createdId != oldId) { reassign(oldKey, createdId); } } else if (oldId.intValue() != newId.intValue()) { reassign(oldKey, newId); } }); nameToIdRegistry = newNameToIdRegistry; } | reloadEnumFile |
287,657 | void (String name, int newId) { ID<?, ?> id = idObjects.get(name); if (id != null) { id.uniqueId = newId; } } | reassign |
287,658 | int (@NotNull String name) { int id = nameToIdRegistry.enumerate(name); if (id != (short)id) { throw new AssertionError("Too many indexes registered"); } return id; } | stringToId |
287,659 | void () { nameToIdRegistry.forceDiskSync(); } | reinitializeDiskStorage |
287,660 | String (@NotNull String name, @Nullable String actualPluginIdStr, @Nullable String requiredPluginIdStr, @Nullable Throwable registrationStackTrace) { return "ID with name '" + name + "' requested for plugin " + requiredPluginIdStr + " but registered for " + actualPluginIdStr + " plugin. " + "Please use an instance field to access corresponding ID." + (registrationStackTrace == null ? " Registration stack trace: " : ""); } | getInvalidIdAccessMessage |
287,661 | Throwable () { return idToRegistrationStackTrace.get(this); } | getRegistrationTrace |
287,662 | int () { return uniqueId; } | getUniqueId |
287,663 | void (@NotNull ID<?, ?> id) { String name = id.getName(); synchronized (lock) { ID<?, ?> oldID = idObjects.remove(name); LOG.assertTrue(id.equals(oldID), "Failed to unload: " + name); idToPluginId = idToPluginId.remove(id); idToRegistrationStackTrace.remove(id); } } | unloadId |
287,664 | void () { INSTANCE.clearLocaleCache(); } | clearCache |
287,665 | SymbolNavigationService () { return ApplicationManager.getApplication().getService(SymbolNavigationService.class); } | getInstance |
287,666 | T (@NotNull ComponentManager componentManager, @NotNull PluginDescriptor pluginDescriptor) { T result = instance; if (result != null) { return result; } //noinspection SynchronizeOnThis synchronized (this) { result = instance; if (result != null) { return result; } result = createInstance(componentManager, pluginDescriptor); instance = result; } return result; } | getInstance |
287,667 | T (@NotNull ComponentManager componentManager, @NotNull PluginDescriptor pluginDescriptor) { String className = getImplementationClassName(); if (className == null) { throw new PluginException("implementation class is not specified", pluginDescriptor.getPluginId()); } return componentManager.instantiateClass(className, pluginDescriptor); } | createInstance |
287,668 | PluginDescriptor () { return pluginDescriptor; } | getPluginDescriptor |
287,669 | void (@NotNull PluginDescriptor value) { pluginDescriptor = value; } | setPluginDescriptor |
287,670 | T () { return getInstance(ApplicationManager.getApplication(), pluginDescriptor); } | getInstance |
287,671 | ClassLoader () { return pluginDescriptor != null ? pluginDescriptor.getClassLoader() : getClass().getClassLoader(); } | getLoaderForClass |
287,672 | Icon (@NotNull PsiElement element, int flags) { if (element instanceof PomTargetPsiElement) { return getIcon(((PomTargetPsiElement)element).getTarget(), flags); } return null; } | getIcon |
287,673 | PomModel (@NotNull Project project) { return project.getService(PomModel.class); } | getModel |
287,674 | PomService (Project project) { return project.getService(PomService.class); } | getInstance |
287,675 | PsiElement (@NotNull Project project, @NotNull PomTarget target) { return getInstance(project).convertToPsi(target); } | convertToPsi |
287,676 | PsiElement (@NotNull PsiTarget target) { return getInstance(target.getNavigationElement().getProject()).convertToPsi((PomTarget)target); } | convertToPsi |
287,677 | Set<PomModelAspect> () { if (myChangeSet != null) { return Collections.singleton(myChangeSet.getAspect()); } else { return Collections.emptySet(); } } | getChangedAspects |
287,678 | PomChangeSet (@NotNull PomModelAspect aspect) { return myChangeSet == null || !aspect.equals(myChangeSet.getAspect()) ? null : myChangeSet; } | getChangeSet |
287,679 | void (@NotNull PomModelEvent event) { if (event.myChangeSet != null && myChangeSet != null) { myChangeSet.merge(event.myChangeSet); } else if (myChangeSet == null) { myChangeSet = event.myChangeSet; } } | merge |
287,680 | PomModel () { return (PomModel)super.getSource(); } | getSource |
287,681 | void () { if (myChangeSet != null) { myChangeSet.beforeNestedTransaction(); } } | beforeNestedTransaction |
287,682 | PomModelEvent () { return myAccumulatedEvent; } | getAccumulatedEvent |
287,683 | PsiElement () { return myScope; } | getChangeScope |
287,684 | void (Charset charset) { super.storeCharset(charset); myCachedLength = Long.MIN_VALUE; } | storeCharset |
287,685 | Language () { return myLanguage; } | getLanguage |
287,686 | void (@NotNull Language language) { myLanguage = language; FileType type = language.getAssociatedFileType(); if (type == null) { type = FileTypeRegistry.getInstance().getFileTypeByFileName(getNameSequence()); } setFileType(type); } | setLanguage |
287,687 | long () { long cachedLength = myCachedLength; if (cachedLength == Long.MIN_VALUE) { myCachedLength = cachedLength = super.getLength(); } return cachedLength; } | getLength |
287,688 | void () { assert isWritable(); setModificationStamp(newModificationStamp); try { setContentImpl(toString(getCharset().name())); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } | close |
287,689 | void (Object requestor, @NotNull CharSequence content, boolean fireEvent) { assertWritable(); setContentImpl(content); setModificationStamp(LocalTimeCounter.currentTime()); } | setContent |
287,690 | void (@NotNull CharSequence content) { myContent = content; myCachedLength = Long.MIN_VALUE; } | setContentImpl |
287,691 | CharSequence () { return myContent; } | getContent |
287,692 | ThreeState () { return ThreeState.UNSURE; } | isTooLargeForIntelligence |
287,693 | boolean () { return false; } | shouldSkipEventSystem |
287,694 | String () { return "LightVirtualFile: " + getPresentableUrl(); } | toString |
287,695 | boolean (@Nullable VirtualFile virtualFile) { return virtualFile instanceof LightVirtualFile && ((LightVirtualFile)virtualFile).shouldSkipEventSystem(); } | shouldSkipEventSystem |
287,696 | void (Object requestor, @NotNull CharSequence content, boolean fireEvent) { throw new UnsupportedOperationException(); } | setContent |
287,697 | void (boolean writable) { if (writable) throw new UnsupportedOperationException(); } | setWritable |
287,698 | void (FileType fileType) { myFileType = fileType; } | setFileType |
287,699 | VirtualFile () { return myOriginalFile; } | getOriginalFile |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.