Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
54,500 | Boolean (PackageViewDescriptor descriptor, D data) { return applyWorker(descriptor, data) && visitChildren(DescriptorUtils.getAllDescriptors(descriptor.getMemberScope()), data); } | visitPackageViewDescriptor |
54,501 | Boolean (VariableDescriptor descriptor, D data) { return processCallable(descriptor, data); } | visitVariableDescriptor |
54,502 | Boolean (PropertyDescriptor descriptor, D data) { return processCallable(descriptor, data) && visitChildren(descriptor.getGetter(), data) && visitChildren(descriptor.getSetter(), data); } | visitPropertyDescriptor |
54,503 | Boolean (FunctionDescriptor descriptor, D data) { return processCallable(descriptor, data); } | visitFunctionDescriptor |
54,504 | Boolean (TypeParameterDescriptor descriptor, D data) { return applyWorker(descriptor, data); } | visitTypeParameterDescriptor |
54,505 | Boolean (ClassDescriptor descriptor, D data) { return applyWorker(descriptor, data) && visitChildren(descriptor.getThisAsReceiverParameter(), data) && visitChildren(descriptor.getConstructors(), data) && visitChildren(descriptor.getTypeConstructor().getParameters(), data) && visitChildren(DescriptorUtils.getAllDescript... | visitClassDescriptor |
54,506 | Boolean (TypeAliasDescriptor descriptor, D data) { return applyWorker(descriptor, data) && visitChildren(descriptor.getDeclaredTypeParameters(), data); } | visitTypeAliasDescriptor |
54,507 | Boolean (ModuleDescriptor descriptor, D data) { return applyWorker(descriptor, data) && visitChildren(descriptor.getPackage(FqName.ROOT), data); } | visitModuleDeclaration |
54,508 | Boolean (ConstructorDescriptor constructorDescriptor, D data) { return visitFunctionDescriptor(constructorDescriptor, data); } | visitConstructorDescriptor |
54,509 | Boolean (ScriptDescriptor scriptDescriptor, D data) { return visitClassDescriptor(scriptDescriptor, data); } | visitScriptDescriptor |
54,510 | Boolean (ValueParameterDescriptor descriptor, D data) { return visitVariableDescriptor(descriptor, data); } | visitValueParameterDescriptor |
54,511 | Boolean (PropertyGetterDescriptor descriptor, D data) { return visitFunctionDescriptor(descriptor, data); } | visitPropertyGetterDescriptor |
54,512 | Boolean (PropertySetterDescriptor descriptor, D data) { return visitFunctionDescriptor(descriptor, data); } | visitPropertySetterDescriptor |
54,513 | Boolean (ReceiverParameterDescriptor descriptor, D data) { return applyWorker(descriptor, data); } | visitReceiverParameterDescriptor |
54,514 | MockApplication () { return (MockApplication) ApplicationManager.getApplication(); } | getApplication |
54,515 | void () { MockApplication instance = new MockApplication(getTestRootDisposable()); ApplicationManager.setApplication(instance, FileTypeManager::getInstance, getTestRootDisposable()); getApplication().registerService(EncodingManager.class, CoreEncodingProjectManager.class); } | initApplication |
54,516 | void (@NotNull Throwable e) { List<Throwable> list = mySuppressedExceptions; if (list == null) { mySuppressedExceptions = list = new SmartList<>(); } list.add(e); } | addSuppressedException |
54,517 | boolean () { return false; } | isIconRequired |
54,518 | void () { Disposer.dispose(getTestRootDisposable()); } | disposeRootDisposable |
54,519 | void (@NotNull File file) { myPathsToKeep.add(file.getPath()); } | addTmpFileToKeep |
54,520 | boolean (@NotNull File file) { String path = file.getPath(); if (FileUtil.pathsEqual(path, ourPathToKeep.toString())) return true; for (String pathToKeep : myPathsToKeep) { if (FileUtil.pathsEqual(path, pathToKeep)) return true; } return false; } | shouldKeepTmpFile |
54,521 | void () { // try to reduce file set retained by java.io.DeleteOnExitHook List<String> list; synchronized (DELETE_ON_EXIT_HOOK_CLASS) { if (DELETE_ON_EXIT_HOOK_DOT_FILES.isEmpty()) return; list = new ArrayList<>(DELETE_ON_EXIT_HOOK_DOT_FILES); } for (int i = list.size() - 1; i >= 0; i--) { String path = list.get(i); Fil... | cleanupDeleteOnExitHookList |
54,522 | void (@NotNull CodeStyleSettings oldCodeStyleSettings, @NotNull CodeStyleSettings currentCodeStyleSettings) { final CodeInsightSettings settings = CodeInsightSettings.getInstance(); // don't use method references here to make stack trace reading easier //noinspection Convert2MethodRef RunAll.runAll( () -> { try { check... | doCheckForSettingsDamage |
54,523 | Disposable () { return myTestRootDisposable; } | getTestRootDisposable |
54,524 | boolean () { return TestFrameworkUtil.canRunTest(getClass()); } | shouldRunTest |
54,525 | void (long cost, @NotNull Map<String, Long> costMap) { Class<?> superclass = getClass().getSuperclass(); Long oldCost = costMap.get(superclass.getName()); long newCost = oldCost == null ? cost : oldCost + cost; costMap.put(superclass.getName(), newCost); } | logPerClassCost |
54,526 | void () { System.out.println("Setup costs"); long totalSetup = 0; for (Map.Entry<String, Long> entry : TOTAL_SETUP_COST_MILLIS.entrySet()) { System.out.println(String.format(" %s: %d ms", entry.getKey(), entry.getValue())); totalSetup += entry.getValue(); } System.out.println("Teardown costs"); long totalTeardown = 0; ... | logSetupTeardownCosts |
54,527 | boolean () { IdeaTestExecutionPolicy policy = IdeaTestExecutionPolicy.current(); if (policy != null) { return policy.runInDispatchThread(); } return true; } | runInDispatchThread |
54,528 | void (@NotNull ThrowableRunnable<Throwable> runnable) { try { EdtTestUtil.runInEdtAndWait(runnable); } catch (Throwable throwable) { LOG.warn(throwable); } } | edt |
54,529 | String (@NotNull Iterable<?> collection) { if (!collection.iterator().hasNext()) { return "<empty>"; } final StringBuilder builder = new StringBuilder(); for (final Object o : collection) { if (o instanceof Set) { builder.append(new TreeSet<>((Set<?>)o)); } else { builder.append(o); } builder.append('\n'); } return bui... | toString |
54,530 | void (@NotNull byte[] actual, @NotNull byte[] expected) { assertEquals(expected.length, actual.length); for (int i = 0; i < actual.length; i++) { byte a = actual[i]; byte e = expected[i]; assertEquals("not equals at index: "+i, e, a); } } | assertOrderedEquals |
54,531 | void (@NotNull int[] actual, @NotNull int[] expected) { if (actual.length != expected.length) { fail("Expected size: "+expected.length+"; actual: "+actual.length+"\nexpected: "+Arrays.toString(expected)+"\nactual : "+Arrays.toString(actual)); } for (int i = 0; i < actual.length; i++) { int a = actual[i]; int e = expect... | assertOrderedEquals |
54,532 | String (@NotNull Object[] collection, @NotNull String separator) { return toString(Arrays.asList(collection), separator); } | toString |
54,533 | String (@NotNull Collection<?> collection, @NotNull String separator) { List<String> list = ContainerUtil.map(collection, String::valueOf); Collections.sort(list); StringBuilder builder = new StringBuilder(); boolean flag = false; for (final String o : list) { if (flag) { builder.append(separator); } builder.append(o);... | toString |
54,534 | void () { PerformanceWatcher.dumpThreadsToConsole("Thread dump:"); } | printThreadDump |
54,535 | void (@NotNull Object[] array) { assertOrderedEquals(array); } | assertEmpty |
54,536 | void (final Collection<?> collection) { assertNotNull(collection); assertFalse(collection.isEmpty()); } | assertNotEmpty |
54,537 | void (@NotNull Collection<?> collection) { assertEmpty(collection.toString(), collection); } | assertEmpty |
54,538 | void (@Nullable Collection<?> collection) { if (collection == null) return; assertEmpty("", collection); } | assertNullOrEmpty |
54,539 | void (final String s) { assertTrue(s, StringUtil.isEmpty(s)); } | assertEmpty |
54,540 | void (int expectedSize, @NotNull Object[] array) { if (array.length != expectedSize) { assertEquals(toString(Arrays.asList(array)), expectedSize, array.length); } } | assertSize |
54,541 | void (int expectedSize, @NotNull Collection<?> c) { if (c.size() != expectedSize) { assertEquals(toString(c), expectedSize, c.size()); } } | assertSize |
54,542 | void (@NotNull String expected, @NotNull String actual) { assertSameLines(null, expected, actual); } | assertSameLines |
54,543 | void (@Nullable String message, @NotNull String expected, @NotNull String actual) { String expectedText = StringUtil.convertLineSeparators(expected.trim()); String actualText = StringUtil.convertLineSeparators(actual.trim()); Assert.assertEquals(message, expectedText, actualText); } | assertSameLines |
54,544 | void (@NotNull File file) { assertTrue("File should exist " + file, file.exists()); } | assertExists |
54,545 | void (@NotNull File file) { assertFalse("File should not exist " + file, file.exists()); } | assertDoesntExist |
54,546 | String (boolean lowercaseFirstLetter) { return getTestName(getName(), lowercaseFirstLetter); } | getTestName |
54,547 | String (@Nullable String name, boolean lowercaseFirstLetter) { return name == null ? "" : PlatformTestUtil.getTestName(name, lowercaseFirstLetter); } | getTestName |
54,548 | String () { final String testName = getTestName(true); return testName.replaceAll("_.*", ""); } | getTestDirectoryName |
54,549 | void (@NotNull String filePath, @NotNull String actualText) { assertSameLinesWithFile(filePath, actualText, true); } | assertSameLinesWithFile |
54,550 | void (@NotNull String filePath, @NotNull String actualText, @NotNull Supplier<String> messageProducer) { assertSameLinesWithFile(filePath, actualText, true, messageProducer); } | assertSameLinesWithFile |
54,551 | void (@NotNull String filePath, @NotNull String actualText, boolean trimBeforeComparing) { assertSameLinesWithFile(filePath, actualText, trimBeforeComparing, null); } | assertSameLinesWithFile |
54,552 | void (@NotNull String filePath, @NotNull String actualText, boolean trimBeforeComparing, @Nullable Supplier<String> messageProducer) { String fileText; try { if (OVERWRITE_TESTDATA) { VfsTestUtil.overwriteTestData(filePath, actualText); //noinspection UseOfSystemOutOrSystemErr System.out.println("File " + filePath + " ... | assertSameLinesWithFile |
54,553 | void (@NotNull CodeStyleSettings expected, @NotNull CodeStyleSettings settings) { if (!expected.equals(settings)) { Element oldS = new Element("temp"); expected.writeExternal(oldS); Element newS = new Element("temp"); settings.writeExternal(newS); String newString = JDOMUtil.writeElement(newS); String oldString = JDOMU... | checkCodeStyleSettingsEqual |
54,554 | void (@NotNull CodeInsightSettings oldSettings, @NotNull CodeInsightSettings settings) { if (!oldSettings.equals(settings)) { Element newS = new Element("temp"); settings.writeExternal(newS); Assert.assertEquals("Code insight settings damaged", DEFAULT_SETTINGS_EXTERNALIZED, JDOMUtil.writeElement(newS)); } } | checkCodeInsightSettingsEqual |
54,555 | boolean () { String testName = getName(); String className = getClass().getSimpleName(); return TestFrameworkUtil.isPerformanceTest(testName, className); } | isPerformanceTest |
54,556 | boolean () { return isStressTest(getName(), getClass().getName()); } | isStressTest |
54,557 | boolean (String testName, String className) { return TestFrameworkUtil.isPerformanceTest(testName, className) || containsStressWords(testName) || containsStressWords(className); } | isStressTest |
54,558 | boolean (@Nullable String name) { return name != null && (name.contains("Stress") || name.contains("Slow")); } | containsStressWords |
54,559 | void (@NotNull Project project) { DocumentUtil.writeInRunUndoTransparentAction(() -> { PsiDocumentManager.getInstance(project).commitAllDocuments(); PostprocessReformattingAspect.getInstance(project).doPostponedFormatting(); }); } | doPostponedFormatting |
54,560 | void (@NotNull AbstractExceptionCase<?> exceptionCase) { assertException(exceptionCase, null); } | assertException |
54,561 | void (@NotNull AbstractExceptionCase exceptionCase, @Nullable String expectedErrorMsg) { assertExceptionOccurred(true, exceptionCase, expectedErrorMsg); } | assertException |
54,562 | Class<Throwable> () { return (Class<Throwable>)exceptionClass; } | getExpectedExceptionClass |
54,563 | void (@NotNull Runnable closure) { String throwableName = null; try { closure.run(); } catch (Throwable thr) { throwableName = thr.getClass().getName(); } assertNull(throwableName); } | assertNoThrowable |
54,564 | boolean (@NotNull Class<? extends Annotation> annotationClass) { Class<?> aClass = getClass(); String methodName = "test" + getTestName(false); boolean methodChecked = false; while (aClass != null && aClass != Object.class) { if (aClass.getAnnotation(annotationClass) != null) return true; if (!methodChecked) { Method m... | annotatedWith |
54,565 | String () { return PathManager.getHomePath().replace(File.separatorChar, '/'); } | getHomePath |
54,566 | void (@NotNull VirtualFile file) { VfsUtilCore.visitChildrenRecursively(file, new VirtualFileVisitor<Void>() { @Override public boolean visitFile(@NotNull VirtualFile file) { file.getChildren(); return true; } }); file.refresh(false, true); } | refreshRecursively |
54,567 | boolean (@NotNull VirtualFile file) { file.getChildren(); return true; } | visitFile |
54,568 | VirtualFile (@NotNull final File file) { return UIUtil.invokeAndWaitIfNeeded(() -> LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file)); } | refreshAndFindFile |
54,569 | void (long timeout, @NotNull TimeUnit timeUnit) { try { EdtTestUtil.runInEdtAndWait(() -> { Application app = ApplicationManager.getApplication(); if (app != null && !app.isDisposed()) { FileBasedIndexImpl index = (FileBasedIndexImpl)app.getServiceIfCreated(FileBasedIndex.class); if (index != null) { index.getChangedFi... | waitForAppLeakingThreads |
54,570 | void () { myDisposed = true; } | dispose |
54,571 | boolean () { return myDisposed; } | isDisposed |
54,572 | String () { String testName = getTestName(false); return KtUsefulTestCase.this.getClass() + (StringUtil.isEmpty(testName) ? "" : ".test" + testName); } | toString |
54,573 | Document (CharSequence charSequence) { return editorFactory .createDocument(charSequence); } | fun |
54,574 | void (ParserDefinition definition, String extension) { myLanguage = definition.getFileNodeType().getLanguage(); myFileExt = extension; addExplicitExtension(LanguageParserDefinitions.INSTANCE, this.myLanguage, definition); registerComponentInstance( getApplication().getPicoContainer(), FileTypeManager.class, new MockFil... | configureFromParserDefinition |
54,575 | void () { instance.removeExplicitExtension(language, object); } | dispose |
54,576 | void () { getApplication().getPicoContainer().unregisterComponent(aClass.getName()); } | dispose |
54,577 | MockProjectEx () { return myProject; } | getProject |
54,578 | MockPsiManager () { return myPsiManager; } | getPsiManager |
54,579 | String () { return PathManager.getHomePath(); } | getTestDataPath |
54,580 | String () { return getTestName(myLowercaseFirstLetter); } | getTestName |
54,581 | boolean () { return false; } | includeRanges |
54,582 | boolean () { return false; } | skipSpaces |
54,583 | boolean () { return true; } | checkAllPsiRoots |
54,584 | void (boolean checkResult) { String name = getTestName(); try { String text = loadFile(name + "." + myFileExt); myFile = createPsiFile(name, text); ensureParsed(myFile); assertEquals("light virtual file text mismatch", text, ((LightVirtualFile)myFile.getVirtualFile()).getContent().toString()); assertEquals("virtual fil... | doTest |
54,585 | PsiFile (String name, String text) { return createFile(name + "." + myFileExt, text); } | createPsiFile |
54,586 | PsiFile (@NonNls String name, String text) { LightVirtualFile virtualFile = new LightVirtualFile(name, myLanguage, text); virtualFile.setCharset(CharsetToolkit.UTF8_CHARSET); return createFile(virtualFile); } | createFile |
54,587 | PsiFile (LightVirtualFile virtualFile) { return myFileFactory.trySetupPsiForFile(virtualFile, myLanguage, true, false); } | createFile |
54,588 | String (PsiElement file, boolean skipSpaces, boolean printRanges) { return DebugUtil.psiToString(file, skipSpaces, printRanges); } | toParseTreeText |
54,589 | void (PsiFile file) { file.accept(new PsiElementVisitor() { @Override public void visitElement(@NotNull PsiElement element) { element.acceptChildren(this); } }); } | ensureParsed |
54,590 | void (@NotNull PsiElement element) { element.acceptChildren(this); } | visitElement |
54,591 | void (@NotNull PsiFile file) { String psiToStringDefault = DebugUtil.psiToString(file, false, false); String fileText = file.getText(); DiffLog diffLog = (new BlockSupportImpl()).reparseRange( file, file.getNode(), TextRange.allOf(fileText), fileText, new EmptyProgressIndicator(), fileText); diffLog.performActualPsiCha... | ensureCorrectReparse |
54,592 | Promise<Object> (@NotNull PlaybackContext context) { final ActionCallback actionCallback = new ActionCallbackProfilerStopper(); WriteAction.runAndWait(() -> { Project project = context.getProject(); PsiManager.getInstance(project).dropResolveCaches(); PsiManager.getInstance(project).dropPsiCaches(); KotlinIDEModificati... | _execute |
54,593 | Promise<Object> (@NotNull PlaybackContext context) { final ActionCallback actionCallback = new ActionCallbackProfilerStopper(); WriteAction.runAndWait(() -> { JavaLibraryModificationTracker.incModificationCount(context.getProject()); actionCallback.setDone(); }); return Promises.toPromise(actionCallback); } | _execute |
54,594 | Project () { return super.getProject(); } | getProject |
54,595 | Editor () { return super.getEditor(); } | getEditor |
54,596 | PsiFile () { return super.getFile(); } | getFile |
54,597 | VirtualFile (@NotNull File file) { return LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file); } | getVirtualFile |
54,598 | boolean () { return false; } | isFirPlugin |
54,599 | String () { return KotlinTestUtils.toSlashEndingDirPath(getTestDataDirectory().getAbsolutePath()); } | getTestDataPath |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.