Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
41,600 | void () { doTest(); } | testAnonymousClassConstructorParameter |
41,601 | void () { doTest(); } | testStringBufferNonNls |
41,602 | void () { doTest(); } | testEnum |
41,603 | void () { doTest(); } | testIgnoredLines |
41,604 | void () { doTest(); } | testStringMethods |
41,605 | void () { doTest(); } | testVarargNonNlsParameter |
41,606 | void () { doTest(); } | testInitializerInAnonymousClass |
41,607 | void () { doTest(); } | testNonNlsArray |
41,608 | void () { doTest(); } | testNonNlsEquals |
41,609 | void () { doTest(); } | testNonNlsTernary |
41,610 | void () { doTest(); } | testParameterInNewAnonymousClass |
41,611 | void () { doTest(); } | testConstructorCallOfNonNlsVariable |
41,612 | void () { doTest(); } | _testConstructorChains |
41,613 | void () { doTest(); } | testSwitchOnNonNlsString |
41,614 | void () { doTest(); } | testNestedArrayParenthesized |
41,615 | void () { myTool.setNonNlsCommentPattern("MYNON-NLS"); doTest(); } | testNonNlsComment |
41,616 | void () { doTest(); } | testPropagateToInterfaceMethod |
41,617 | void () { doTestNlsMode(); } | testNlsOnly |
41,618 | void () { doTestNlsMode(); } | testNlsOnlyTernary |
41,619 | void () { doTestNlsMode(); } | testNlsOnlyFields |
41,620 | void () { myFixture.addFileToProject("package-info.java", """ @Nls package foo; import org.jetbrains.annotations.Nls;"""); doTestNlsMode(); } | testNlsPackage |
41,621 | void () { doTest(); } | testAnnotationArgument |
41,622 | void () { doTest(); } | testAssertionStmt |
41,623 | void () { String oldPattern = myTool.nonNlsCommentPattern; try { myTool.setNonNlsLiteralPattern(""); doTest(); } finally { myTool.setNonNlsLiteralPattern(oldPattern); } } | testPropertyKeyAnnotated |
41,624 | void () { doTest(); } | testExceptionCtor |
41,625 | void () { boolean old = myTool.ignoreForExceptionConstructors; try { myTool.ignoreForSpecifiedExceptionConstructors = "java.io.IOException"; myTool.ignoreForExceptionConstructors = false; doTest(); } finally { myTool.ignoreForSpecifiedExceptionConstructors = ""; myTool.ignoreForExceptionConstructors = old; } } | testSpecifiedExceptionCtor |
41,626 | void () { boolean oldState = myTool.setIgnoreForEnumConstants(true); try { doTest(); } finally { myTool.setIgnoreForEnumConstants(oldState); } } | testEnumConstantIgnored |
41,627 | void () { doTestNlsMode(); } | testNlsTypeUse |
41,628 | void () { doTest(); } | testNonNlsIndirect |
41,629 | void () { doTestNlsMode(); } | testNlsIndirect |
41,630 | void () { doTest(); } | testNonNlsMeta |
41,631 | void () { doTestNlsMode(); } | testNlsMeta |
41,632 | void () { doTest(); } | testUseConstant |
41,633 | void () { doTest(); } | testNonNlsOnContainer |
41,634 | void () { doTestNlsMode(); } | testUseConstantNls |
41,635 | void () { doTestNlsMode(); } | testHtmlEntitiesNlsMode |
41,636 | void () { doTestNlsMode(); } | testArrayInitializerInNlsMode |
41,637 | void () { doTestNlsMode(); } | testSwitchInNlsMode |
41,638 | void () { doTest(); } | testReturnCallWithArgs |
41,639 | void () { doTestNlsMode(); } | testConverterMethods |
41,640 | void () { doTestNlsMode(); } | testPassthroughMethods |
41,641 | void () { doTestNlsMode(); } | testNlsSafeStringBuilder |
41,642 | void () { doTestNlsMode(); } | testUnannotatedReferencesQualified |
41,643 | void () { doTestNlsMode(); } | testCharSequenceMethods |
41,644 | void () { doTest(); } | testRefsNonNlsMode |
41,645 | void () { doTest(); } | testRefsMetaAnnotation |
41,646 | void () { doTest(); } | testStringBuilderAppend |
41,647 | void () { doTest(); } | testComputeIfAbsent |
41,648 | void () { doTest(); } | testNonNlsFieldInitializer |
41,649 | String () { return PluginPathManager.getPluginHomePath("java-i18n") + "/testData/inspections"; } | getTestDataPath |
41,650 | void () { myInspection.IGNORE_PROPERTY_KEYS = true; try { myFixture.testHighlighting("PropertyKey.java"); } finally { myInspection.IGNORE_PROPERTY_KEYS = false; } } | testPropertyKey |
41,651 | void () { final List<IntentionAction> fixes = myFixture.getAllQuickFixes("ApplyRenameForWholeFile.java"); fixes .stream() .filter(i -> JavaI18nBundle.message("inspection.duplicates.replace.family.quickfix").equals(i.getFamilyName())) .forEach(action -> { myFixture.launchAction(action); NonBlockingReadActionImpl.waitFor... | testBatchApplication |
41,652 | void () { doTestFix(); } | testInvalidForwardReference |
41,653 | void () { doTestFix(); } | testRemoveRedundantQualifier |
41,654 | String () { return PluginPathManager.getPluginHomePath("java-i18n") + "/testData/inspections/duplicateStringLiteral/"; } | getTestDataPath |
41,655 | void () { myFixture.configureByFile(getTestName(false) + ".java"); final IntentionAction fix = myFixture.findSingleIntention("Replace"); assertNotNull(fix); myFixture.launchAction(fix); NonBlockingReadActionImpl.waitForAsyncTaskCompletion(); myFixture.checkResultByFile(getTestName(false) + "After.java"); } | doTestFix |
41,656 | void () { myFixture.enableInspections(new UnusedMessageFormatParameterInspection()); myFixture.testHighlighting(getTestName(false) + ".properties"); } | doTest |
41,657 | void () { doTest(); } | testSimpleString |
41,658 | void () { doTest(); } | testCorruptedValue |
41,659 | void () { doTest(); } | testWithChoiceFormat |
41,660 | void () { doTest(); } | testRegexp |
41,661 | String () { return PluginPathManager.getPluginHomePath("java-i18n") + "/testData/inspections/unusedParameter"; } | getTestDataPath |
41,662 | String () { return PlatformTestUtil.getCommunityPath() + "/plugins/java-i18n/testData/contextFolding"; } | getTestDataPath |
41,663 | void () { JavaCodeFoldingSettings foldingSettings = JavaCodeFoldingSettings.getInstance(); boolean collapseMethods = foldingSettings.isCollapseMethods(); boolean i18nMessages = foldingSettings.isCollapseI18nMessages(); try { foldingSettings.setCollapseMethods(false); foldingSettings.setCollapseI18nMessages(true); myFix... | testRangesInJava |
41,664 | boolean (@NotNull TextProblem problem) { if (problem.getText().getDomain() == TextContent.TextDomain.DOCUMENTATION && problem.getText().getCommonParent() instanceof PsiDocTag && (ProblemFilterUtil.isUndecoratedSingleSentenceIssue(problem) || ProblemFilterUtil.isInitialCasingIssue(problem))) { return true; } return fals... | shouldIgnore |
41,665 | TextContent (@NotNull PsiElement root, @NotNull Set<TextContent.TextDomain> allowedDomains) { if (allowedDomains.contains(DOCUMENTATION)) { if (root instanceof PsiDocComment) { return HtmlUtilsKt.removeHtml(javadocBuilder.excluding(e -> e instanceof PsiDocTagImpl).build(root, DOCUMENTATION)); } if (root instanceof PsiD... | buildTextContent |
41,666 | void (String[] args) { String oneTypo = "It is <warning descr="EN_A_VS_AN">an</warning> friend of human"; String oneSpellcheckTypo = "It is <TYPO descr="Typo: In word 'frend'">frend</TYPO> of human"; String fewTypos = "It <warning descr="IT_VBZ">are</warning> working for <warning descr="MUCH_COUNTABLE">much</warning> w... | main |
41,667 | void () { var file = myFixture.configureByText("a.txt", "aaabbbccc"); var content = TextContent.psiFragment(PLAIN_TEXT, file).excludeRange(new TextRange(3, 6)); assertEquals(0, content.textOffsetToFile(0)); assertEquals(9, content.textOffsetToFile(6)); assertEquals(3, content.textOffsetToFile(3, false)); assertEquals(6... | testTextOffsetLean |
41,668 | void () { var file = myFixture.configureByText("a.txt", "aaabbbccc"); var f1 = psiFragment(file, 0, 3); var f2 = psiFragment(file, 3, 6).markUnknown(new TextRange(0, 3)); var f3 = psiFragment(file, 6, 9); var joined = TextContent.join(List.of(f1, f2, f3)); assertEquals("aaaccc", joined.toString()); assertFalse(joined.h... | testJoinWithUnknown |
41,669 | TextContent (PsiFile file, int start, int end) { return TextContent.psiFragment(PLAIN_TEXT, file, new TextRange(start, end)); } | psiFragment |
41,670 | void () { var full = psiFragment(myFixture.configureByText("a.txt", " abc"), 0, 4); assertFalse(full.hasUnknownFragmentsIn(new TextRange(0, 0))); var fullUnknown = full.markUnknown(new TextRange(0, 0)); assertTrue(fullUnknown.hasUnknownFragmentsIn(new TextRange(0, 0))); assertTrue(fullUnknown.hasUnknownFragmentsIn(new ... | testMarkOffsetUnknown |
41,671 | void () { TextRange fragment1 = new TextRange(0, 3); TextRange fragment2 = new TextRange(6, 9); var file = myFixture.configureByText("a.txt", "aaabbbccc"); TextContent text = TextContent.join(List.of(psiFragment(file, 0, 3), psiFragment(file, 6, 9))); for (int i = 0; i < file.getTextLength(); i++) { for (int j = i; j <... | testIntersectsRange |
41,672 | void () { var file = myFixture.configureByText("a.txt", "abc"); TextContent c1 = psiFragment(file, 0, 1); TextContent c2 = psiFragment(file, 1, 2); assertOrderedEquals(TextContent.join(List.of(c1, c2)).getRangesInFile(), new TextRange(0, 2)); } | testJoinAdjacentFileRanges |
41,673 | void () { var file = myFixture.configureByText("a.txt", "abbbc"); var f1 = psiFragment(file, 0, 1); var f2 = psiFragment(file, 4, 5).markUnknown(new TextRange(1, 1)); var joined = TextContent.joinWithWhitespace(' ', List.of(f1, f2)); assertNotNull(joined); assertEquals("a c|", unknownOffsets(joined)); assertEquals(List... | testJoinWithWhitespace |
41,674 | String (TextContent text) { StringBuilder sb = new StringBuilder(text); for (int i = text.length(); i >= 0; i--) { if (text.hasUnknownFragmentsIn(TextRange.from(i, 0))) { sb.insert(i, "|"); } } return sb.toString(); } | unknownOffsets |
41,675 | void () { TextContent initial = TextContent.psiFragment(PLAIN_TEXT, myFixture.configureByText("a.txt", "abc")); TextContent c1 = initial.markUnknown(new TextRange(1, 1)).excludeRange(new TextRange(1, 2)); TextContent c2 = initial.excludeRange(new TextRange(1, 2)).markUnknown(new TextRange(1, 1)); assertEquals("a|c", un... | testUnknownAndExcludeOrderDoesNotMatter |
41,676 | void () { TextContent initial = TextContent.psiFragment(PLAIN_TEXT, myFixture.configureByText("a.txt", "abc")); assertEquals("|b|c", unknownOffsets( initial.markUnknown(new TextRange(2, 2)).markUnknown(new TextRange(1, 1)).excludeRange(new TextRange(0, 1)))); } | testExcludeNearUnknownOffsetPreservesIt |
41,677 | void () { checkBatchSequentialExclusion("a", List.of(new TextContent.Exclusion(0, 0, false), new TextContent.Exclusion(0, 1, false))); } | testBatchExcludeWholeText |
41,678 | void () { PropertyChecker .checkScenarios(() -> env -> { String text = env.generateValue(Generator.stringsOf("abc"), "Text %s"); List<TextContent.Exclusion> ranges = generateSortedRanges(env, text); env.logMessage("Ranges " + ranges); checkBatchSequentialExclusion(text, ranges); }); } | testBatchRangeExclusionIsEquivalentToSequential |
41,679 | void (String text, List<TextContent.Exclusion> ranges) { TextContent initial = TextContent.psiFragment(PLAIN_TEXT, myFixture.configureByText("a.txt", text)); TextContent batchExcluded = initial.excludeRanges(ranges); TextContent sequentiallyExcluded = excludeSequentially(ranges, initial); if (!sequentiallyExcluded.equa... | checkBatchSequentialExclusion |
41,680 | TextContent (List<TextContent.Exclusion> ranges, TextContent initial) { TextContent result = initial; for (TextContent.Exclusion exclusion : ContainerUtil.reverse(ranges)) { TextRange range = new TextRange(exclusion.start, exclusion.end); result = exclusion.kind == TextContent.ExclusionKind.unknown ? result.markUnknown... | excludeSequentially |
41,681 | void () { var file = myFixture.configureByText("a.txt", "ab"); var base = psiFragment(file, 0, 2); for (int i = 0; i <= 2; i++) { var withMarkup = base.excludeRanges(List.of(new TextContent.Exclusion(i, i, TextContent.ExclusionKind.markup))); Assertions.assertArrayEquals(new int[]{i}, withMarkup.markupOffsets(), "Offse... | testUnknownWinsOverMarkup |
41,682 | void () { assertInstanceOf(extractText("a.txt", "foo", 1).findPsiElementAt(3), PsiPlainText.class); } | testFindPsiAtLastOffset |
41,683 | void () { TextContent extracted = extractText("a.md", "* list [item](http://x) with a local link", 3); assertEquals("list item with a local link", unknownOffsets(extracted)); Assertions.assertArrayEquals(new int[]{"list ".length(), "list item".length()}, extracted.markupOffsets()); int prefix = "* ".length(); assertEqu... | testMarkdownInlineLink |
41,684 | void () { TextContent extracted = extractText("a.md", "go to [http://localhost](http://localhost) and validate", 3); assertEquals("go to http://localhost and validate", unknownOffsets(extracted)); } | testMarkdownUrlLink |
41,685 | void () { TextContent extracted = extractText("a.md", "[Before  after](http://google.com.au/)", 3); assertEquals("Before after", unknownOffsets(extracted)); Assertions.assertArrayEquals(new int[]{0, extracted.length()}, extracted.markupOffsets()); } | testMarkdownImage |
41,686 | void () { TextContent extracted = extractText("a.md", "* first line \n second line", 3); assertEquals("first line\nsecond line", unknownOffsets(extracted)); } | testMarkdownIndent |
41,687 | void () { TextContent text = extractText("a.md", "**bold** *italic* ~~strikethrough~~", 3); assertEquals("bold italic strikethrough", unknownOffsets(text)); Assertions.assertArrayEquals(new int[]{0, 4, 5, 11, 12, 25}, text.markupOffsets()); } | testMarkdownStyles |
41,688 | void () { assertEquals("hello world", unknownOffsets(extractText("a.md", "hello world", 3))); assertEquals("hello world", unknownOffsets(extractText("a.html", "hello world", 3))); } | testHtmlNbsp |
41,689 | void () { TextContent extracted = extractText("a.md", "you can use a number of predefined fields (e.g. `EventFields.InputEvent`)", 0); assertEquals("you can use a number of predefined fields (e.g. |)", unknownOffsets(extracted)); } | testMarkdownInlineCode |
41,690 | void () { String text = extractText("a.java", "//Hello. I are a very humble\n//persons.\n\nclass C {}", 4).toString(); assertTrue(text, text.matches("Hello\\. I are a very humble\\spersons\\.")); assertEquals("First line.\nThird line.", extractText("a.java", """ // First line. //\s // Third line. """ , 4).toString()); ... | testMergeAdjacentJavaComments |
41,691 | void () { assertEquals("Hello World #42!", extractText("a.properties", "#\t Hello World #42!", 4).toString()); } | testIgnorePropertyCommentStarts |
41,692 | void () { String text = "a=Hello World ''{0}''!"; assertEquals("Hello World '|'!", unknownOffsets(extractText("a.properties", text, text.length()))); } | testProcessPropertyMessageFormat |
41,693 | void () { assertEquals("a |", unknownOffsets(extractText("a.properties", "a=a {0, choice, 1#1 code fragment|2#{0,number} code fragments", 4))); } public void testExcludePropertyHtml() { assertEquals("Hello |World", unknownOffsets(extractText("a.properties", "a=<html>Hello <p/>World</html>", 8))); } public void testMult... | testBrokenPropertyMessageFormat |
41,694 | void () { assertEquals("Hello |World", unknownOffsets(extractText("a.properties", "a=<html>Hello <p/>World</html>", 8))); } | testExcludePropertyHtml |
41,695 | void () { assertEquals("line1\nline2", unknownOffsets(extractText("a.properties", "# line1\n! line2", 4))); } | testMultiLineCommentInProperties |
41,696 | void () { assertEquals("line1line2", unknownOffsets(extractText("a.properties", "a=line1\\\n \t line2", 4))); } | test_multiline_value_in_properties_does_not_include_leading_space |
41,697 | void () { String docText = """ /** * Hello {@link #foo}, * here's an asterisk: * * and some {@code code}. * tags1 <unknownTag>this<unknownTag>is</unknownTag>unknown</unknownTag > * tags2 <unknown1>one<unknown2>unknown<unknown1>unknown</unknown2> two<p/> three<unknown1/> four</unknown1> * {@link #unknown} is unknown. * ... | testJavadoc |
41,698 | void () { assertEquals("abc def", extractText("a.java", "class C { String s = \" abc def \"; }", 27).toString()); } | testJavaLiteral |
41,699 | void () { String text = """ class C { String s = ""\" abc \\ \\ def ghi ""\"; }"""; int offset = text.indexOf("def"); TextContent content = extractText("a.java", text, offset); assertEquals("abc def\n ghi", content.toString()); assertEquals(offset, content.textOffsetToFile("abc ".length())); } | testJavaTextBlock |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.