Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
28,300 | String () { return null; } | getBasePath |
28,301 | void () { myFixture.addClass("package groovy.transform; public @interface Field{}"); } | addGroovyTransformField |
28,302 | void () { myFixture.addClass(""" package groovy.lang; public interface GroovyObject { java.lang.Object invokeMethod(java.lang.String s, java.lang.Object o); java.lang.Object getProperty(java.lang.String s); void setProperty(java.lang.String s, java.lang.Object o); groovy.lang.MetaClass getMetaClass(); void setMetaClass... | addGroovyObject |
28,303 | void () { myFixture.addClass(""" package groovy.transform; public @interface CompileStatic{ } """); } | addCompileStatic |
28,304 | void () { myFixture.addClass(""" package java.math; public class BigDecimal extends Number implements Comparable<BigDecimal> { } """); } | addBigDecimal |
28,305 | void () { myFixture.addClass(""" package java.math; public class BigInteger extends Number implements Comparable<BigInteger> { } """); } | addBigInteger |
28,306 | void () { myFixture.addClass(""" package java.util; public class HashSet<E> extends AbstractSet<E> implements Set<E>, Cloneable, java.io.Serializable {} """); } | addHashSet |
28,307 | void () { myFixture.addClass(""" package groovy.transform; @java.lang.annotation.Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE}) public @interface AnnotationCollector { String processor() default "org.codehaus.groovy.transform.AnnotationCollectorTransform"; Class[... | addAnnotationCollector |
28,308 | void () { myFixture.addClass(""" // IntelliJ API Decompiler stub source generated from a class file // Implementation of methods is not available package junit.framework; @SuppressWarnings({"Contract", "MethodOverridesStaticMethodOfSuperclass", "RedundantThrows"}) public abstract class TestCase extends junit.framework.... | addTestCase |
28,309 | int () { /* compiled code */ } | countTestCases |
28,310 | void (junit.framework.TestResult result) { /* compiled code */ } | run |
28,311 | void (java.lang.String message, boolean condition) { /* compiled code */ } | assertTrue |
28,312 | void (boolean condition) { /* compiled code */ } | assertTrue |
28,313 | void (java.lang.String message, boolean condition) { /* compiled code */ } | assertFalse |
28,314 | void (boolean condition) { /* compiled code */ } | assertFalse |
28,315 | void (java.lang.String message) { /* compiled code */ } | fail |
28,316 | void () { /* compiled code */ } | fail |
28,317 | void (java.lang.String message, java.lang.Object expected, java.lang.Object actual) { /* compiled code */ } | assertEquals |
28,318 | void (java.lang.Object expected, java.lang.Object actual) { /* compiled code */ } | assertEquals |
28,319 | void (java.lang.String message, java.lang.String expected, java.lang.String actual) { /* compiled code */ } | assertEquals |
28,320 | void (java.lang.String expected, java.lang.String actual) { /* compiled code */ } | assertEquals |
28,321 | void (java.lang.String message, double expected, double actual, double delta) { /* compiled code */ } | assertEquals |
28,322 | void (double expected, double actual, double delta) { /* compiled code */ } | assertEquals |
28,323 | void (java.lang.String message, float expected, float actual, float delta) { /* compiled code */ } | assertEquals |
28,324 | void (float expected, float actual, float delta) { /* compiled code */ } | assertEquals |
28,325 | void (java.lang.String message, long expected, long actual) { /* compiled code */ } | assertEquals |
28,326 | void (long expected, long actual) { /* compiled code */ } | assertEquals |
28,327 | void (java.lang.String message, boolean expected, boolean actual) { /* compiled code */ } | assertEquals |
28,328 | void (boolean expected, boolean actual) { /* compiled code */ } | assertEquals |
28,329 | void (java.lang.String message, byte expected, byte actual) { /* compiled code */ } | assertEquals |
28,330 | void (byte expected, byte actual) { /* compiled code */ } | assertEquals |
28,331 | void (java.lang.String message, char expected, char actual) { /* compiled code */ } | assertEquals |
28,332 | void (char expected, char actual) { /* compiled code */ } | assertEquals |
28,333 | void (java.lang.String message, short expected, short actual) { /* compiled code */ } | assertEquals |
28,334 | void (short expected, short actual) { /* compiled code */ } | assertEquals |
28,335 | void (java.lang.String message, int expected, int actual) { /* compiled code */ } | assertEquals |
28,336 | void (int expected, int actual) { /* compiled code */ } | assertEquals |
28,337 | void (java.lang.Object object) { /* compiled code */ } | assertNotNull |
28,338 | void (java.lang.String message, java.lang.Object object) { /* compiled code */ } | assertNotNull |
28,339 | void (java.lang.Object object) { /* compiled code */ } | assertNull |
28,340 | void (java.lang.String message, java.lang.Object object) { /* compiled code */ } | assertNull |
28,341 | void (java.lang.String message, java.lang.Object expected, java.lang.Object actual) { /* compiled code */ } | assertSame |
28,342 | void (java.lang.Object expected, java.lang.Object actual) { /* compiled code */ } | assertSame |
28,343 | void (java.lang.String message, java.lang.Object expected, java.lang.Object actual) { /* compiled code */ } | assertNotSame |
28,344 | void (java.lang.Object expected, java.lang.Object actual) { /* compiled code */ } | assertNotSame |
28,345 | void (java.lang.String message) { /* compiled code */ } | failSame |
28,346 | void (java.lang.String message, java.lang.Object expected, java.lang.Object actual) { /* compiled code */ } | failNotSame |
28,347 | void (java.lang.String message, java.lang.Object expected, java.lang.Object actual) { /* compiled code */ } | failNotEquals |
28,348 | void (java.lang.String name) { /* compiled code */ } | setName |
28,349 | void (@Nullable String expected, @Nullable PsiType actual) { if (expected == null){ assertNull(actual); return; } assertNotNull(actual); if (actual instanceof PsiIntersectionType){ TestCase.assertEquals(expected, genIntersectionTypeText((PsiIntersectionType)actual)); } else { TestCase.assertEquals(expected, actual.getC... | assertType |
28,350 | String (PsiIntersectionType t) { StringBuilder b = new StringBuilder("["); for(PsiType c : t.getConjuncts()){ StringGroovyMethods.leftShift(StringGroovyMethods.leftShift(b, c.getCanonicalText()), ","); } if (DefaultGroovyMethods.asBoolean(t.getConjuncts())){ b.replace(b.length() - 1, b.length(), "]"); } return b.toStri... | genIntersectionTypeText |
28,351 | String () { String[] split = getTestName(true) .replaceFirst("test", "") .split(" "); String joined = Arrays.stream(split) .map(s -> StringGroovyMethods.capitalize(s)) .collect(Collectors.joining()); return StringGroovyMethods.uncapitalize(joined); } | getTestName |
28,352 | void (@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { super.configureModule(module, model, contentEntry); myLibrary.addTo(module, model); } | configureModule |
28,353 | String () { return TestUtils.getTestDataPath() + "grComment/"; } | getBasePath |
28,354 | void () { lineTest(""" //<caret>print 2 """, """ print 2 <caret>"""); } | testUncommentLine |
28,355 | void () { blockTest(""" <selection>print 2</selection> """, """ <selection>/*print 2*/</selection> """); } | testBlock0 |
28,356 | void () { blockTest(""" <selection>/*print 2*/</selection> """, """ <selection>print 2</selection> """); } | testUncommentBlock0 |
28,357 | void () { blockTest(""" <selection>print 2 </selection> """, """ <selection>/* print 2 */ </selection> """); } | testBlock1 |
28,358 | void () { blockTest(""" <selection>/* print 2 */ </selection> """, """ <selection>print 2 </selection> """); } | testUncommentBlock1 |
28,359 | void () { lineTest(""" def foo() { <caret>print 2 } """, """ def foo() { // print 2 }<caret> """); } | test_line_comment_no_indent |
28,360 | void () { getGroovySettings().LINE_COMMENT_AT_FIRST_COLUMN = false; lineTest(""" def foo() { println 42<caret> } """, """ def foo() { //println 42 }<caret> """); } | test_line_comment_indent |
28,361 | void () { getGroovySettings().LINE_COMMENT_AT_FIRST_COLUMN = false; getGroovySettings().LINE_COMMENT_ADD_SPACE = true; lineTest(""" def foo() { println 42<caret> } """, """ def foo() { // println 42 }<caret> """); } | test_line_comment_indent_and_space |
28,362 | void (String before, String after) { doTest(before, after, new CommentByLineCommentAction()); } | lineTest |
28,363 | void (String before, String after) { doTest(before, after, new CommentByBlockCommentAction()); } | blockTest |
28,364 | void (@NotNull String before, @NotNull String after, final AnAction action) { myFixture.configureByText(GroovyFileType.GROOVY_FILE_TYPE, before); myFixture.testAction(action); myFixture.checkResult(after); } | doTest |
28,365 | void () { final String name = getTestName(); getFixture().configureByFile(name + ".groovy"); getFixture().performEditorAction("GotoDeclaration"); getFixture().checkResultByFile(name + "_after.groovy"); } | doTest |
28,366 | void () { doTest(); } | testDefaultConstructor |
28,367 | void () { doTest(); } | testQualifierInNew |
28,368 | String () { return basePath; } | getBasePath |
28,369 | LightProjectDescriptor () { return projectDescriptor; } | getProjectDescriptor |
28,370 | void () { FindModel findModel = FindManagerTestUtils.configureFindModel("done"); String text = "/** done done done */"; FindManagerTestUtils.runFindForwardAndBackward(myFindManager, findModel, text, "groovy"); } | testFindInJavaDocs |
28,371 | void () { FindModel findModel = FindManagerTestUtils.configureFindModel("^done$"); findModel.setRegularExpressions(true); findModel.setSearchContext(FindModel.SearchContext.IN_STRING_LITERALS); String text = "def n = \"\"\"done\"\"\"\n def n = /done/\n def n = \"done\"\n def n = \"done2\""; FindManagerTestUtils.runFind... | testFindInLiteralToSkipQuotes |
28,372 | void () { FindModel findModel = FindManagerTestUtils.configureFindModel("done"); findModel.setWholeWordsOnly(true); findModel.setSearchContext(FindModel.SearchContext.IN_COMMENTS); String text = "#! done done done\n"; FindManagerTestUtils.runFindForwardAndBackward(myFindManager, findModel, text, "groovy"); } | testFindInShellCommentsOfGroovy |
28,373 | String () { return getAbsoluteTestDataPath() + "/mockJDK"; } | getMockJdkHome |
28,374 | String () { return FileUtil.toSystemIndependentName(PluginPathManager.getPluginHomePath("groovy")) + "/testdata/"; } | getAbsoluteTestDataPath |
28,375 | String () { return FileUtil.toSystemIndependentName(PluginPathManager.getPluginHomePathRelative("groovy")) + "/testdata/"; } | getTestDataPath |
28,376 | String (String text) { int index = text.indexOf(BEGIN_MARKER); return text.substring(0, index) + text.substring(index + BEGIN_MARKER.length()); } | removeBeginMarker |
28,377 | String (String text) { int index = text.indexOf(END_MARKER); return text.substring(0, index) + text.substring(index + END_MARKER.length()); } | removeEndMarker |
28,378 | List<String> (String filePath) { String content; try { content = StringUtil.convertLineSeparators(FileUtil.loadFile(new File(filePath))); } catch (IOException e) { throw new RuntimeException(e); } Assert.assertNotNull(content); List<String> input = new ArrayList<>(); int separatorIndex; content = StringUtil.replace(con... | readInput |
28,379 | void (JavaCodeInsightTestFixture fixture, PsiFile file, String ... expectedVariants) { fixture.configureFromExistingVirtualFile(file.getVirtualFile()); checkCompletionContains(fixture, expectedVariants); } | checkCompletionContains |
28,380 | void (JavaCodeInsightTestFixture fixture, String ... expectedVariants) { LookupElement[] lookupElements = fixture.completeBasic(); Assert.assertNotNull(lookupElements); Set<String> missedVariants = ContainerUtil.newHashSet(expectedVariants); for (LookupElement lookupElement : lookupElements) { String lookupString = loo... | checkCompletionContains |
28,381 | void (JavaCodeInsightTestFixture fixture, String lookupString, String expectedTypeCanonicalText) { LookupElement[] lookupElements = fixture.completeBasic(); PsiType type = null; for (LookupElement lookupElement : lookupElements) { if (lookupElement.getLookupString().equals(lookupString)) { PsiElement element = lookupEl... | checkCompletionType |
28,382 | void (PsiFile file, final String ... expectedUnresolved) { final List<String> actualUnresolved = new ArrayList<>(); final StringBuilder sb = new StringBuilder(); final String text = file.getText(); final Ref<Integer> lastUnresolvedRef = Ref.create(0); file.acceptChildren(new PsiRecursiveElementVisitor() { @Override pub... | checkResolve |
28,383 | void (@NotNull PsiElement element) { if (element instanceof GrReferenceExpression psiReference) { GrExpression qualifier = psiReference.getQualifierExpression(); if (qualifier instanceof GrReferenceExpression) { if (((GrReferenceExpression)qualifier).resolve() == null) { super.visitElement(element); return; } } if (psi... | visitElement |
28,384 | void (@NotNull PsiFile file) { } | visitFile |
28,385 | PsiMethod[] (PsiClass aClass) { //workaround for IDEA-148973: Groovy static compilation fails to compile calls of overriding methods with covariant type in interfaces return aClass.getMethods(); } | getMethods |
28,386 | void (@NotNull Project project, @NotNull Disposable parent) { PsiManagerEx.getInstanceEx(project).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, parent); } | disableAstLoading |
28,387 | LightProjectDescriptor () { return GroovyProjectDescriptors.GROOVY_2_5; } | getProjectDescriptor |
28,388 | String () { return myTestName.getMethodName(); } | getTestName |
28,389 | JavaCodeInsightTestFixture () { return myFixtureRule.getFixture(); } | getFixture |
28,390 | LightProjectDescriptor () { return GroovyProjectDescriptors.GROOVY_3_0; } | getProjectDescriptor |
28,391 | boolean (Class aClass) { return TestCaseLoader.getAnnotationInHierarchy(aClass, Slow.class) != null; } | isSlow |
28,392 | LightProjectDescriptor () { return GroovyProjectDescriptors.GROOVY_2_5; } | getProjectDescriptor |
28,393 | void () { doTest(); } | testEscapedReference |
28,394 | void () { doTest(); } | testGrvy1021 |
28,395 | void () { doTest(); } | testGrvy1021a |
28,396 | void () { doTest(); } | testGrvy1021b |
28,397 | void () { doTest(); } | testGrvy1156 |
28,398 | void () { doTest(); } | testGrvy117 |
28,399 | void () { doTest(); } | testGrvy1272 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.