Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
273,100 | void () { assertEquals("UTF-8", AbstractExternalFilter.parseContentEncoding(validUtf8Example)); assertEquals("utf-8", AbstractExternalFilter.parseContentEncoding(chineseFlexDocExample)); assertNull(AbstractExternalFilter.parseContentEncoding(brokenExample)); assertEquals("UTF-8", AbstractExternalFilter.parseContentEncoding(confluenceExample)); assertEquals("windows-1251", AbstractExternalFilter.parseContentEncoding(win1251Example)); } | testEncodingDetector |
273,101 | void () { String description = "description with <>"; String tooltip = XmlStringUtil.wrapInHtml(XmlStringUtil.escapeString(description) + "<br>" + "<a href ='#navigation//some/path.txt:0'>" + XmlStringUtil.escapeString("hint with <>") + "</a>"); assertTooltipValid(description, tooltip); } | testHtmlTooltipWithDescription |
273,102 | void () { String description = "description with <>"; String tooltip = XmlStringUtil.wrapInHtml("Different description: " + "<br>" + "<a href ='#navigation//some/path.txt:0'>" + XmlStringUtil.escapeString("hint with <>") + "</a>"); assertTooltipValid(description, tooltip); } | testHtmlTooltipWithoutDescription |
273,103 | void (@NotNull String description, @NotNull String tooltip) { HighlightInfo newInfo = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR) .range(1, 2) .description(description).escapedToolTip(tooltip).createUnconditionally(); assertEquals(tooltip, newInfo.getToolTip()); } | assertTooltipValid |
273,104 | void (@NotNull FileType fileType, @NotNull String textToType, @NotNull String initial, @NotNull String expected) { String name = "test." + fileType.getDefaultExtension(); configureFromFileText(name, initial); assertFileTypeResolved(fileType, name); for (char c : textToType.toCharArray()) { type(c); } checkResultByText(expected); } | checkWrapOnTyping |
273,105 | void () { mySettings.setDefaultRightMargin(10); checkWrapOnTyping(PlainTextFileType.INSTANCE, "t", "text text <caret>", "text text \nt<caret>"); } | testWrapAfterSpaceOnMargin |
273,106 | void () { assertSplitEquals(new String[]{"I", "Base"}, "IBase"); } | testSplitIntoWords1 |
273,107 | void () { assertSplitEquals(new String[]{"Order", "Index"}, "OrderIndex"); } | testSplitIntoWords2 |
273,108 | void () { assertSplitEquals(new String[]{"order", "Index"}, "orderIndex"); } | testSplitIntoWords3 |
273,109 | void () { assertSplitEquals(new String[]{"Order", "Index"}, "Order_Index"); } | testSplitIntoWords4 |
273,110 | void () { assertSplitEquals(new String[]{"ORDER", "INDEX"}, "ORDER_INDEX"); } | testSplitIntoWords5 |
273,111 | void () { assertSplitEquals(new String[]{"gg", "J"}, "ggJ"); } | testSplitIntoWords6 |
273,112 | void () { assertSplitEquals(new String[]{"测", "试", "打", "补", "丁", "2"}, "测试打补丁2"); } | testSplitIntoWordsCN |
273,113 | void () { assertSplitEquals( new String[]{"ローマ", "由", "来", "の", "アルファベット", "(", "ラテン", "文", "字", ")", "を", "用", "いて", "日", "本", "語", "を", "表", "記", "することもでき", "、", "日", "本", "では", "ローマ", "字", "と", "呼", "ばれる"}, "ローマ由来のアルファベット(ラテン文字)を用いて日本語を表記することもでき、日本ではローマ字と呼ばれる"); //noinspection NonAsciiCharacters assertSplitEquals(new String[]{"近", "代", "では", "日", "本", "人", "が", "漢", "語", "を", "造", "語", "する", "例", "もあり", "、", "英", "語", "の", "philosophy", "、", "ドイツ", "語", "の", "Philosophie", "を", "指", "す", "用", "語"}, "近代では日本人が漢語を造語する例もあり、英語のphilosophy、ドイツ語のPhilosophieを指す用語"); } | testSplitIntoWordsJP |
273,114 | void () { assertSplitEquals(new String[]{"\uD83E\uDD2B", " ", "\uD83D\uDD2B", "\uD83E\uDDD2"}, "\uD83E\uDD2B \uD83D\uDD2B\uD83E\uDDD2"); } | testEmoji |
273,115 | void () { assertTrue(NameUtilCore.isWordStart("测试打补丁", 0)); assertTrue(NameUtilCore.isWordStart("测试打补丁", 2)); } | testIsWordStart |
273,116 | void (String[] expected, String name) { final String[] result = NameUtil.splitNameIntoWords(name); assertEquals(Arrays.asList(expected).toString(), Arrays.asList(result).toString()); } | assertSplitEquals |
273,117 | VirtualFile (String name, String content) { VirtualFile file = tempDir.createVirtualFile(name, content); // this should be new physical file with no any data associated with it assertTrue("VirtualFile should be VirtualFileWithId, actual type is " + file.getClass(), file instanceof VirtualFileWithId); assertNull("File [" + file + "] should be fresh, no data associated with it", memKey.get(file)); assertNull("File [" + file + "] should be fresh, no data associated with it", key.getPersistentValue(file)); return file; } | createVirtualFile |
273,118 | void () { LightVirtualFile file = new LightVirtualFile(); TestCase.assertFalse("VirtualFile should NOT be VirtualFileWithId, actual type is " + file.getClass(), file instanceof VirtualFileWithId); TestCase.assertTrue(key.setPersistentValue(file, sample1)); TestCase.assertEquals(sample1, key.getPersistentValue(file)); TestCase.assertTrue(key.setPersistentValue(file, null)); TestCase.assertNull(key.getPersistentValue(file)); } | testLightVirtualFile |
273,119 | void () { Assume.assumeFalse(FilePropertyKeyImpl.getREAD_PERSISTENT_VALUE()); VirtualFile file = createVirtualFile("Foo.java", ""); TestCase.assertTrue("Write sample1 to file", key.setPersistentValue(file, sample1)); TestCase.assertEquals(sample1, key.getPersistentValue(file)); memKey.set(file, null); // clear memory data TestCase.assertNull("Should read null from memory (before write)", key.getPersistentValue(file)); TestCase.assertFalse("Should not update sample1>sample1 value in file", key.setPersistentValue(file, sample1)); TestCase.assertEquals("Should read sample1 from memory (after write)", sample1, key.getPersistentValue(file)); } | testReadFromFile_PersistenceDisabled |
273,120 | void () { Assume.assumeTrue(FilePropertyKeyImpl.getREAD_PERSISTENT_VALUE()); VirtualFile file = createVirtualFile("Foo.java", ""); TestCase.assertTrue("Write sample1 to file", key.setPersistentValue(file, sample1)); TestCase.assertEquals(sample1, key.getPersistentValue(file)); memKey.set(file, null); // clear memory data TestCase.assertEquals("Should read previous value from file", sample1, key.getPersistentValue(file)); TestCase.assertFalse("Should not update sample1>sample1 value in file", key.setPersistentValue(file, sample1)); TestCase.assertEquals("Should read sample1 from memory (after write)", sample1, key.getPersistentValue(file)); TestCase.assertTrue("Write null to file", key.setPersistentValue(file, null)); TestCase.assertNull(key.getPersistentValue(file)); memKey.set(file, null); // clear memory data TestCase.assertNull("Should read null from file", key.getPersistentValue(file)); } | testReadFromFile_PersistenceEnabled |
273,121 | void () { VirtualFile file = createVirtualFile("Foo.java", ""); TestCase.assertNull("No previous value in vfs, should read null", key.getPersistentValue(file)); TestCase.assertNull("Second read should also return null", key.getPersistentValue(file)); } | testGetFromEmpty |
273,122 | void () { VirtualFile file = createVirtualFile("Foo.java", ""); TestCase.assertTrue("First set should change null to sample1", key.setPersistentValue(file, sample1)); TestCase.assertFalse("Second set should not change existing value", key.setPersistentValue(file, sample1)); TestCase.assertEquals(sample1, key.getPersistentValue(file)); TestCase.assertTrue("First set should change sample1 to sample2", key.setPersistentValue(file, sample2)); TestCase.assertFalse("Second set should not change existing value", key.setPersistentValue(file, sample2)); TestCase.assertEquals(sample2, key.getPersistentValue(file)); } | testSetGetTwoSamples |
273,123 | void () { VirtualFile file = createVirtualFile("Foo.java", ""); TestCase.assertNull("Initial value is null", key.getPersistentValue(file)); TestCase.assertTrue("Write something not-null", key.setPersistentValue(file, sample1)); TestCase.assertEquals(sample1, key.getPersistentValue(file)); TestCase.assertTrue("Write null, should change previous value", key.setPersistentValue(file, null)); TestCase.assertFalse("Second set should not change existing value", key.setPersistentValue(file, null)); TestCase.assertNull("We still can read null", key.getPersistentValue(file)); } | testSetGetNulls |
273,124 | void () { Assume.assumeTrue(key == STRING_KEY); VirtualFile file = createVirtualFile("Foo.java", ""); List<String> values = Arrays.asList("value", "s p a c e s", ",", "", " ", "\t", "null", null); for (String value : values) { STRING_KEY.setPersistentValue(file, value); assertEquals("Should read exactly the same string (read from memory)", value, STRING_KEY.getPersistentValue(file)); memKey.set(file, null); // clear memory data assertFalse("Should not update to the same string: '" + value + "'", STRING_KEY.setPersistentValue(file, value)); assertEquals("Should read exactly the same string (read from memory)", value, STRING_KEY.getPersistentValue(file)); if (!FilePropertyKeyImpl.getREAD_PERSISTENT_VALUE()) continue; memKey.set(file, null); // clear memory data assertEquals("Should read exactly the same string (read from file)", value, STRING_KEY.getPersistentValue(file)); } } | testStringNotModifiedWhenPersisted |
273,125 | Collection () { return Arrays.asList(new Object[][]{ {STRING_KEY, "sample1", "sample2"}, {INT_KEY, 1, 42}, {ENUM_KEY, TestEnum.ONE, TestEnum.TWO} }); } | samples |
273,126 | void () { assertMatches("N", "NameUtilTest"); assertMatches("NU", "NameUtilTest"); assertMatches("NUT", "NameUtilTest"); assertMatches("NaUT", "NameUtilTest"); assertDoesntMatch("NeUT", "NameUtilTest"); assertDoesntMatch("NaUTa", "NameUtilTest"); assertMatches("NaUtT", "NameUtilTest"); assertMatches("NaUtT", "NameUtilTest"); assertMatches("NaUtTe", "NameUtilTest"); assertMatches("AACl", "AAClass"); assertMatches("ZZZ", "ZZZZZZZZZZ"); } | testSimpleCases |
273,127 | void () { assertMatches("", ""); assertMatches("", "asdfs"); } | testEmptyPrefix |
273,128 | void () { assertMatches("nt", "NameUtilTest"); assertMatches("repl map", "ReplacePathToMacroMap"); assertMatches("replmap", "ReplacePathToMacroMap"); assertMatches("CertificateEx", "CertificateEncodingException"); assertDoesntMatch("ABCD", "AbstractButton.DISABLED_ICON_CHANGED_PROPERTY"); assertMatches("templipa", "template_impl_template_list_panel"); assertMatches("templistpa", "template_impl_template_list_panel"); } | testSkipWords |
273,129 | void () { assertMatches("N", "nameUtilTest"); assertDoesntMatch("N", "anameUtilTest"); assertMatches("NU", "nameUtilTest"); assertDoesntMatch("NU", "anameUtilTest"); assertMatches("NUT", "nameUtilTest"); assertMatches("NaUT", "nameUtilTest"); assertDoesntMatch("NeUT", "nameUtilTest"); assertDoesntMatch("NaUTa", "nameUtilTest"); assertMatches("NaUtT", "nameUtilTest"); assertMatches("NaUtT", "nameUtilTest"); assertMatches("NaUtTe", "nameUtilTest"); } | testSimpleCasesWithFirstLowercased |
273,130 | void () { assertMatches("Na Ut Te", "name util test"); assertMatches("Na Ut Te", "name Util Test"); assertDoesntMatch("Na Ut Ta", "name Util Test"); assertMatches("na ut te", "name util test"); assertMatches("na ut", "name_util_test"); assertMatches("na te", "name_util_test"); assertDoesntMatch("na ti", "name_util_test"); assertDoesntMatch("alias imple", "alias simple"); assertDoesntMatch("alias mple", "alias simple"); assertDoesntMatch("alias nother", "alias another"); } | testSpaceDelimiters |
273,131 | void () { assertDoesntMatch("N_T", "NameUtilTest"); assertMatches("ORGS_ACC", "ORGS_POSITION_ACCOUNTABILITY"); assertMatches("ORGS-ACC", "ORGS-POSITION_ACCOUNTABILITY"); assertMatches("ORGS.ACC", "ORGS.POSITION_ACCOUNTABILITY"); } | testXMLCompletion |
273,132 | void () { assertDoesntMatch("ar*l*p", "AbstractResponseHandler"); } | testStarFalsePositive |
273,133 | void () { assertMatches("N_U_T", "NAME_UTIL_TEST"); assertMatches("NUT", "NAME_UTIL_TEST"); assertDoesntMatch("NUT", "NameutilTest"); } | testUnderscoreStyle |
273,134 | void () { assertMatches("NOS", "NetOutputStream"); } | testAllUppercase |
273,135 | void () { // See IDEADEV-12310 assertMatches("BLWN", "base_layout_without_navigation.xhtml"); assertMatches("BLWN", "base-layout-without-navigation.xhtml"); assertMatches("FC", "faces-config.xml"); assertMatches("ARS", "activity_report_summary.jsp"); assertMatches("AD", "arrow_down.gif"); assertMatches("VL", "vehicle-listings.css"); assertMatches("ARS.j", "activity_report_summary.jsp"); assertDoesntMatch("ARS.j", "activity_report_summary.xml"); assertDoesntMatch("ARS.j", "activity_report_summary_justsometingwrong.xml"); assertMatches("foo.goo", "foo.bar.goo"); assertDoesntMatch("*.ico", "sm.th.iks.concierge"); } | testCommonFileNameConventions |
273,136 | void () { assertMatches("fo bar", "fooBar"); assertMatches("foo bar", "fooBar"); assertMatches("foo bar", "fooGooBar"); assertMatches("foo bar", "fooGoo bar"); assertDoesntMatch(" b", "fbi"); assertDoesntMatch(" for", "performAction"); assertTrue(caseInsensitiveMatcher(" us").matches("getUsage")); assertTrue(caseInsensitiveMatcher(" us").matches("getMyUsage")); } | testSpaceForAnyWordsInBetween |
273,137 | void () { assertMatches("Google Test.html", "Google Test Test.cc.html"); assertMatches("Google.html", "Google Test Test.cc.html"); assertMatches("Google .html", "Google Test Test.cc.html"); assertMatches("Google Test*.html", "Google Test Test.cc.html"); } | testFilenamesWithDotsAndSpaces |
273,138 | MinusculeMatcher (String pattern) { return NameUtil.buildMatcher(pattern, NameUtil.MatchingCaseSensitivity.NONE); } | caseInsensitiveMatcher |
273,139 | void () { assertMatches("A*.html", "A.html"); assertMatches("A*.html", "Abc.html"); assertMatches("A*.html", "after.html"); assertDoesntMatch("A*.html", "10_after.html"); } | testStartDot |
273,140 | void () { assertMatches("AR.jsp", "add_relationship.jsp"); assertMatches("AR.jsp", "advanced_rule.jsp"); assertMatches("AR.jsp", "alarm_reduction.jsp"); assertMatches("AR.jsp", "audiot_report.jsp"); assertMatches("AR.jsp", "audiot_r.jsp"); assertMatches("AR.jsp", "alarm_rule_action.jsp"); assertMatches("AR.jsp", "alarm_rule_admin.jsp"); assertMatches("AR.jsp", "alarm_rule_administration.jsp"); assertMatches("AR.jsp", "alarm_rule_controller.jsp"); assertMatches("AR.jsp", "alarm_rule_frame.jsp"); assertMatches("AR.jsp", "alarm_rule_severity.jsp"); assertMatches("AR.jsp", "AddRelationship.jsp"); assertMatches("AR.jsp", "AdvancedRule.jsp"); assertMatches("AR.jsp", "AlarmReduction.jsp"); assertMatches("AR.jsp", "AudiotReport.jsp"); assertMatches("AR.jsp", "AudiotR.jsp"); assertMatches("AR.jsp", "AlarmRuleAction.jsp"); assertMatches("AR.jsp", "AlarmRuleAdmin.jsp"); assertMatches("AR.jsp", "AlarmRuleAdministration.jsp"); assertMatches("AR.jsp", "AlarmRuleController.jsp"); assertMatches("AR.jsp", "AlarmRuleFrame.jsp"); assertMatches("AR.jsp", "AlarmRuleSeverity.jsp"); } | testIDEADEV15503 |
273,141 | void () { assertMatches("ja", "jquery.autocomplete.js"); assertDoesntMatch("ja.js", "jquery.autocomplete.js"); assertMatches("jajs", "jquery.autocomplete.js"); assertMatches("jjs", "jquery.autocomplete.js"); assertMatches("j.js", "jquery.autocomplete.js"); assertDoesntMatch("j.ajs", "jquery.autocomplete.js"); assertMatches("oracle.bnf", "oracle-11.2.bnf"); assertMatches("*foo.*bar", "foo.b.bar"); } | testSkipDot |
273,142 | void () { assertMatches("#.p", "#.php"); assertMatches("#", "#.php"); assertMatches("a", "a.php"); } | testNoExtension |
273,143 | void () { assertMatches("comboBox", "combobox"); assertMatches("combobox", "comboBox"); } | testIgnoreCaseWhenCompleteMatch |
273,144 | void () { assertMatches(".foo", ".foo"); } | testStartsWithDot |
273,145 | void () { assertMatches("*inspection*.pro", "InspectionsBundle.properties"); assertDoesntMatch("*inspection*.pro", "InspectionsInProgress.png"); } | testProperDotEscaping |
273,146 | void () { assertDoesntMatch("form", "_form.html.erb"); assertMatches("_form", "_form.html.erb"); assertMatches("_form", "__form"); assertTrue(firstLetterMatcher("_form").matches("__form")); } | testLeadingUnderscore |
273,147 | void () { assertMatches("uct", "unit_controller_test"); assertMatches("unictest", "unit_controller_test"); assertMatches("uc", "unit_controller_test"); assertDoesntMatch("nc", "unit_controller_test"); assertDoesntMatch("utc", "unit_controller_test"); } | testLowerCaseWords |
273,148 | void () { assertMatches("h*:", "h:aaa"); assertMatches("h:", "h:aaa"); assertMatches("text:sh", "textField:shouldChangeCharactersInRange:replacementString:"); assertMatches("abc", "aaa:bbb:ccc"); assertMatches("textField:sh", "textField:shouldChangeCharactersInRange:replacementString:"); assertMatches("text*:sh", "textField:shouldChangeCharactersInRange:replacementString:"); } | testObjectiveCCases |
273,149 | void () { assertMatches("*fo", "reformat"); assertMatches("*f", "reFormat"); assertMatches("*f", "format"); assertMatches("*f", "Format"); assertMatches("*Stri", "string"); assertMatches("*f", "reformat"); assertMatches("*f", "reformatCode"); assertDoesntMatch("*fc", "reformatCode"); assertDoesntMatch("*foc", "reformatCode"); assertMatches("*forc", "reformatCode"); assertDoesntMatch("*sTC", "LazyClassTypeConstructor"); assertDoesntMatch("*Icon", "LEADING_CONSTRUCTOR"); assertMatches("*I", "LEADING_CONSTRUCTOR"); assertMatches("*i", "LEADING_CONSTRUCTOR"); assertMatches("*in", "LEADING_CONSTRUCTOR"); assertMatches("*ing", "LEADING_CONSTRUCTOR"); assertDoesntMatch("*inc", "LEADING_CONSTRUCTOR"); assertDoesntMatch("*ico", "drawLinePickedOut"); assertMatches("*l", "AppDelegate"); assertMatches("*le", "AppDelegate"); assertMatches("*leg", "AppDelegate"); } | testMiddleMatchingMinimumTwoConsecutiveLettersInWordMiddle |
273,150 | void () { assertMatches("*_dark", "collapseAll_dark.png"); assertMatches("*_dark.png", "collapseAll_dark.png"); assertMatches("**_dark.png", "collapseAll_dark.png"); assertTrue(firstLetterMatcher("*_DARK").matches("A_DARK.png")); } | testMiddleMatchingUnderscore |
273,151 | void () { assertMatches("*zz*", "ListConfigzzKey"); assertMatches("*zz", "ListConfigzzKey"); assertTrue(caseInsensitiveMatcher("*old").matches("folder")); assertMatches("SWU*H*7", "SWUpgradeHdlrFSPR7Test"); assertMatches("SWU*H*R", "SWUpgradeHdlrFSPR7Test"); assertMatches("SWU*H*R", "SWUPGRADEHDLRFSPR7TEST"); assertMatches("*git", "GitBlaBla"); assertMatches("*Git", "GitBlaBla"); assertDoesntMatch("*get*A", "getClass"); assertMatches("*git", "BlaGitBla"); assertMatches("*Git", "BlaGitBla"); assertTrue(firstLetterMatcher("*Git").matches("BlagitBla")); assertMatches("*git", "BlagitBla"); assertMatches("*Git*", "AtpGenerationItem"); assertMatches("Collec*Util*", "CollectionUtils"); assertMatches("Collec*Util*", "CollectionUtilsTest"); assertTrue(caseInsensitiveMatcher("*us").matches("usage")); assertTrue(caseInsensitiveMatcher(" us").matches("usage")); assertTrue(caseInsensitiveMatcher(" fo. ba").matches("getFoo.getBar")); assertMatches(" File. sepa", "File.separator"); assertMatches(" File. sepa", "File._separator"); assertMatches(" File. _sepa", "File._separator"); assertMatches(" _fo", "_foo"); assertMatches("*BComp", "BaseComponent"); } | testMiddleMatching |
273,152 | void () { assertMatches("*OS", "ios"); assertMatches("*OS", "IOS"); assertMatches("*OS", "osx"); assertMatches("*OS", "OSX"); assertTrue(firstLetterMatcher("*I").matches("ID")); assertFalse(firstLetterMatcher("*I").matches("id")); } | testUppercasePrefixWithMiddleMatching |
273,153 | void () { assertMatches("*LRUMap", "SLRUMap"); } | testAsteriskEndingInsideUppercaseWord |
273,154 | void () { assertTrue(firstLetterMatcher(" cl").matches("getClass")); assertFalse(firstLetterMatcher(" EUC-").matches("x-EUC-TW")); assertTrue(firstLetterMatcher(" a").matches("aaa")); assertFalse(firstLetterMatcher(" a").matches("Aaa")); assertFalse(firstLetterMatcher(" a").matches("Aaa")); assertFalse(firstLetterMatcher(" _bl").matches("_top")); assertFalse(firstLetterMatcher("*Ch").matches("char")); assertTrue(firstLetterMatcher("*Codes").matches("CFLocaleCopyISOCountryCodes")); assertFalse(firstLetterMatcher("*codes").matches("CFLocaleCopyISOCountryCodes")); assertTrue(firstLetterMatcher("*codes").matches("getCFLocaleCopyISOCountryCodes")); assertTrue(firstLetterMatcher("*Bcomp").matches("BaseComponent")); } | testMiddleMatchingFirstLetterSensitive |
273,155 | void () { assertPreference("ProVi", "PROVIDER", "ProjectView"); } | testPreferCamelHumpsToAllUppers |
273,156 | Matcher (String pattern) { return NameUtil.buildMatcher(pattern, NameUtil.MatchingCaseSensitivity.FIRST_LETTER); } | firstLetterMatcher |
273,157 | void () { assertTrue(caseInsensitiveMatcher("create ").matches("create module")); } | testSpaceInCompletionPrefix |
273,158 | void () { assertMatches("Product.findByDateAndNameGreaterThanEqualsAndQualityGreaterThanEqual", "Product.findByDateAndNameGreaterThanEqualsAndQualityGreaterThanEqualsIntellijIdeaRulezzz"); } | testLong |
273,159 | void (@NonNls String pattern, @NonNls String name) { assertTrue(pattern + " doesn't match " + name + "!!!", caseInsensitiveMatcher(pattern).matches(name)); } | assertMatches |
273,160 | void (@NonNls String pattern, @NonNls String name) { assertFalse(pattern + " matches " + name + "!!!", caseInsensitiveMatcher(pattern).matches(name)); } | assertDoesntMatch |
273,161 | void () { assertMatches("ABC_B.C", "abc_b.c"); } | testUpperCaseMatchesLowerCase |
273,162 | void () { assertMatches("foo", "foo"); assertDoesntMatch("foo", "fxoo"); assertMatches("foo", "fOo"); assertMatches("foo", "fxOo"); assertMatches("foo", "fXOo"); assertMatches("fOo", "foo"); assertDoesntMatch("fOo", "FaOaOaXXXX"); assertMatches("ncdfoe", "NoClassDefFoundException"); assertMatches("fob", "FOO_BAR"); assertMatches("fo_b", "FOO_BAR"); assertMatches("fob", "FOO BAR"); assertMatches("fo b", "FOO BAR"); assertMatches("AACl", "AAClass"); assertMatches("ZZZ", "ZZZZZZZZZZ"); assertMatches("em", "emptyList"); assertMatches("bui", "BuildConfig.groovy"); assertMatches("buico", "BuildConfig.groovy"); assertMatches("buico.gr", "BuildConfig.groovy"); assertMatches("bui.gr", "BuildConfig.groovy"); assertMatches("*fz", "azzzfzzz"); assertMatches("WebLogic", "Weblogic"); assertMatches("WebLOgic", "WebLogic"); assertMatches("WEbLogic", "WebLogic"); assertDoesntMatch("WebLogic", "Webologic"); assertMatches("Wlo", "WebLogic"); } | testLowerCaseHumps |
273,163 | void () { assertMatches("a ", "alpha + beta"); assertMatches("a ", "a "); assertMatches("a ", "a"); assertMatches("GrDebT ", "GroovyDebuggerTest"); assertDoesntMatch("grdebT ", "GroovyDebuggerTest"); assertDoesntMatch("grdebt ", "GroovyDebuggerTest"); assertMatches("Foo ", "Foo"); assertDoesntMatch("Foo ", "FooBar"); assertDoesntMatch("Foo ", "Foox"); assertDoesntMatch("Collections ", "CollectionSplitter"); assertMatches("CollectionS ", "CollectionSplitter"); assertMatches("*run ", "in Runnable.run"); assertDoesntMatch("*l ", "AppDelegate"); assertDoesntMatch("*le ", "AppDelegate"); assertDoesntMatch("*leg ", "AppDelegate"); } | testFinalSpace |
273,164 | void () { assertMatches("foba4", "FooBar4"); assertMatches("foba", "Foo4Bar"); assertMatches("*TEST-* ", "TEST-001"); assertMatches("*TEST-0* ", "TEST-001"); assertMatches("*v2 ", "VARCHAR2"); assertMatches("smart8co", "SmartType18CompletionTest"); assertMatches("smart8co", "smart18completion"); } | testDigits |
273,165 | void () { assertDoesntMatch("*012", "001122"); assertMatches("012", "0a1_22"); } | testDoNotAllowDigitsBetweenMatchingDigits |
273,166 | void () { assertMatches("a@b", "a@bc"); assertDoesntMatch("*@in", "a int"); assertMatches("a/text", "a/Text"); assertMatches("a/text", "a/bbbText"); } | testSpecialSymbols |
273,167 | void () { assertTrue(firstLetterMatcher("WebLogic").matches("WebLogic")); assertFalse(firstLetterMatcher("webLogic").matches("WebLogic")); assertTrue(firstLetterMatcher("cL").matches("class")); assertTrue(firstLetterMatcher("CL").matches("Class")); assertTrue(firstLetterMatcher("Cl").matches("CoreLoader")); assertFalse(firstLetterMatcher("abc").matches("_abc")); } | testMinusculeFirstLetter |
273,168 | void () { assertTrue(NameUtil.buildMatcher("WebLogic", NameUtil.MatchingCaseSensitivity.ALL).matches("WebLogic")); assertFalse(NameUtil.buildMatcher("webLogic", NameUtil.MatchingCaseSensitivity.ALL).matches("weblogic")); assertFalse(NameUtil.buildMatcher("FOO", NameUtil.MatchingCaseSensitivity.ALL).matches("foo")); assertFalse(NameUtil.buildMatcher("foo", NameUtil.MatchingCaseSensitivity.ALL).matches("fOO")); assertFalse(NameUtil.buildMatcher("Wl", NameUtil.MatchingCaseSensitivity.ALL).matches("WebLogic")); assertTrue(NameUtil.buildMatcher("WL", NameUtil.MatchingCaseSensitivity.ALL).matches("WebLogic")); assertFalse(NameUtil.buildMatcher("WL", NameUtil.MatchingCaseSensitivity.ALL).matches("Weblogic")); assertFalse(NameUtil.buildMatcher("WL", NameUtil.MatchingCaseSensitivity.ALL).matches("weblogic")); assertFalse(NameUtil.buildMatcher("webLogic", NameUtil.MatchingCaseSensitivity.ALL).matches("WebLogic")); assertFalse(NameUtil.buildMatcher("Str", NameUtil.MatchingCaseSensitivity.ALL).matches("SomeThingRidiculous")); assertFalse(NameUtil.buildMatcher("*list*", NameUtil.MatchingCaseSensitivity.ALL).matches("List")); assertFalse(NameUtil.buildMatcher("*list*", NameUtil.MatchingCaseSensitivity.ALL).matches("AbstractList")); assertFalse(NameUtil.buildMatcher("java.util.list", NameUtil.MatchingCaseSensitivity.ALL).matches("java.util.List")); assertFalse(NameUtil.buildMatcher("java.util.list", NameUtil.MatchingCaseSensitivity.ALL).matches("java.util.AbstractList")); } | testMinusculeAllImportant |
273,169 | void () { @NonNls String sample = "NoClassDefFoundException"; // 0 2 7 10 15 21 UsefulTestCase.assertOrderedEquals(NameUtil.buildMatcher("ncldfou*ion", NameUtil.MatchingCaseSensitivity.NONE).matchingFragments(sample), TextRange.from(0, 1), TextRange.from(2, 2), TextRange.from(7, 1), TextRange.from(10, 3), TextRange.from(21, 3)); sample = "doGet(HttpServletRequest, HttpServletResponse):void"; // 0 22 UsefulTestCase.assertOrderedEquals(NameUtil.buildMatcher("d*st", NameUtil.MatchingCaseSensitivity.NONE).matchingFragments(sample), TextRange.from(0, 1), TextRange.from(22, 2)); UsefulTestCase.assertOrderedEquals(NameUtil.buildMatcher("doge*st", NameUtil.MatchingCaseSensitivity.NONE).matchingFragments(sample), TextRange.from(0, 4), TextRange.from(22, 2)); sample = "_test"; UsefulTestCase.assertOrderedEquals(NameUtil.buildMatcher("_", NameUtil.MatchingCaseSensitivity.NONE).matchingFragments(sample), TextRange.from(0, 1)); UsefulTestCase.assertOrderedEquals(NameUtil.buildMatcher("_t", NameUtil.MatchingCaseSensitivity.NONE).matchingFragments(sample), TextRange.from(0, 2)); } | testMatchingFragments |
273,170 | void () { @NonNls String sample = "SWUPGRADEHDLRFSPR7TEST"; // 0 9 12 UsefulTestCase.assertOrderedEquals(NameUtil.buildMatcher("SWU*H*R", NameUtil.MatchingCaseSensitivity.NONE).matchingFragments(sample), TextRange.from(0, 3), TextRange.from(9, 1), TextRange.from(12, 1)); } | testMatchingFragmentsSorted |
273,171 | void () { String sample = "getCurrentUser"; // 0 4 10 UsefulTestCase.assertOrderedEquals(NameUtil.buildMatcher("getCU", NameUtil.MatchingCaseSensitivity.NONE).matchingFragments(sample), TextRange.from(0, 4), TextRange.from(10, 1)); } | testPreferCapsMatching |
273,172 | void () { assertMatches("a+b", "alpha+beta"); assertMatches("a+b", "alpha_gamma+beta"); assertMatches("a+b", "alpha + beta"); assertMatches("Foo+", "Foo+Bar.txt"); assertMatches("Foo+", "Foo + Bar.txt"); assertMatches("a", "alpha+beta"); assertMatches("*b", "alpha+beta"); assertMatches("a + b", "alpha+beta"); assertMatches("a+", "alpha+beta"); assertDoesntMatch("a ", "alpha+beta"); assertMatches("", "alpha+beta"); assertMatches("*+ b", "alpha+beta"); assertDoesntMatch("d+g", "alphaDelta+betaGamma"); assertMatches("*d+g", "alphaDelta+betaGamma"); assertMatches("a-b", "alpha-beta"); assertMatches("a-b", "alpha - beta"); } | testPlusOrMinusInThePatternShouldAllowToBeSpaceSurrounded |
273,173 | void () { assertPreference("jscote", "JsfCompletionTest", "JSCompletionTest", NameUtil.MatchingCaseSensitivity.NONE); assertPreference("OCO", "OneCoolObject", "OCObject"); assertPreference("MUp", "MavenUmlProvider", "MarkUp"); assertPreference("MUP", "MarkUp", "MavenUmlProvider"); assertPreference("CertificateExce", "CertificateEncodingException", "CertificateException"); assertPreference("boo", "Boolean", "boolean", NameUtil.MatchingCaseSensitivity.NONE); assertPreference("Boo", "boolean", "Boolean", NameUtil.MatchingCaseSensitivity.NONE); assertPreference("getCU", "getCurrentSomething", "getCurrentUser"); assertPreference("cL", "class", "coreLoader"); assertPreference("cL", "class", "classLoader"); assertPreference("inse", "InstrumentationError", "intSet", NameUtil.MatchingCaseSensitivity.NONE); assertPreference("String", "STRING", "String", NameUtil.MatchingCaseSensitivity.NONE); assertPreference("*String", "STRING", "String", NameUtil.MatchingCaseSensitivity.NONE); } | testMatchingDegree |
273,174 | void () { assertPreference("*psfi", "PsiJavaFileBaseImpl", "PsiFileImpl", NameUtil.MatchingCaseSensitivity.NONE); } | testPreferAdjacentWords |
273,175 | void () { assertPreference("*e", "fileIndex", "file", NameUtil.MatchingCaseSensitivity.NONE); } | testPreferMatchesToTheEnd |
273,176 | void () { assertPreference(" fb", "FooBar", "_fooBar", NameUtil.MatchingCaseSensitivity.NONE); assertPreference("*foo", "barFoo", "foobar"); assertPreference("*fo", "barfoo", "barFoo"); assertPreference("*fo", "barfoo", "foo"); assertPreference("*fo", "asdfo", "Foo", NameUtil.MatchingCaseSensitivity.NONE); assertPreference(" sto", "StackOverflowError", "ArrayStoreException", NameUtil.MatchingCaseSensitivity.NONE); assertPreference(" EUC-", "x-EUC-TW", "EUC-JP", NameUtil.MatchingCaseSensitivity.FIRST_LETTER); assertPreference(" boo", "Boolean", "boolean", NameUtil.MatchingCaseSensitivity.NONE); assertPreference(" Boo", "boolean", "Boolean", NameUtil.MatchingCaseSensitivity.NONE); assertPreference("ob", "oci_bind_array_by_name", "obj"); assertNoPreference("en", "ENABLED", "Enum", NameUtil.MatchingCaseSensitivity.NONE); } | testPreferences |
273,177 | void () { MinusculeMatcher matcher = NameUtil.buildMatcher("*pim", NameUtil.MatchingCaseSensitivity.NONE); int iLess = matcher.matchingDegree("PImageDecoder", true); int iMore = matcher.matchingDegree("posIdMap", true); assertTrue(iLess < iMore); } | testHonorFirstLetterCaseInCompletion |
273,178 | void () { assertPreference("*ap", "add_profile", "application", NameUtil.MatchingCaseSensitivity.NONE); assertPreference("*les", "configureByFiles", "getLookupElementStrings"); assertPreference("*les", "configureByFiles", "getLookupElementStrings", NameUtil.MatchingCaseSensitivity.NONE); assertPreference("*ea", "LEADING", "NORTH_EAST", NameUtil.MatchingCaseSensitivity.NONE); assertPreference("*Icon", "isControlKeyDown", "getErrorIcon", NameUtil.MatchingCaseSensitivity.NONE); assertPreference("*icon", "isControlKeyDown", "getErrorIcon", NameUtil.MatchingCaseSensitivity.NONE); assertPreference("*Icon", "getInitControl", "getErrorIcon", NameUtil.MatchingCaseSensitivity.NONE); assertPreference("*icon", "getInitControl", "getErrorIcon", NameUtil.MatchingCaseSensitivity.NONE); } | testPreferWordBoundaryMatch |
273,179 | void () { assertPreference("CBP", "CustomProcessBP", "ComputationBatchProcess", NameUtil.MatchingCaseSensitivity.NONE); } | testPreferNoWordSkipping |
273,180 | void () { assertNoPreference("PropComp", "PropertyComponent", "PropertiesComponent", NameUtil.MatchingCaseSensitivity.NONE); } | testWordLengthDoesNotMatter |
273,181 | void () { assertNoPreference(" path", "getAbsolutePath", "findPath", NameUtil.MatchingCaseSensitivity.FIRST_LETTER); } | testMatchStartDoesntMatterForDegree |
273,182 | void () { assertPreference("*tree", "FooTree", "Tree", NameUtil.MatchingCaseSensitivity.NONE); } | testPreferStartMatching |
273,183 | void () { assertPreference("*mappablejs", "mappable-js.scope.js", "MappableJs.js", NameUtil.MatchingCaseSensitivity.NONE); } | testPreferContiguousMatching |
273,184 | void () { assertTrue(caseInsensitiveMatcher(" EUC-").matchingDegree("x-EUC-TW") > Integer.MIN_VALUE); } | testMeaningfulMatchingDegree |
273,185 | void (@NonNls String pattern, @NonNls String less, @NonNls String more) { assertPreference(pattern, less, more, NameUtil.MatchingCaseSensitivity.FIRST_LETTER); } | assertPreference |
273,186 | void (@NonNls String pattern, @NonNls String less, @NonNls String more, NameUtil.MatchingCaseSensitivity sensitivity) { assertPreference(NameUtil.buildMatcher(pattern, sensitivity), less, more); } | assertPreference |
273,187 | void (MinusculeMatcher matcher, String less, String more) { assertPreference(less, more, matcher::matchingDegree); } | assertPreference |
273,188 | void (String less, String more, ToIntFunction<String> matchingDegree) { int iLess = matchingDegree.applyAsInt(less); int iMore = matchingDegree.applyAsInt(more); assertTrue(iLess + ">=" + iMore + "; " + less + ">=" + more, iLess < iMore); } | assertPreference |
273,189 | void (@NonNls String pattern, @NonNls String name1, @NonNls String name2, NameUtil.MatchingCaseSensitivity sensitivity) { MinusculeMatcher matcher = NameUtil.buildMatcher(pattern, sensitivity); assertEquals(matcher.matchingDegree(name1), matcher.matchingDegree(name2)); } | assertNoPreference |
273,190 | void () { final SpeedSearchComparator c = new SpeedSearchComparator(false, true); assertNotNull(c.matchingFragments("a", "Ant")); assertNotNull(c.matchingFragments("an", "Changes")); assertNotNull(c.matchingFragments("a", "Changes")); } | testSpeedSearchComparator |
273,191 | void () { assertMatches("groovy*.jar", "groovy-1.7.jar"); assertDoesntMatch("*.ico", "a.i.c.o"); } | testFilePatterns |
273,192 | void () { assertMatches("PDFRe", "PdfRenderer"); assertMatches("*pGETPartTimePositionInfo", "dbo.pGetPartTimePositionInfo.sql"); } | testCapsMayMatchNonCaps |
273,193 | void () { assertMatches("USerDefa", "UserDefaults"); assertMatches("NSUSerDefa", "NSUserDefaults"); assertMatches("NSUSER", "NSUserDefaults"); assertMatches("NSUSD", "NSUserDefaults"); assertMatches("NSUserDEF", "NSUserDefaults"); } | testACapitalAfterAnotherCapitalMayMatchALowercaseLetterBecauseShiftWasAccidentallyHeldTooLong |
273,194 | void () { assertMatches("ыек", "String"); } | testCyrillicMatch |
273,195 | void () { String text = "some text"; MinusculeMatcher matcher = AllOccurrencesMatcher.create("*e", NameUtil.MatchingCaseSensitivity.NONE, ""); UsefulTestCase.assertOrderedEquals(matcher.matchingFragments(text), new TextRange(3, 4), new TextRange(6, 7)); } | testMatchingAllOccurrences |
273,196 | void () { UsefulTestCase.assertSize(3, NameUtil.buildMatcher("GEN", NameUtil.MatchingCaseSensitivity.NONE).matchingFragments("GetExtendedName")); assertPreference("GEN", "GetName", "GetExtendedName"); assertPreference("*GEN", "GetName", "GetExtendedName"); } | testCamelHumpWinsOverConsecutiveCaseMismatch |
273,197 | void () { assertMatches("pl", "println"); assertMatches("pl", "printlnFoo"); assertDoesntMatch("pl", "printlnx"); } | testPrintln |
273,198 | void () { assertMatches("LSTMa", "LineStatusTrackerManager"); } | testLowerCaseAfterCamels |
273,199 | void () { assertMatches("*pro", "spring.activemq.pool.configuration.reconnect-on-exception"); } | testProperties |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.