Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
11,800 | LombokConfigOperation () { return findNotNullChildByClass(LombokConfigOperation.class); } | getOperation |
11,801 | String () { return LombokConfigPsiUtil.getKey(this); } | getKey |
11,802 | String () { return LombokConfigPsiUtil.getValue(this); } | getValue |
11,803 | String () { return LombokConfigPsiUtil.getSign(this); } | getSign |
11,804 | void (@NotNull LombokConfigVisitor visitor) { visitor.visitCleaner(this); } | accept |
11,805 | void (@NotNull PsiElementVisitor visitor) { if (visitor instanceof LombokConfigVisitor) accept((LombokConfigVisitor)visitor); else super.accept(visitor); } | accept |
11,806 | String () { return LombokConfigPsiUtil.getKey(this); } | getKey |
11,807 | Icon (@NotNull String path, int cacheKey, int flags) { return IconManager.getInstance().loadRasterizedIcon(path, LombokIcons.class.getClassLoader(), cacheKey, flags); } | load |
11,808 | String () { return "/plugins/lombok/testData"; } | getBasePath |
11,809 | LightProjectDescriptor () { return LombokTestUtil.LOMBOK_DESCRIPTOR; } | getProjectDescriptor |
11,810 | PsiFile (String fileName) { VirtualFile virtualFile = myFixture.copyFileToProject(fileName, fileName); myFixture.configureFromExistingVirtualFile(virtualFile); return myFixture.getFile(); } | loadToPsiFile |
11,811 | void () { PsiMethodCallExpression methodCall = createCall("@lombok.SneakyThrows void foo() { throwsMyException(); }"); List<PsiClassType> exceptions = ExceptionUtil.getUnhandledExceptions(methodCall, null); assertTrue(exceptions.isEmpty()); } | testCatchAllException |
11,812 | void () { PsiMethodCallExpression methodCall = createCall("@lombok.SneakyThrows(MyException.class) void foo() { throwsMyException(); }"); List<PsiClassType> exceptions = ExceptionUtil.getUnhandledExceptions(methodCall, null); assertTrue(exceptions.isEmpty()); } | testCatchSpecificException |
11,813 | void () { PsiMethodCallExpression methodCall = createCall("@lombok.SneakyThrows(Exception.class) void foo() { throwsMyException(); }"); List<PsiClassType> exceptions = ExceptionUtil.getUnhandledExceptions(methodCall, null); assertTrue(exceptions.isEmpty()); } | testCatchGeneralException |
11,814 | void () { PsiMethodCallExpression methodCall = createCall("@lombok.SneakyThrows(SomeException.class) void foo() { throwsMyException(); }"); List<PsiClassType> exceptions = ExceptionUtil.getUnhandledExceptions(methodCall, null); assertEquals(1, exceptions.size()); assertEquals("Test.MyException", exceptions.get(0).getCa... | testNotCatchException |
11,815 | void () { PsiFile file = createTestFile(""" @lombok.SneakyThrows public void m1() { Runnable runnable = () -> { throwsMyException(); }; } """); PsiMethodCallExpression methodCall = findMethodCall(file); assertNotNull(methodCall); List<PsiClassType> exceptions = ExceptionUtil.getUnhandledExceptions(methodCall, null); as... | testLambdaSneakyThrowsWrongCatch |
11,816 | void () { PsiFile file = createTestFile(""" @lombok.SneakyThrows public void m1() { Runnable runnable = new Runnable() { public void run() { throwsMyException(); } }; } """); PsiMethodCallExpression methodCall = findMethodCall(file); assertNotNull(methodCall); List<PsiClassType> exceptions = ExceptionUtil.getUnhandledE... | testAnonymousClassCorrectCatch |
11,817 | void () { throwsMyException(); } | run |
11,818 | void () { PsiFile file = createTestFile(""" @lombok.SneakyThrows public void m() { try { throwsMyException(); throwsSomeException(); } catch (Test.SomeException e) { } }"""); PsiMethodCallExpression methodCall = findMethodCall(file); assertNotNull(methodCall); PsiTryStatement tryStatement = findFirstChild(file, PsiTryS... | testTryCatchThatCatchAnotherException |
11,819 | void () { try { throwsMyException(); throwsSomeException(); } catch (Test.SomeException e) { } } | m |
11,820 | void () { PsiMethodCallExpression methodCall = createCall(""" @lombok.SneakyThrows public void m() { try { throwsMyException(); throwsSomeException(); } catch (Test.SomeException e) { } }"""); List<PsiClassType> exceptions = ExceptionUtil.getUnhandledExceptions(methodCall, null); assertSize(0, exceptions); } | testTryCatchThatCatchAnotherExceptionWithNullTopElement |
11,821 | void () { try { throwsMyException(); throwsSomeException(); } catch (Test.SomeException e) { } } | m |
11,822 | void () { PsiFile file = createTestFile(""" @lombok.SneakyThrows public void m() { try { try { throwsMyException(); throwsSomeException(); throwsAnotherException(); } catch (Test.SomeException e) {} } catch (Test.AnotherException e) {} }"""); PsiMethodCallExpression methodCall = findMethodCall(file); assertNotNull(meth... | testTryCatchThatCatchAnotherExceptionHierarchy |
11,823 | void () { try { try { throwsMyException(); throwsSomeException(); throwsAnotherException(); } catch (Test.SomeException e) {} } catch (Test.AnotherException e) {} } | m |
11,824 | void () { PsiMethodCallExpression methodCall = createCall("void foo() { throwsMyException(); }"); List<PsiClassType> exceptions = ExceptionUtil.getUnhandledExceptions(methodCall, null); assertEquals(1, exceptions.size()); assertEquals("Test.MyException", exceptions.get(0).getCanonicalText()); } | testRegularThrows |
11,825 | PsiMethodCallExpression (@NonNls final String body) { final PsiFile file = createTestFile(body); PsiMethodCallExpression methodCall = findMethodCall(file); assertNotNull(methodCall); return methodCall; } | createCall |
11,826 | PsiFile (@NonNls String body) { return createFile("test.java", "class Test { " + body + "void throwsAnotherException() throws AnotherException {}" + "void throwsMyException() throws MyException {}" + "void throwsSomeException() throws SomeException {}" + "static class MyException extends Exception {}" + "static class S... | createTestFile |
11,827 | PsiMethodCallExpression (@NotNull PsiElement element) { return findFirstChild(element, PsiMethodCallExpression.class); } | findMethodCall |
11,828 | void () { orderEntry = mock(OrderEntry.class); } | setUp |
11,829 | void () { when(orderEntry.getPresentableName()).thenReturn("Gradle: org.projectlombok:lombok:1.16.8"); assertEquals("1.16.8", Version.parseLombokVersion(orderEntry)); } | parseLombokVersionFromGradle |
11,830 | void () { when(orderEntry.getPresentableName()).thenReturn("Maven: org.projectlombok:lombok:1.16.6"); assertEquals("1.16.6", Version.parseLombokVersion(orderEntry)); } | parseLombokVersionFromMaven |
11,831 | void () { when(orderEntry.getPresentableName()).thenReturn("lombok"); assertNull(Version.parseLombokVersion(orderEntry)); } | parseLombokVersionFromUnknown |
11,832 | void () { assertTrue(Version.isLessThan("1", "2")); assertTrue(Version.isLessThan("", "2")); assertFalse(Version.isLessThan("1.2.3", "1.2.1")); assertTrue(Version.isLessThan("1.16.6", "1.16.8")); assertFalse(Version.isLessThan("1.16.8", "1.16.8")); assertTrue(Version.isLessThan("0.10.2", "1.16.8")); assertFalse(Version... | isLessThan |
11,833 | void (@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { DefaultLightProjectDescriptor.addJetBrainsAnnotations(model); MavenDependencyUtil.addFromMaven(model, LOMBOK_MAVEN_COORDINATES, true, DependencyScope.PROVIDED); MavenDependencyUtil.addFromMaven(model, JACKSON_MAVEN_C... | configureModule |
11,834 | Sdk () { return IdeaTestUtil.getMockJdk18(); } | getSdk |
11,835 | void (@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { MavenDependencyUtil.addFromMaven(model, LOMBOK_MAVEN_COORDINATES, true, DependencyScope.PROVIDED); MavenDependencyUtil.addFromMaven(model, JACKSON_MAVEN_COORDINATES); MavenDependencyUtil.addFromMaven(model, "org.slf4... | configureModule |
11,836 | void (@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { MavenDependencyUtil.addFromMaven(model, "org.projectlombok:lombok:1.18.2", true, DependencyScope.PROVIDED); model.getModuleExtension(LanguageLevelModuleExtension.class).setLanguageLevel(LanguageLevel.JDK_1_8); } | configureModule |
11,837 | boolean () { return !".*".equals(annotationToComparePattern()); } | shouldCompareAnnotations |
11,838 | String () { return ".*"; } | annotationToComparePattern |
11,839 | Collection<String> () { return Set.of("java.lang.SuppressWarnings", "java.lang.Override", "com.fasterxml.jackson.databind.annotation.JsonDeserialize"); } | annotationsToIgnoreList |
11,840 | boolean () { return true; } | shouldCompareCodeBlocks |
11,841 | void () { doTest(false); } | doTest |
11,842 | void (final boolean lowercaseFirstLetter) { doTest(getTestName(lowercaseFirstLetter)); } | doTest |
11,843 | void (String testName) { compareFiles(loadBeforeLombokFile(testName), loadAfterDeLombokFile(testName)); } | doTest |
11,844 | PsiJavaFile (String testName) { return getPsiJavaFile(testName, "before"); } | loadBeforeLombokFile |
11,845 | PsiJavaFile (String testName) { return getPsiJavaFile(testName, "after"); } | loadAfterDeLombokFile |
11,846 | PsiJavaFile (String testName, String type) { final String fileName = testName.replace('$', '/') + ".java"; final String filePath = type + "/" + fileName; final PsiFile psiFile = loadToPsiFile(filePath); if (!(psiFile instanceof PsiJavaFile)) { fail("The test file type is not supported"); } return (PsiJavaFile)psiFile; ... | getPsiJavaFile |
11,847 | void (PsiJavaFile beforeLombokFile, PsiJavaFile afterDelombokFile) { PsiClass[] beforeClasses = beforeLombokFile.getClasses(); PsiClass[] afterClasses = afterDelombokFile.getClasses(); compareClasses(beforeClasses, afterClasses); } | compareFiles |
11,848 | void (PsiClass[] beforeClasses, PsiClass[] afterClasses) { String before = "Before classes: " + Arrays.toString(beforeClasses); String after = "After classes: " + Arrays.toString(afterClasses); assertEquals("Class counts are different " + before + " <> " + after, afterClasses.length, beforeClasses.length); for (PsiClas... | compareClasses |
11,849 | void (PsiClass beforeClass, PsiClass afterClass) { LOG.info("Comparing classes " + beforeClass.getName() + " with " + afterClass.getName()); PsiModifierList beforeFieldModifierList = beforeClass.getModifierList(); PsiModifierList afterFieldModifierList = afterClass.getModifierList(); compareContainingClasses(beforeClas... | compareTwoClasses |
11,850 | void (PsiClass beforeClass, PsiClass afterClass) { PsiField[] beforeClassFields = beforeClass.getFields(); PsiField[] afterClassFields = afterClass.getFields(); LOG.debug("IntelliJ fields for class " + beforeClass.getName() + ": " + Arrays.toString(beforeClassFields)); LOG.debug("Theirs fields for class " + afterClass.... | compareFields |
11,851 | void (PsiExpression beforeInitializer, PsiExpression afterInitializer) { String beforeInitializerText = null == beforeInitializer ? "" : beforeInitializer.getText(); String afterInitializerText = null == afterInitializer ? "" : afterInitializer.getText(); assertEquals("Initializers are not equals ", afterInitializerTex... | compareInitializers |
11,852 | void (PsiType beforeType, PsiType afterType, PomNamedTarget whereTarget) { if (null != beforeType && null != afterType) { final String afterText = stripJavaLang(afterType.getCanonicalText()); final String beforeText = stripJavaLang(beforeType.getCanonicalText()); assertEquals(String.format("Types are not equal for elem... | compareType |
11,853 | String (String canonicalText) { return StringUtil.trimStart(canonicalText, "java.lang."); } | stripJavaLang |
11,854 | void (@NotNull PsiModifierList beforeModifierList, @NotNull PsiModifierList afterModifierList) { for (String modifier : PsiModifier.MODIFIERS) { boolean haveSameModifiers = afterModifierList.hasModifierProperty(modifier) == beforeModifierList.hasModifierProperty(modifier); if (!haveSameModifiers) { final PsiMethod afte... | compareModifiers |
11,855 | void (PsiModifierList beforeModifierList, PsiModifierList afterModifierList) { if (shouldCompareAnnotations()) { Collection<String> beforeAnnotations = Arrays.stream(beforeModifierList.getAnnotations()) .map(PsiAnnotation::getQualifiedName) .filter(Pattern.compile("lombok.*").asPredicate().negate().or(LombokClassNames.... | compareAnnotations |
11,856 | void (PsiClass beforeClass, PsiClass afterClass) { PsiMethod[] beforeMethods = beforeClass.getMethods(); PsiMethod[] afterMethods = afterClass.getMethods(); assertEquals("Methods are different for Class: " + beforeClass.getName(), Arrays.toString(toList(afterMethods)), Arrays.toString(toList(beforeMethods))); for (PsiM... | compareMethods |
11,857 | void (PsiClass beforeClass, PsiClass afterClass, PsiMethod afterMethod, PsiMethod beforeMethod) { final PsiModifierList afterModifierList = afterMethod.getModifierList(); PsiModifierList beforeModifierList = beforeMethod.getModifierList(); compareModifiers(beforeModifierList, afterModifierList); compareType(beforeMetho... | compareMethod |
11,858 | Collection<PsiMethod> (PsiMethod[] beforeMethods, PsiMethod compareMethod) { Collection<PsiMethod> result = new ArrayList<>(); for (PsiMethod psiMethod : beforeMethods) { final PsiParameterList compareMethodParameterList = compareMethod.getParameterList(); final PsiParameterList psiMethodParameterList = psiMethod.getPa... | filterMethods |
11,859 | Collection<String> (PsiParameterList compareMethodParameterList) { Collection<String> result = new ArrayList<>(); final PsiParameter[] compareMethodParameterListParameters = compareMethodParameterList.getParameters(); for (PsiParameter compareMethodParameterListParameter : compareMethodParameterListParameters) { result... | mapToTypeString |
11,860 | String[] (PsiNamedElement[] beforeMethods) { return Arrays.stream(beforeMethods).map(PsiNamedElement::getName) .filter(java.util.Objects::isNull).sorted(String.CASE_INSENSITIVE_ORDER).toArray(String[]::new); } | toList |
11,861 | void (PsiReferenceList beforeThrows, PsiReferenceList afterThrows, PsiMethod psiMethod) { PsiClassType[] beforeTypes = beforeThrows.getReferencedTypes(); PsiClassType[] afterTypes = afterThrows.getReferencedTypes(); assertEquals("Throws counts are different for Method :" + psiMethod.getName(), beforeTypes.length, after... | compareThrows |
11,862 | void (PsiClass beforeClass, PsiClass afterClass) { PsiMethod[] beforeConstructors = beforeClass.getConstructors(); PsiMethod[] afterConstructors = afterClass.getConstructors(); LOG.debug("IntelliJ constructors for class " + beforeClass.getName() + ": " + Arrays.toString(beforeConstructors)); LOG.debug("Theirs construct... | compareConstructors |
11,863 | void (PsiClass intellij, PsiClass theirs) { PsiClass intellijContainingClass = intellij.getContainingClass(); PsiClass theirsContainingClass = theirs.getContainingClass(); String intellijContainingClassName = intellijContainingClass == null ? null : intellijContainingClass.toString(); String theirsContainingClassName =... | compareContainingClasses |
11,864 | void (PsiClass intellij, PsiClass theirs) { PsiClass[] intellijClasses = intellij.getInnerClasses(); PsiClass[] theirsClasses = theirs.getInnerClasses(); LOG.debug("IntelliJ inner classes for class " + intellij.getName() + ": " + Arrays.toString(intellijClasses)); LOG.debug("Theirs inner classes for class " + theirs.ge... | compareInnerClasses |
11,865 | void (PsiParameterList intellij, PsiParameterList theirs) { assertEquals(theirs.getParametersCount(), intellij.getParametersCount()); PsiParameter[] intellijParameters = intellij.getParameters(); PsiParameter[] theirsParameters = theirs.getParameters(); for (int i = 0; i < intellijParameters.length; i++) { PsiParameter... | compareParams |
11,866 | String () { return super.getBasePath() + "/configsystem/value"; } | getBasePath |
11,867 | String () { return super.getBasePath() + "/configsystem/fieldnameconstants"; } | getBasePath |
11,868 | String () { return super.getBasePath() + "/configsystem/data"; } | getBasePath |
11,869 | String () { return super.getBasePath() + "/configsystem/log"; } | getBasePath |
11,870 | String () { return super.getBasePath() + "/configsystem/getter"; } | getBasePath |
11,871 | boolean () { return true; } | shouldCompareAnnotations |
11,872 | String () { return super.getBasePath() + "/configsystem/constructor"; } | getBasePath |
11,873 | String () { return super.getBasePath() + "/configsystem/fieldDefaults"; } | getBasePath |
11,874 | void () { final String fullFileName = getTestName(true).replace('$', '/') + ".java"; final int lastIndexOf = fullFileName.lastIndexOf('/'); final String subPath = fullFileName.substring(0, lastIndexOf); final String fileName = fullFileName.substring(lastIndexOf + 1); myFixture.copyFileToProject(subPath + "/before/lombo... | doTest |
11,875 | void (final String beforeFileName, final String afterFileName) { final PsiFile psiDelombokFile = loadToPsiFile(afterFileName); final PsiFile psiLombokFile = loadToPsiFile(beforeFileName); if (!(psiLombokFile instanceof PsiJavaFile) || !(psiDelombokFile instanceof PsiJavaFile)) { fail("The test file type is not supporte... | doTest |
11,876 | boolean () { return true; } | shouldCompareAnnotations |
11,877 | String () { return super.getBasePath() + "/configsystem/equalsandhashcode"; } | getBasePath |
11,878 | boolean () { return true; } | shouldCompareAnnotations |
11,879 | String () { return super.getBasePath() + "/configsystem/tostring"; } | getBasePath |
11,880 | boolean () { return true; } | shouldCompareAnnotations |
11,881 | String () { return super.getBasePath() + "/configsystem/accessors"; } | getBasePath |
11,882 | String () { return super.getBasePath() + "/configsystem/builder"; } | getBasePath |
11,883 | boolean () { return true; } | shouldCompareAnnotations |
11,884 | String () { return super.getBasePath() + "/configsystem/builder"; } | getBasePath |
11,885 | String () { return super.getBasePath() + "/configsystem/completion"; } | getBasePath |
11,886 | void () { doTest("LOGGER1"); } | testLoggerCompletionTest |
11,887 | void (String... expectedSuggestions) { final String fileName = getTestName(false).replace('$', '/') + ".java"; myFixture.copyFileToProject("lombok.config", "lombok.config"); myFixture.configureByFile( fileName); myFixture.complete(CompletionType.BASIC, 1); List<String> autoSuggestions = myFixture.getLookupElementString... | doTest |
11,888 | void () { PsiClass psiClass = myFixture.addClass(""" @lombok.AllArgsConstructor class MyBean { String property; }"""); PsiMethod[] constructors = psiClass.getConstructors(); PsiMethod constructor = assertOneElement(constructors); PsiParameter parameter = assertOneElement(constructor.getParameterList().getParameters());... | testConstructorParameter |
11,889 | void () { PsiClass psiClass = myFixture.addClass(""" @lombok.AllArgsConstructor(staticName="of", access = AccessLevel.PUBLIC) class MyBean { String property; }"""); PsiMethod factory = ContainerUtil.find(psiClass.getMethods(), psiMethod -> psiMethod.getName().equals("of")); assertNotNull(factory); PsiParameter paramete... | testStaticFactoryParameter |
11,890 | void () { Registry.get("platform.random.idempotence.check.rate").setValue(1, getTestRootDisposable()); myFixture.configureByFile("/postfix/issue670/" + getTestName(false) + ".java"); final PsiMethod[] firstCallGetMethods = myFixture.findClass("Issue670").getMethods(); assertNotEmpty(Arrays.asList(firstCallGetMethods));... | testIssue670 |
11,891 | void () { doTest("/postfix/varl/"); } | testSimpleVarl |
11,892 | void () { doTest("/postfix/val/"); } | testSimpleVal |
11,893 | void (String pathSuffix) { myFixture.configureByFile( pathSuffix + getTestName(true) + ".java"); myFixture.type('\t'); myFixture.checkResultByFile(pathSuffix + getTestName(true) + "_after.java", true); } | doTest |
11,894 | void () { doPropertiesTest(LOMBOKED_TEST_CLASS, """ -Test.java -Test Test(float, String, Boolean, int) Test() equals(Object): boolean canEqual(Object): boolean hashCode(): int toString(): String -fff: float fff(): float fff(float): Test fff: float -myString: String string(): String string(String): Test myString: String... | testLombokPropertiesGrouping |
11,895 | void (String classText, String expected) { doTest(classText, expected, false, true); } | doPropertiesTest |
11,896 | void (String classText, String expected, boolean showInterfaces, boolean showProperties) { myFixture.configureByText("Test.java", classText); myFixture.testStructureView(svc -> { svc.setActionActive(SuperTypesGrouper.ID, showInterfaces); svc.setActionActive(PropertiesGrouper.ID, showProperties); svc.setActionActive(Jav... | doTest |
11,897 | String () { return super.getBasePath() + "/extension"; } | getBasePath |
11,898 | void () { myFixture.configureByFile('/' + getTestName(false) + ".java"); final List<IntentionAction> availableActions = getAvailableActions(); assertTrue("Intention to add @SneakyThrows was not presented", ContainerUtil.exists(availableActions, action -> action.getText().contains("@SneakyThrows"))); } | testCheckedExeptionQuickFixExample |
11,899 | void () { myFixture.configureByFile( '/' + getTestName(false) + ".java"); final List<IntentionAction> availableActions = getAvailableActions(); assertTrue("Intention to add @SneakyThrows was not presented", ContainerUtil.exists(availableActions, action -> action.getText().contains("@SneakyThrows"))); } | testCheckedMultipleExceptionQuickFixExample |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.