Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
69,400 | void () { final SpellCheckerManager manager = SpellCheckerManager.getInstance(myFixture.getProject()); final RegistryValue registryValue = Registry.get("spellchecker.corrections.limit"); final int oldCorrectionsLimit = registryValue.asInteger(); registryValue.setValue(1000); // because of quality threshold assertTrue(m... | testMaxSuggestions1000 |
69,401 | void (String word, VirtualFile file) { final SpellCheckerManager manager = SpellCheckerManager.getInstance(getProject()); try { assertTrue(manager.hasProblem(word)); CommandProcessor.getInstance().executeCommand(getProject(), () -> manager .acceptWordAsCorrect$intellij_spellchecker(word, file, getProject(), DictionaryL... | doTest |
69,402 | void (String word) { doTest(word, null); } | doTest |
69,403 | void () { doTest("wooord"); } | testGeneral |
69,404 | void () { doTest("Tyyyyypo"); } | testCamelCase |
69,405 | void () { doTest(TYPPO, myFixture.configureByText(TEST_TXT, TYPPO).getVirtualFile()); } | testNotNullFile |
69,406 | void () { final VirtualFile file = myFixture.configureByText(TEST_TXT, TYPPO).getVirtualFile(); final FileEditor editor = FileEditorManager.getInstance(getProject()).getSelectedEditor(file); final UndoManager instance = UndoManager.getInstance(getProject()); ((UndoManagerImpl)instance).dropHistoryInTests(); // to make ... | testNotUndoableNullFile |
69,407 | void () { final VirtualFile file = myFixture.configureByText(TEST_TXT, TYPPO).getVirtualFile(); final FileEditor editor = FileEditorManager.getInstance(getProject()).getSelectedEditor(file); final UndoManager instance = UndoManager.getInstance(getProject()); ((UndoManagerImpl)instance).dropHistoryInTests(); // to make ... | testUndoableNotNullFile |
69,408 | void () { final VirtualFile file = myFixture.configureByText(TEST_TXT, TYPPO).getVirtualFile(); final UndoManager instance = UndoManager.getInstance(getProject()); ((UndoManagerImpl)instance).dropHistoryInTests(); // to make sure it's empty final SpellCheckerManager manager = SpellCheckerManager.getInstance(getProject(... | testUndoRedo |
69,409 | EditableDictionary (Collection<String> projectWords) { final EditableDictionary editableDictionary = new UserDictionary("TestName"); editableDictionary.addToDictionary(APP_WORDS); return editableDictionary; } | createAppDictionary |
69,410 | void (String wordToCheck) { doContainTest(wordToCheck, TRUE); } | doContainTest |
69,411 | void (String wordToCheck, Boolean expected) { assertEquals(expected, APP_DICTIONARY.contains(wordToCheck)); } | doContainTest |
69,412 | void () { doContainTest(BBBB); } | testContainsProject |
69,413 | void () { doContainTest("eeeee", null); } | testContainsNeg |
69,414 | void () { final Set<String> expected = new HashSet<>(); expected.addAll(asList(AAAA, BBBB)); assertEquals(expected, APP_DICTIONARY.getWords()); } | testWords |
69,415 | void () { final Set<String> expected = new HashSet<>(); expected.addAll(APP_WORDS); assertEquals(expected, APP_DICTIONARY.getEditableWords()); } | testEditableWords |
69,416 | void () { final EditableDictionary appDictionary = createAppDictionary(APP_WORDS); assertEquals(TRUE, appDictionary.contains(BBBB)); appDictionary.removeFromDictionary(BBBB); assertEquals(null, appDictionary.contains(BBBB)); } | testRemoveProjectWord |
69,417 | void () { final EditableDictionary appDictionary = createAppDictionary(APP_WORDS); final String eeee = "eeee"; assertEquals(null, appDictionary.contains(eeee)); appDictionary.removeFromDictionary(eeee); assertEquals(null, appDictionary.contains(eeee)); } | testRemoveNotPresented |
69,418 | void () { final EditableDictionary appDictionary = createAppDictionary(APP_WORDS); appDictionary.clear(); // current behavior assert APP_WORDS.stream().allMatch(w -> appDictionary.contains(w) == null); } | testClear |
69,419 | void () { final EditableDictionary appDictionary = createAppDictionary(APP_WORDS); appDictionary.addToDictionary("EEEE"); assert appDictionary.contains("EEEE"); } | testAdd |
69,420 | void () { final EditableDictionary appDictionary = createAppDictionary(APP_WORDS); final List<String> wordsToAdd = asList("EEEE", "KKKK"); appDictionary.addToDictionary(wordsToAdd); assert wordsToAdd.stream().allMatch(appDictionary::contains); } | testAddCollection |
69,421 | void () { final EditableDictionary appDictionary = createAppDictionary(APP_WORDS); final List<String> wordsToReplace = asList("EEEE", "KKKK"); appDictionary.replaceAll(wordsToReplace); assert wordsToReplace.stream().allMatch(appDictionary::contains); assert APP_WORDS.stream().allMatch(projectWord -> appDictionary.conta... | testReplace |
69,422 | void () { final List<String> suggestions = new ArrayList<>(); APP_DICTIONARY.consumeSuggestions("AAAB", suggestions::add); assert suggestions.isEmpty(); // TODO: change current behavior } | testGetSuggestions |
69,423 | void () { final List<String> suggestions = new ArrayList<>(); APP_DICTIONARY.consumeSuggestions("EEEE", suggestions::add); assert suggestions.isEmpty(); } | testNoSuggestions |
69,424 | String () { return getTestName(true) + "_dict"; } | getDictDirName |
69,425 | String () { return Paths.get(getSpellcheckerTestDataPath(), "inspection", "dictionary").toString(); } | getBasePath |
69,426 | VirtualFile () { return dictDir.findChild(TEST_DIC); } | getTestDictionaryFile |
69,427 | VirtualFile () { return dictDir.findChild(TEST_DIC_AFTER); } | getTestDictionaryAfter |
69,428 | void () { doTest(Paths.get(getTestName(true), "test.before.php").toString()); } | doBeforeCheck |
69,429 | void () { doTest(Paths.get(getTestName(true), "test.after.php").toString()); } | doAfterCheck |
69,430 | ProjectDictionary (Collection<String> projectWords) { String currentUser = System.getProperty("user.name"); final ProjectDictionary projectDictionary = new ProjectDictionary(Collections.singleton(new UserDictionary(currentUser))); projectDictionary.setActiveName(currentUser); projectDictionary.addToDictionary(projectWo... | createProjectDictionary |
69,431 | void (String wordToCheck) { doContainTest(wordToCheck, TRUE); } | doContainTest |
69,432 | void (String wordToCheck, Boolean expected) { assertEquals(expected, myProjectDictionary.contains(wordToCheck)); } | doContainTest |
69,433 | void () { doContainTest(BBBB); } | testContainsProject |
69,434 | void () { doContainTest("eeeee", null); } | testContainsNeg |
69,435 | void () { final Set<String> expected = new HashSet<>(); expected.addAll(asList(AAAA, BBBB)); assertEquals(expected, myProjectDictionary.getWords()); } | testWords |
69,436 | void () { final Set<String> expected = new HashSet<>(); expected.addAll(PROJECT_WORDS); assertEquals(expected, myProjectDictionary.getEditableWords()); } | testEditableWords |
69,437 | void () { final ProjectDictionary projectDictionary = createProjectDictionary(PROJECT_WORDS); assertEquals(TRUE, projectDictionary.contains(BBBB)); projectDictionary.removeFromDictionary(BBBB); assertEquals(null, projectDictionary.contains(BBBB)); } | testRemoveProjectWord |
69,438 | void () { final ProjectDictionary projectDictionary = createProjectDictionary(PROJECT_WORDS); final String eeee = "eeee"; assertEquals(null, projectDictionary.contains(eeee)); projectDictionary.removeFromDictionary(eeee); assertEquals(null, projectDictionary.contains(eeee)); } | testRemoveNotPresented |
69,439 | void () { final ProjectDictionary projectDictionary = createProjectDictionary(PROJECT_WORDS); projectDictionary.clear(); // current behavior assert PROJECT_WORDS.stream().allMatch(w -> projectDictionary.contains(w) == null); } | testClear |
69,440 | void () { final ProjectDictionary projectDictionary = createProjectDictionary(PROJECT_WORDS); projectDictionary.addToDictionary("EEEE"); assert projectDictionary.contains("EEEE"); } | testAdd |
69,441 | void () { final ProjectDictionary projectDictionary = createProjectDictionary(PROJECT_WORDS); final List<String> wordsToAdd = asList("EEEE", "KKKK"); projectDictionary.addToDictionary(wordsToAdd); assert wordsToAdd.stream().allMatch(projectDictionary::contains); } | testAddCollection |
69,442 | void () { final ProjectDictionary projectDictionary = createProjectDictionary(PROJECT_WORDS); final List<String> wordsToReplace = asList("EEEE", "KKKK"); projectDictionary.replaceAll(wordsToReplace); assert wordsToReplace.stream().allMatch(projectDictionary::contains); assert PROJECT_WORDS.stream().allMatch(projectWord... | testReplace |
69,443 | void () { final List<String> suggestions = new ArrayList<>(); myProjectDictionary.consumeSuggestions("AAAB", suggestions::add); assert suggestions.isEmpty(); // TODO: change current behavior } | testGetSuggestions |
69,444 | void () { final List<String> suggestions = new ArrayList<>(); myProjectDictionary.consumeSuggestions("EEEE", suggestions::add); assert suggestions.isEmpty(); } | testNoSuggestions |
69,445 | String () { return getSpellcheckerTestDataPath() + "/inspection/commentsWithMistakes"; } | getBasePath |
69,446 | void () { doTest("SPITest1.java"); } | testJava |
69,447 | void () { Locale locale = Locale.getDefault(); try { Locale.setDefault(new Locale("tr", "TR")); doTest("SPITest2.java"); } finally { Locale.setDefault(locale); } } | testJavaWithTurkishLocale |
69,448 | void () { doTest("A.xml"); } | testXml |
69,449 | void () { doTest("test.html"); } | testHtml |
69,450 | void () { doTest("test.txt"); } | testTxt |
69,451 | String () { return getSpellcheckerTestDataPath() + "/inspection/propertiesWithMistakes"; } | getBasePath |
69,452 | void () { doTest("test.properties"); } | testProperties |
69,453 | void () { final int typoCount = 5000; @SuppressWarnings("SpellCheckingInspection") String text = StringUtil.repeat("aaaaaaaaa ", typoCount); // about 0.5M long start = System.currentTimeMillis(); VirtualFile file = myFixture.addFileToProject("foo.txt", text).getVirtualFile(); LOG.debug("creation took " + (System.curren... | testLargeTextFileWithManyTypos |
69,454 | void () { final int count = 100000; String text = StringUtil.repeat("//\n \t \t \n \n", count); long start = System.currentTimeMillis(); VirtualFile file = myFixture.addFileToProject("foo.java", text).getVirtualFile(); LOG.debug("creation took " + (System.currentTimeMillis() - start) + " ms"); start = System.currentTim... | testManyWhitespaces |
69,455 | void () { final String text = "\\LONG_EMAIL: " + StringUtil.repeat("ivan.ivanov", 1000000) + "@mail.com\n"; doSplitterPerformanceTest(text, CommentSplitter.getInstance(), 8000); } | testVeryLongEmail |
69,456 | void () { final String text = "\\LONG_URL: http://" + StringUtil.repeat("ivan.ivanov", 1000000) + ".com\n"; doSplitterPerformanceTest(text, CommentSplitter.getInstance(), 8000); } | testVeryLongURL |
69,457 | void () { final String text = "\\ LONG_HTML <!--<li>something go here</li>" + StringUtil.repeat("<li>next content</li>", 1000000) + "foooo barrrr <p> text -->"; doSplitterPerformanceTest(text, CommentSplitter.getInstance(), 5000); } | testVeryLongHTML |
69,458 | void () { final String text = StringUtil.repeat("identifier1", 1000000); doSplitterPerformanceTest(text, IdentifierSplitter.getInstance(), 3000); } | testVeryLongIdentifier |
69,459 | void () { final String text = "word" + StringUtil.repeat("\n\t\r\t\n", 1000000); doSplitterPerformanceTest(text, TextSplitter.getInstance(), 2000); } | testVeryLongSpecialCharacters |
69,460 | void () { final String text = StringUtil.repeat("properties.test.properties", 1000000); doSplitterPerformanceTest(text, PropertiesSplitter.getInstance(), 4000); } | testVeryLongProperty |
69,461 | void () { final String text = StringUtil.repeat("properties,test,properties", 1000000); doSplitterPerformanceTest(text, PlainTextSplitter.getInstance(), 3000); } | testVeryLongList |
69,462 | void (String text, Splitter splitter, int expectedTime) { PlatformTestUtil.startPerformanceTest("long word for spelling", expectedTime, () -> { try { splitter.split(text, TextRange.allOf(text), (textRange) -> {}); } catch (ProcessCanceledException pce) { System.err.println("pce is thrown"); } }).attempts(1).assertTimin... | doSplitterPerformanceTest |
69,463 | List<HighlightInfo> () { myFixture.enableInspections(getInspectionTools()); int[] toIgnore = ignoreEverythingExceptInspections(); return CodeInsightTestFixtureImpl.instantiateAndRun(myFixture.getFile(), myFixture.getEditor(), toIgnore, false); } | runLocalInspections |
69,464 | boolean () { return true; } | isCommunity |
69,465 | String () { return "/spellchecker/testData/"; } | getSpellcheckerTestDataPath |
69,466 | void (String file) { myFixture.enableInspections(getInspectionTools()); myFixture.testHighlighting(false, false, true, file); } | doTest |
69,467 | LocalInspectionTool[] () { return new LocalInspectionTool[]{new SpellCheckingInspection()}; } | getInspectionTools |
69,468 | String () { return SpellcheckerInspectionTestCase.getSpellcheckerTestDataPath() + "inspection/xmlWithMistakes"; } | getBasePath |
69,469 | void () { doTest("test.xml"); } | testXml |
69,470 | void () { doTest("test.html"); } | testCharacterData |
69,471 | void () { doTest("attributes.html"); } | testKnownAttributes |
69,472 | void () { // "evenodd" is correct word in SVG, because it is known enumeration option in SVG doTest("enumerations.svg"); } | testXsdEnumerations |
69,473 | void () { doTest("htmlIntegrity.html"); } | testLinkIntegrity |
69,474 | String () { return ".java"; } | getExtension |
69,475 | void () { doChangeToTest(); } | testSimpleWordChangeTo |
69,476 | void () { doChangeToTest(); } | testInjectionChangeTo |
69,477 | String () { return ".txt"; } | getExtension |
69,478 | void () { doChangeToTest(); } | testSimpleWordChangeTo |
69,479 | void () { doChangeToTest(); } | testSeveralWordsChangeTo |
69,480 | void () { doChangeToTest(); } | testJoinedWordsChangeTo |
69,481 | void () { doChangeToTest(); } | testTypoInsideJoinedWordsChangeTo |
69,482 | void () { doChangeToTest(); } | testSeveralJoinedTyposChangeTo |
69,483 | void () { doNoQuickFixTest(ChangeTo.getFixName()); } | testNoTypoChangeTo |
69,484 | void () { doNoQuickFixTest(ChangeTo.getFixName()); } | testEmptyChangeTo |
69,485 | void () { doNoQuickFixTest(RenameTo.getFixName()); } | testEmptyRenameTo |
69,486 | void () { doNoQuickFixTest(SaveTo.getFixName()); } | testEmptySaveTo |
69,487 | void () { doNoQuickFixTest(SaveTo.getFixName()); } | testNoTypoSaveTo |
69,488 | void () { doNoQuickFixTest(RenameTo.getFixName()); } | testNoTypoRenameTo |
69,489 | void () { doNoQuickFixTest(RenameTo.getFixName()); } | testSimpleWordRenameTo |
69,490 | String () { return getSpellcheckerTestDataPath() + "inspection" + File.separator + "quickfixes"; } | getBasePath |
69,491 | void (int toSelect) { myFixture.configureByFile(getBeforeFile()); myFixture.enableInspections(SpellCheckingInspection.class); final IntentionAction intention = ContainerUtil.filter( myFixture.getAvailableIntentions(), (it) -> it.getFamilyName().equals(ChangeTo.getFixName()) ).get(toSelect + 1); assertNotNull("cannot fi... | doChangeToTest |
69,492 | void (String quickfix) { myFixture.configureByFile(getBeforeFile()); myFixture.enableInspections(SpellCheckingInspection.class); assertNull(myFixture.getAvailableIntention(quickfix)); } | doNoQuickFixTest |
69,493 | void () { doChangeToTest(0); } | doChangeToTest |
69,494 | String () { return getTestName(true) + ".after" + getExtension(); } | getResultFile |
69,495 | String () { return getTestName(true) + getExtension(); } | getBeforeFile |
69,496 | String () { return ".xml"; } | getExtension |
69,497 | void () { doChangeToTest(); } | testSimpleWordChangeTo |
69,498 | void () { doChangeToTest(); } | testInjectionChangeTo |
69,499 | void () { doTest(true, "<TYPO descr=\"Typo: In word 'missspelling'\">missspelling</TYPO>"); } | testEnabled |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.