Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
65,700 | String () { return JUnitUtil.TEST_ANNOTATION; } | getMarkerClassFQName |
65,701 | ExternalLibraryDescriptor () { return JUnitExternalLibraryDescriptor.JUNIT4; } | getFrameworkLibraryDescriptor |
65,702 | String () { return null; } | getDefaultSuperClass |
65,703 | boolean (PsiClass clazz, boolean canBePotential) { if (canBePotential) return isUnderTestSources(clazz); if (!isFrameworkAvailable(clazz)) return false; return JUnitUtil.isJUnit4TestClass(clazz, false); } | isTestClass |
65,704 | PsiMethod (@NotNull PsiClass clazz) { for (PsiMethod each : clazz.getMethods()) { if (AnnotationUtil.isAnnotated(each, JUnitUtil.BEFORE_ANNOTATION_NAME, 0)) return each; } return null; } | findSetUpMethod |
65,705 | PsiMethod (@NotNull PsiClass clazz) { for (PsiMethod each : clazz.getMethods()) { if (each.hasModifierProperty(PsiModifier.STATIC) && AnnotationUtil.isAnnotated(each, JUnitUtil.BEFORE_ANNOTATION_NAME, 0)) return each; } return null; } | findBeforeClassMethod |
65,706 | PsiMethod (@NotNull PsiClass clazz) { for (PsiMethod each : clazz.getMethods()) { if (AnnotationUtil.isAnnotated(each, JUnitUtil.AFTER_ANNOTATION_NAME, 0)) return each; } return null; } | findTearDownMethod |
65,707 | PsiMethod (@NotNull PsiClass clazz) { for (PsiMethod each : clazz.getMethods()) { if (each.hasModifierProperty(PsiModifier.STATIC) && AnnotationUtil.isAnnotated(each, JUnitUtil.AFTER_CLASS_ANNOTATION_NAME, 0)) return each; } return null; } | findAfterClassMethod |
65,708 | PsiMethod (PsiClass clazz, String beforeClassAnnotationName, String beforeAnnotationName) { PsiMethod method = findSetUpMethod(clazz); if (method != null) return method; PsiManager manager = clazz.getManager(); PsiElementFactory factory = JavaPsiFacade.getInstance(manager.getProject()).getElementFactory(); method = cre... | findOrCreateSetUpMethod |
65,709 | boolean (PsiElement element) { if (element instanceof PsiMethod method) { final PsiMethod ignoredTestMethod = AnnotationUtil.isAnnotated(method, "org.junit.Ignore", 0) ? JUnitUtil.getTestMethod(element) : null; return ignoredTestMethod != null; } return false; } | isIgnoredMethod |
65,710 | FileTemplateDescriptor () { return new FileTemplateDescriptor("JUnit4 SetUp Method.java"); } | getSetUpMethodFileTemplateDescriptor |
65,711 | FileTemplateDescriptor () { return new FileTemplateDescriptor("JUnit4 BeforeClass Method.java"); } | getBeforeClassMethodFileTemplateDescriptor |
65,712 | FileTemplateDescriptor () { return new FileTemplateDescriptor("JUnit4 TearDown Method.java"); } | getTearDownMethodFileTemplateDescriptor |
65,713 | FileTemplateDescriptor () { return new FileTemplateDescriptor("JUnit4 AfterClass Method.java"); } | getAfterClassMethodFileTemplateDescriptor |
65,714 | FileTemplateDescriptor () { return new FileTemplateDescriptor("JUnit4 Test Method.java"); } | getTestMethodFileTemplateDescriptor |
65,715 | FileTemplateDescriptor () { return new FileTemplateDescriptor("JUnit4 Parameters Method.java"); } | getParametersMethodFileTemplateDescriptor |
65,716 | FileTemplateDescriptor () { return new FileTemplateDescriptor("JUnit4 Test Class.java"); } | getTestClassFileTemplateDescriptor |
65,717 | boolean (PsiClass psiClass) { PsiAnnotation annotation = JUnitUtil.getRunWithAnnotation(psiClass); return annotation != null && JUnitUtil.isOneOf(annotation, "org.junit.runners.Suite"); } | isSuiteClass |
65,718 | boolean (PsiClass clazz) { PsiAnnotation annotation = JUnitUtil.getRunWithAnnotation(clazz); return annotation != null && JUnitUtil.isParameterized(annotation); } | isParameterized |
65,719 | PsiMethod (PsiClass clazz) { final PsiMethod[] methods = clazz.getAllMethods(); for (PsiMethod method : methods) { if (method.hasModifierProperty(PsiModifier.PUBLIC) && method.hasModifierProperty(PsiModifier.STATIC) && AnnotationUtil.isAnnotated(method, "org.junit.runners.Parameterized.Parameters", 0)) { //todo check r... | findParametersMethod |
65,720 | String () { String forkMode = super.getForkMode(); return JUnitConfiguration.FORK_METHOD.equals(forkMode) ? JUnitConfiguration.FORK_REPEAT : forkMode; } | getForkMode |
65,721 | void (List<String> options) { options.add(StringUtil.getPackageName(getConfiguration().getPersistentData().getMainClassName())); } | collectPackagesToOpen |
65,722 | String () { String parameters = getConfiguration().getPersistentData().getProgramParameters(); Integer index = JUnitConfiguration.Data.getIndexFromParameters(parameters); String indexStr = index == null ? "" : JUnitBundle.message("junit.config.with.parameter.0", index + 1); return ProgramRunnerUtil.shortenName(getConfi... | suggestActionName |
65,723 | RefactoringElementListener (final PsiElement element) { UElement uElement = UastContextKt.toUElement(element); JUnitConfiguration configuration = getConfiguration(); if (uElement instanceof PsiMethod method) { if (!method.getName().equals(configuration.getPersistentData().getMethodName())) return null; //noinspection C... | getListener |
65,724 | void (@NotNull final PsiElement newElement) { final boolean generatedName = configuration.isGeneratedName(); configuration.getPersistentData().setTestMethod(PsiLocation.fromPsiElement((PsiMethod)UastContextKt.toUElement(newElement))); if (generatedName) configuration.setGeneratedName(); } | elementRenamedOrMoved |
65,725 | void (@NotNull PsiElement newElement, @NotNull String oldQualifiedName) { final int methodIdx = oldQualifiedName.indexOf("#") + 1; if (methodIdx <= 0 || methodIdx >= oldQualifiedName.length()) return; final boolean generatedName = configuration.isGeneratedName(); configuration.getPersistentData().METHOD_NAME = oldQuali... | undoElementMovedOrRenamed |
65,726 | boolean (final JUnitConfiguration configuration, PsiClass testClass, PsiMethod testMethod, PsiPackage testPackage, PsiDirectory testDir) { if (testMethod == null) return false; if (testClass == null) return false; final JUnitConfiguration.Data data = configuration.getPersistentData(); /*final PsiClass containingClass =... | isConfiguredByElement |
65,727 | void (final String qualifiedName) { final boolean generatedName = isGeneratedName(); myData.PACKAGE_NAME = qualifiedName; if (generatedName) setGeneratedName(); } | setName |
65,728 | PsiPackage () { final String qualifiedName = myData.getPackageName(); return qualifiedName != null ? JavaPsiFacade.getInstance(getProject()).findPackage(qualifiedName) : null; } | getPsiElement |
65,729 | void (final PsiPackage psiPackage) { setName(psiPackage.getQualifiedName()); } | setPsiElement |
65,730 | void (@NotNull final String qualifiedName) { final boolean generatedName = isGeneratedName(); myData.MAIN_CLASS_NAME = qualifiedName; if (generatedName) setGeneratedName(); } | setName |
65,731 | PsiClass () { return getConfigurationModule().findClass(myData.getMainClassName()); } | getPsiElement |
65,732 | void (final PsiClass psiClass) { final Module originalModule = getConfigurationModule().getModule(); setMainClass(psiClass); restoreOriginalModule(originalModule); } | setPsiElement |
65,733 | void (@NotNull final String qualifiedName) { setCategory(qualifiedName); } | setName |
65,734 | PsiClass () { return getConfigurationModule().findClass(myData.getCategory()); } | getPsiElement |
65,735 | void (final PsiClass psiClass) { setCategory(JavaExecutionUtil.getRuntimeQualifiedName(psiClass)); } | setPsiElement |
65,736 | Data () { return myData; } | getPersistentData |
65,737 | RefactoringElementListener (final PsiElement element) { final RefactoringElementListener listener = getTestObject().getListener(element); return RunConfigurationExtension.wrapRefactoringElementListener(element, this, listener); } | getRefactoringElementListener |
65,738 | Collection<Module> () { if (TEST_PACKAGE.equals(myData.TEST_OBJECT) || TEST_PATTERN.equals(myData.TEST_OBJECT)) { return Arrays.asList(ModuleManager.getInstance(getProject()).getModules()); } try { getTestObject().checkConfiguration(); } catch (RuntimeConfigurationError e) { return Arrays.asList(ModuleManager.getInstan... | getValidModules |
65,739 | String () { String repeat = switch (getRepeatMode()) { case RepeatCount.UNLIMITED, RepeatCount.UNTIL_FAILURE, RepeatCount.UNTIL_SUCCESS -> " [*]"; case RepeatCount.N -> " [" + getRepeatCount() + "]"; default -> ""; }; String generatedName = myData.getGeneratedName(getConfigurationModule()); if (generatedName == null) r... | suggestedName |
65,740 | String () { return getTestObject().suggestActionName(); } | getActionName |
65,741 | String () { return myData.getVMParameters(); } | getVMParameters |
65,742 | void (@Nullable String value) { myData.setVMParameters(StringUtil.nullize(value)); } | setVMParameters |
65,743 | String () { return myData.getProgramParameters(); } | getProgramParameters |
65,744 | void (String value) { myData.setProgramParameters(value); } | setProgramParameters |
65,745 | String () { return myData.getWorkingDirectory(); } | getWorkingDirectory |
65,746 | void (String value) { myData.setWorkingDirectory(value); } | setWorkingDirectory |
65,747 | void (@NotNull Map<String, String> envs) { myData.setEnvs(envs); } | setEnvs |
65,748 | boolean () { return myData.PASS_PARENT_ENVS; } | isPassParentEnvs |
65,749 | void (boolean passParentEnvs) { myData.PASS_PARENT_ENVS = passParentEnvs; } | setPassParentEnvs |
65,750 | boolean () { return ALTERNATIVE_JRE_PATH_ENABLED; } | isAlternativeJrePathEnabled |
65,751 | void (boolean enabled) { boolean changed = ALTERNATIVE_JRE_PATH_ENABLED != enabled; ALTERNATIVE_JRE_PATH_ENABLED = enabled; ApplicationConfiguration.onAlternativeJreChanged(changed, getProject()); } | setAlternativeJrePathEnabled |
65,752 | String () { return ALTERNATIVE_JRE_PATH != null ? new AlternativeJrePathConverter().fromString(ALTERNATIVE_JRE_PATH) : null; } | getAlternativeJrePath |
65,753 | void (String path) { String collapsedPath = path != null ? new AlternativeJrePathConverter().toString(path) : null; boolean changed = !Objects.equals(ALTERNATIVE_JRE_PATH, collapsedPath); ALTERNATIVE_JRE_PATH = collapsedPath; ApplicationConfiguration.onAlternativeJreChanged(changed, getProject()); } | setAlternativeJrePath |
65,754 | String () { final Data data = getPersistentData(); return !Comparing.strEqual(data.TEST_OBJECT, TEST_CLASS) && !Comparing.strEqual(data.TEST_OBJECT, TEST_METHOD) ? null : data.getMainClassName(); } | getRunClass |
65,755 | String () { final Data data = getPersistentData(); return !Comparing.strEqual(data.TEST_OBJECT, TEST_PACKAGE) ? null : data.getPackageName(); } | getPackage |
65,756 | void (final PsiClass testClass) { if (FORK_KLASS.equals(getForkMode())) { setForkMode(FORK_NONE); } setMainClass(testClass); myData.TEST_OBJECT = TEST_CLASS; setGeneratedName(); } | beClassConfiguration |
65,757 | void (PsiClass aClass) { String className = aClass.getName(); myData.MAIN_CLASS_NAME += "$" + className; Set<@NlsSafe String> patterns = myData.getPatterns(); if (!patterns.isEmpty()) { myData.setPatterns(patterns.stream().map(name -> { if (name.contains(",")) { return StringUtil.getPackageName(name, ',') + "$" + class... | withNestedClass |
65,758 | boolean (PsiElement element) { final PsiClass testClass = JUnitUtil.getTestClass(element); final PsiMethod testMethod = JUnitUtil.getTestMethod(element, false); final PsiPackage testPackage; if (element instanceof PsiPackage) { testPackage = (PsiPackage)element; } else if (element instanceof PsiDirectory){ testPackage ... | isConfiguredByElement |
65,759 | String () { return getPersistentData().TEST_OBJECT; } | getTestType |
65,760 | TestSearchScope () { return getPersistentData().getScope(); } | getTestSearchScope |
65,761 | void (TestSearchScope searchScope) { getPersistentData().setScope(searchScope); } | setSearchScope |
65,762 | void (PsiLocation<? extends PsiMethod> sourceLocation) { myData.setTestMethod(sourceLocation); myData.TEST_OBJECT = BY_SOURCE_POSITION; } | beFromSourcePosition |
65,763 | void (final PsiClass testClass) { final boolean shouldUpdateName = isGeneratedName(); setModule(myData.setMainClass(testClass)); if (shouldUpdateName) setGeneratedName(); } | setMainClass |
65,764 | void (String categoryName) { final boolean shouldUpdateName = isGeneratedName(); myData.setCategoryName(categoryName); if (shouldUpdateName) setGeneratedName(); } | setCategory |
65,765 | void (final Location<PsiMethod> methodLocation) { setForkMode(FORK_NONE); setModule(myData.setTestMethod(methodLocation)); setGeneratedName(); } | beMethodConfiguration |
65,766 | TestObject () { return myData.getTestObject(this); } | getTestObject |
65,767 | InputRedirectOptions () { return myInputRedirectOptions; } | getInputRedirectOptions |
65,768 | void (@NotNull final Element element) { super.writeExternal(element); JavaRunConfigurationExtensionManager.getInstance().writeExternal(this, element); DefaultJDOMExternalizer.write(this, element, JavaParametersUtil.getFilter(this)); final Data persistentData = getPersistentData(); DefaultJDOMExternalizer.write(persiste... | writeExternal |
65,769 | boolean (@NotNull Field field) { return "TEST_OBJECT".equals(field.getName()) || super.test(field); } | test |
65,770 | void (@NotNull @NonNls String forkMode) { myData.FORK_MODE = forkMode; } | setForkMode |
65,771 | boolean () { return false; } | collectOutputFromProcessHandler |
65,772 | void (List<PsiClass> classes, PsiMethod method) { myData.TEST_OBJECT = TEST_PATTERN; final LinkedHashSet<String> patterns = new LinkedHashSet<>(); final String methodSuffix; if (method != null) { myData.METHOD_NAME = Data.getMethodPresentation(method); methodSuffix = "," + myData.METHOD_NAME; } else { methodSuffix = ""... | bePatternConfiguration |
65,773 | int () { return myData.REPEAT_COUNT; } | getRepeatCount |
65,774 | void (int repeatCount) { myData.REPEAT_COUNT = repeatCount; } | setRepeatCount |
65,775 | void (@NonNls String repeatMode) { myData.REPEAT_MODE = repeatMode; } | setRepeatMode |
65,776 | SMTRunnerConsoleProperties (@NotNull Executor executor) { JUnitConsoleProperties properties = new JUnitConsoleProperties(this, executor); properties.setIdBasedTestTree(getTestObject().isIdBasedTestTree()); return properties; } | createTestConsoleProperties |
65,777 | byte () { return FRAMEWORK_ID; } | getTestFrameworkId |
65,778 | boolean (@NotNull TargetEnvironmentConfiguration target) { return target.getRuntimes().findByType(JavaLanguageRuntimeConfiguration.class) != null; } | canRunOn |
65,779 | String () { return getOptions().getRemoteTarget(); } | getDefaultTargetName |
65,780 | void (@Nullable String targetName) { getOptions().setRemoteTarget(targetName); } | setDefaultTargetName |
65,781 | boolean () { return TargetEnvironmentAwareRunProfile.super.needPrepareTarget() || runsUnderWslJdk(); } | needPrepareTarget |
65,782 | boolean (final Object object) { if (!(object instanceof Data second)) return false; return Objects.equals(TEST_OBJECT, second.TEST_OBJECT) && Objects.equals(getMainClassName(), second.getMainClassName()) && Objects.equals(getPackageName(), second.getPackageName()) && Objects.equals(getMethodNameWithSignature(), second.... | equals |
65,783 | int () { return Comparing.hashcode(TEST_OBJECT) ^ Comparing.hashcode(getMainClassName()) ^ Comparing.hashcode(getPackageName()) ^ Comparing.hashcode(getMethodNameWithSignature()) ^ Comparing.hashcode(getWorkingDirectory()) ^ Comparing.hashcode(VM_PARAMETERS) ^ Comparing.hashcode(PARAMETERS) ^ Comparing.hashcode(myPatte... | hashCode |
65,784 | TestSearchScope () { return TEST_SEARCH_SCOPE.getScope(); } | getScope |
65,785 | void (final TestSearchScope scope) { TEST_SEARCH_SCOPE.setScope(scope); } | setScope |
65,786 | Data () { try { Data data = (Data)super.clone(); data.TEST_SEARCH_SCOPE = new TestSearchScope.Wrapper(); data.setScope(getScope()); data.myEnvs = new LinkedHashMap<>(myEnvs); return data; } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } } | clone |
65,787 | void (@NlsSafe String value) { VM_PARAMETERS = value; } | setVMParameters |
65,788 | void (@NlsSafe String value) { PARAMETERS = value; } | setProgramParameters |
65,789 | void (@NlsSafe String value) { WORKING_DIRECTORY = StringUtil.isEmptyOrSpaces(value) ? "" : FileUtilRt.toSystemIndependentName(value.trim()); } | setWorkingDirectory |
65,790 | void (@NlsSafe String... uniqueId) { UNIQUE_ID = uniqueId; } | setUniqueIds |
65,791 | Module (final Location<? extends PsiMethod> methodLocation) { final PsiMethod method = methodLocation.getPsiElement(); METHOD_NAME = getMethodPresentation(method); TEST_OBJECT = TEST_METHOD; return setMainClass(methodLocation instanceof MethodLocation ? ((MethodLocation)methodLocation).getContainingClass() : method.get... | setTestMethod |
65,792 | void (String methodName) { METHOD_NAME = methodName; } | setTestMethodName |
65,793 | void (@NlsSafe String tags) { TAGS = tags; } | setTags |
65,794 | Integer (String parameters) { Integer index = null; if (parameters != null && !parameters.isEmpty()) { Matcher matcher = VALUE_SOURCE_PATTERN.matcher(parameters); if (matcher.find()) { String group = matcher.group(1); try { index = Integer.parseInt(group); } catch (NumberFormatException ignored) { } } } return index; } | getIndexFromParameters |
65,795 | void (@NlsSafe String dirName) { DIR_NAME = dirName; } | setDirName |
65,796 | void (LinkedHashSet<@NlsSafe String> pattern) { myPattern = pattern; } | setPatterns |
65,797 | TestObject (@NotNull JUnitConfiguration configuration) { final ExecutionEnvironment environment = ExecutionEnvironmentBuilder.create(DefaultRunExecutor.getRunExecutorInstance(), configuration).build(); final TestObject testObject = TestObject.fromString(TEST_OBJECT, configuration, environment); return testObject == nul... | getTestObject |
65,798 | Module (final PsiClass testClass) { MAIN_CLASS_NAME = JavaExecutionUtil.getRuntimeQualifiedName(testClass); PACKAGE_NAME = StringUtil.getPackageName(Objects.requireNonNull(testClass.getQualifiedName())); return JavaExecutionUtil.findModule(testClass); } | setMainClass |
65,799 | void (final Map<String, String> envs) { myEnvs = envs; } | setEnvs |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.