Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
57,900 | void () { System.out.println("sample output"); } | simple |
57,901 | void () { System.out.println("sample output"); } | simple2 |
57,902 | String () { return VfsUtilCore .pathToUrl(PlatformTestUtil.getCommunityPath() + "/plugins/testng_rt/tests/testData/integration/forkProjectWithModuleInfoTestNG"); } | getTestContentRoot |
57,903 | LanguageLevel () { return LanguageLevel.JDK_11; } | getProjectLanguageLevel |
57,904 | Collection<Object[]> () { return Arrays.asList( createParams("6.8"), createParams("6.11"), createParams("6.10"), createParams("6.13.1"), createParams("6.14.2") ); } | data |
57,905 | Object[] (final String version) { return new Object[]{version}; } | createParams |
57,906 | String () { return VfsUtilCore.pathToUrl(PlatformTestUtil.getCommunityPath() + "/plugins/testng_rt/tests/testData/integration/" + getName()); } | getTestContentRoot |
57,907 | void () { ComparisonFailureData failure = createNotification("expected [foo] but found [bar]"); assertNotNull(failure); assertEquals("foo", failure.getExpected()); assertEquals("bar", failure.getActual()); } | testExpectedButFound |
57,908 | void () { Assert.assertNull(createNotification(""" The following asserts failed: \texpected [2] but found [1], \texpected [4] but found [3], \texpected [6] but found [5]""")); } | testMultiplePatternsInOneAssertion |
57,909 | ComparisonFailureData (String message) { return TestNGExpectedPatterns.createExceptionNotification(message); } | createNotification |
57,910 | void (IInvokedMethod method, ITestResult testResult) { synchronized (myListener) { if (!testResult.getMethod().isTest()) { myListener.onConfigurationStart(myListener.createDelegated(testResult)); } } } | beforeInvocation |
57,911 | void (IInvokedMethod method, ITestResult testResult) {} | afterInvocation |
57,912 | void (ITestResult result) { testStarted(result.getTestClass().getName(), result.getTestName()); } | onTestStart |
57,913 | void (ITestResult result) { testFinished(result.getTestClass().getName(), result.getName(), true); } | onTestSuccess |
57,914 | void (ITestResult result) { testFinished(result.getTestClass().getName(), result.getName(), ComparisonFailureData.isAssertionError(result.getThrowable().getClass())); } | onTestFailure |
57,915 | void (ITestResult result) { testFinished(result.getTestClass().getName(), result.getName(), false); } | onTestSkipped |
57,916 | void (ITestResult result) { testFinished(result.getTestClass().getName(), result.getName(), true); } | onTestFailedButWithinSuccessPercentage |
57,917 | void (ITestContext context) {} | onStart |
57,918 | void (ITestContext context) {} | onFinish |
57,919 | void (ISuite suite) { testRunStarted(suite.getName()); } | onStart |
57,920 | void (ISuite suite) { testRunFinished(suite.getName()); } | onFinish |
57,921 | String () { return "g"; } | getFrameworkId |
57,922 | ComparisonFailureData (String message) { ComparisonFailureData softAssertNotification = createExceptionNotification(message, SOFT_ASSERT_PATTERN); if (softAssertNotification != null) { return SOFT_ASSERT_CHAINED_PATTERN.matcher(softAssertNotification.getExpected()).find() ? null : softAssertNotification; } return creat... | createExceptionNotification |
57,923 | String () { return TestNGForkedStarter.class.getName(); } | getStarterName |
57,924 | void (ITestResult result) { myListener.onTestStart(result); } | onTestStart |
57,925 | void (ITestResult result) { myListener.onTestSuccess(result); } | onTestSuccess |
57,926 | void (ITestResult result) { myListener.onTestFailure(result); } | onTestFailure |
57,927 | void (ITestResult result) { myListener.onTestSkipped(result); } | onTestSkipped |
57,928 | void (ITestResult result) { myListener.onTestFailedButWithinSuccessPercentage(result); } | onTestFailedButWithinSuccessPercentage |
57,929 | void (ITestContext context) { myListener.onStart(context); } | onStart |
57,930 | void (ITestContext context) { myListener.onFinish(context); } | onFinish |
57,931 | void (ExposedTestResult result) { onStartWithParameters(result, false); } | onTestStart |
57,932 | void (ExposedTestResult result, boolean config) { final Object[] parameters = result.getParameters(); final String qualifiedName = result.getClassName() + result.getDisplayMethodName(); Integer invocationCount = myInvocationCounts.get(qualifiedName); if (invocationCount == null) { invocationCount = 0; } Integer normali... | onStartWithParameters |
57,933 | Integer (Integer invocationCount, ExposedTestResult result) { List<Integer> includeMethods = result.getIncludeMethods(); if (includeMethods == null || invocationCount >= includeMethods.size()) { return invocationCount; } return includeMethods.get(invocationCount); } | normalizeInvocationCountInsideIncludedMethods |
57,934 | void (ExposedTestResult result) { onStartWithParameters(result, true); } | onConfigurationStart |
57,935 | void (ExposedTestResult result) { onTestFinished(result); } | onConfigurationSuccess |
57,936 | void (ExposedTestResult result) { onTestFailure(result); } | onConfigurationFailure |
57,937 | boolean (String classFQName, boolean provideLocation) { return onSuiteStart(Collections.singletonList(classFQName), null, provideLocation); } | onSuiteStart |
57,938 | boolean (List<String> parentsHierarchy, ExposedTestResult result, boolean provideLocation) { int idx = 0; String currentClass; String currentParent; while (idx < myCurrentSuites.size() && idx < parentsHierarchy.size()) { currentClass = myCurrentSuites.get(idx); currentParent =parentsHierarchy.get(parentsHierarchy.size(... | onSuiteStart |
57,939 | void (String suiteName) { myPrintStream.println("##teamcity[testSuiteFinished name='" + escapeName(suiteName) + "']"); } | onSuiteFinish |
57,940 | void (ExposedTestResult result, String paramString, Integer invocationCount, boolean config) { myParamsMap.put(result, paramString); onSuiteStart(result.getTestHierarchy(), result, true); final String className = result.getClassName(); final String methodName = result.getDisplayMethodName(); final String location = cla... | onTestStart |
57,941 | void (ExposedTestResult result) { if (!myParamsMap.containsKey(result)) { onTestStart(result); } Throwable ex = result.getThrowable(); String methodName = getTestMethodNameWithParams(result); final Map<String, String> attrs = new LinkedHashMap<>(); attrs.put("name", methodName); final String failureMessage = ex != null... | onTestFailure |
57,942 | void (ExposedTestResult result) { if (!myParamsMap.containsKey(result)) { onTestStart(result); mySkipped++; } myPrintStream.println("##teamcity[testIgnored name='" + escapeName(getTestMethodNameWithParams(result)) + "']"); onTestFinished(result); } | onTestSkipped |
57,943 | void (ExposedTestResult result) { final long duration = result.getDuration(); myPrintStream.println("##teamcity[testFinished name='" + escapeName(getTestMethodNameWithParams(result)) + (duration > 0 ? "' duration='" + duration : "") + "']"); } | onTestFinished |
57,944 | String (Object[] parameters, boolean config, int invocationCount) { String paramString = ""; if (parameters.length > 0) { if (config) { Object parameter = parameters[0]; if (parameter != null) { Class<?> parameterClass = parameter.getClass(); if (ITestResult.class.isAssignableFrom(parameterClass) || ITestContext.class.... | getParamsString |
57,945 | String (Throwable tr) { StringWriter stringWriter = new StringWriter(); PrintWriter writer = new PrintWriter(stringWriter); tr.printStackTrace(writer); StringBuffer buffer = stringWriter.getBuffer(); return buffer.toString(); } | getTrace |
57,946 | String (String fqName) { int lastPointIdx = fqName.lastIndexOf('.'); if (lastPointIdx >= 0) { return fqName.substring(lastPointIdx + 1); } return fqName; } | getShortName |
57,947 | String (String str) { return MapSerializerUtil.escapeStr(str, MapSerializerUtil.STD_ESCAPER); } | escapeName |
57,948 | DelegatedResult (ITestResult result) { final DelegatedResult newResult = new DelegatedResult(result); final DelegatedResult oldResult = myResults.get(newResult); if (oldResult != null) { return oldResult; } myResults.put(newResult, newResult); return newResult; } | createDelegated |
57,949 | String () { String name = myResult.getTestName(); if (name != null && !name.equals(myResult.getTestClass().getTestName())) { return name; } ITestNGMethod method = myResult.getMethod(); ConstructorOrMethod constructorOrMethod = method.getConstructorOrMethod(); AccessibleObject member = null; if (constructorOrMethod.getM... | calculateDisplayName |
57,950 | Object[] () { return myResult.getParameters(); } | getParameters |
57,951 | String () { return myResult.getMethod().getMethodName(); } | getMethodName |
57,952 | String () { return myTestName; } | getDisplayMethodName |
57,953 | String () { return myResult.getMethod().getTestClass().getName(); } | getClassName |
57,954 | long () { return myResult.getEndMillis() - myResult.getStartMillis(); } | getDuration |
57,955 | List<String> () { final List<String> hierarchy; final XmlTest xmlTest = myResult.getTestClass().getXmlTest(); if (xmlTest != null) { hierarchy = Arrays.asList(getClassName(), xmlTest.getName()); } else { hierarchy = Collections.singletonList(getClassName()); } return hierarchy; } | getTestHierarchy |
57,956 | String () { final XmlTest xmlTest = myResult.getTestClass().getXmlTest(); return xmlTest != null ? xmlTest.getSuite().getFileName() : null; } | getFileName |
57,957 | String () { final XmlTest xmlTest = myResult.getTestClass().getXmlTest(); return xmlTest != null ? xmlTest.getName() : null; } | getXmlTestName |
57,958 | Throwable () { return myResult.getThrowable(); } | getThrowable |
57,959 | List<Integer> () { IClass testClass = myResult.getTestClass(); if (testClass == null) return null; XmlClass xmlClass = testClass.getXmlClass(); if (xmlClass == null) return null; List<XmlInclude> includedMethods = xmlClass.getIncludedMethods(); if (includedMethods.isEmpty()) return null; return includedMethods.get(0).g... | getIncludeMethods |
57,960 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; return myResult.equals(((DelegatedResult)o).myResult); } | equals |
57,961 | int () { return myResult.hashCode(); } | hashCode |
57,962 | void (ISuite suite) { myListener.onStart(suite); } | onStart |
57,963 | void (ISuite suite) { myListener.onFinish(suite); } | onFinish |
57,964 | void (Throwable e) {} | log |
57,965 | File (Map<String, Map<String, List<String>>> map, Map<String, String> testParams, String name, String rootPath, Logger logger, boolean requireHttp) { XmlSuite xmlSuite = new XmlSuite(); xmlSuite.setParameters(testParams); return writeSuite(map, name, rootPath, logger, requireHttp, xmlSuite); } | writeSuite |
57,966 | File (Map<String, Map<String, List<String>>> map, String name, String rootPath, Logger logger, boolean requireHttp, XmlSuite xmlSuite) { XmlTest xmlTest = new XmlTest(xmlSuite); xmlTest.setName(name); List<XmlClass> xmlClasses = new ArrayList<>(); int idx = 0; for (String className : map.keySet()) { final XmlClass xmlC... | writeSuite |
57,967 | void (Logger logger, File xmlFile, String content) { try { try (OutputStream stream = new FileOutputStream(xmlFile, false)) { byte[] text = content.getBytes(StandardCharsets.UTF_8); stream.write(text, 0, text.length); } } catch (IOException e) { logger.log(e); } } | writeToFile |
57,968 | void (ITestResult itr) { myListener.onConfigurationSuccess(itr, !myStarted); } | onConfigurationSuccess |
57,969 | void (ITestResult itr) { myListener.onConfigurationFailure(itr, !myStarted); } | onConfigurationFailure |
57,970 | void (ITestResult itr) { myListener.onConfigurationSkip(itr); } | onConfigurationSkip |
57,971 | void () { myStarted = true; } | setIgnoreStarted |
57,972 | void (List<XmlSuite> suites, List<XmlSuite> outSuites) { for (XmlSuite s : suites) { outSuites.add(s); calculateAllSuites(s.getChildSuites(), outSuites); } } | calculateAllSuites |
57,973 | void (CommandLineArgs cla) { super.configure(cla); } | configure |
57,974 | void () { try { initializeSuitesAndJarFile(); List<XmlSuite> suites = Lists.newArrayList(); calculateAllSuites(m_suites, suites); if(!suites.isEmpty()) { for (XmlSuite suite : suites) { final List<XmlTest> tests = suite.getTests(); for (XmlTest test : tests) { try { if (myParam != null) { for (XmlClass aClass : test.ge... | run |
57,975 | void (IDEATestNGRemoteListener listener) { addListener((Object)new IDEATestNGSuiteListener(listener)); addListener((Object)new IDEATestNGTestListener(listener)); try { Class<?> configClass = Class.forName("com.intellij.rt.testng.IDEATestNGConfigurationListener"); Object configurationListener = configClass.getConstructo... | attachListeners |
57,976 | void (String[] args) { final IDEARemoteTestNG testNG = new IDEARemoteTestNG(null); CommandLineArgs cla = new CommandLineArgs(); new JCommander(Collections.singletonList(cla)).parse(args); testNG.configure(cla); testNG.run(); System.exit(0); } | main |
57,977 | Map () { return myMap; } | getMap |
57,978 | GradleModelFetchPhase () { return GradleModelFetchPhase.PROJECT_LOADED_PHASE; } | getPhase |
57,979 | void (@NotNull BuildController controller, @NotNull Model projectModel, @NotNull ProjectImportModelProvider.ProjectModelConsumer modelConsumer) { ProjectPropertiesTestModelBuilder.ProjectProperties model = controller.getModel(projectModel, ProjectPropertiesTestModelBuilder.ProjectProperties.class); Map<String, String> ... | populateProjectModels |
57,980 | Map () { return myMap; } | getMap |
57,981 | void (@NotNull BuildController controller, @NotNull Model projectModel, @NotNull ProjectImportModelProvider.ProjectModelConsumer modelConsumer) { ProjectPropertiesTestModelBuilder.ProjectProperties model = controller.getModel(projectModel, ProjectPropertiesTestModelBuilder.ProjectProperties.class); Map<String, String> ... | populateProjectModels |
57,982 | GradleModelFetchPhase () { return GradleModelFetchPhase.PROJECT_LOADED_PHASE; } | getPhase |
57,983 | void (@NotNull BuildController controller, @NotNull GradleBuild buildModel, @NotNull ProjectImportModelProvider.BuildModelConsumer consumer) { // used as a trigger for a ModelBuilder which accepts Object and configure build // the model instance is not used somehow further //noinspection unused Object model = controlle... | populateBuildModels |
57,984 | Matcher<String> () { return myMatcher != null ? myMatcher : CoreMatchers.any(String.class); } | getMatcher |
57,985 | void (Description d) { final TargetVersions targetVersions = d.getAnnotation(TargetVersions.class); if (targetVersions == null) return; myMatcher = new CustomMatcher<String>("Gradle version '" + Arrays.toString(targetVersions.value()) + "'") { @Override public boolean matches(Object item) { return item instanceof Strin... | starting |
57,986 | boolean (Object item) { return item instanceof String && new VersionMatcher(GradleVersion.version(item.toString())).isVersionMatch(targetVersions); } | matches |
57,987 | boolean (@Nullable TargetVersions targetVersions) { if (targetVersions == null) return true; return isVersionMatch(targetVersions.value(), targetVersions.checkBaseVersions()); } | isVersionMatch |
57,988 | boolean (@Nullable String[] targetVersions, final boolean checkBaseVersions) { for (String t : targetVersions) { if (!isVersionMatch(t, checkBaseVersions)) return false; } return true; } | isVersionMatch |
57,989 | boolean (@Nullable String targetVersions, boolean checkBaseVersions) { if (targetVersions == null || targetVersions.isEmpty()) return true; final GradleVersion current = adjust(myGradleVersion, checkBaseVersions); if (targetVersions.endsWith("+")) { String minVersion = targetVersions.substring(0, targetVersions.length(... | isVersionMatch |
57,990 | int (@NotNull GradleVersion gradleVersion, @NotNull String otherGradleVersion, boolean checkBaseVersions) { return gradleVersion.compareTo(adjust(GradleVersion.version(otherGradleVersion), checkBaseVersions)); } | compare |
57,991 | GradleVersion (@NotNull GradleVersion version, boolean checkBaseVersions) { return checkBaseVersions ? version.getBaseVersion() : version; } | adjust |
57,992 | void () { assertTrue(isMatching("1.8", TestModelBuilderService_v_1_8.class)); assertTrue(isMatching("1.8-rc-1", TestModelBuilderService_v_1_8.class)); assertFalse(isMatching("1.7", TestModelBuilderService_v_1_8.class)); assertFalse(isMatching("1.7-rc-1", TestModelBuilderService_v_1_8.class)); assertFalse(isMatching("1.... | testVersionMatching |
57,993 | boolean (String modelName) { return TestModelBuilderService_v_1_8.class.getName().equals(modelName); } | canBuild |
57,994 | Object (String modelName, Project project) { return null; } | buildAll |
57,995 | void ( @NotNull String modelName, @NotNull Project project, @NotNull ModelBuilderContext context, @NotNull Exception exception ) { context.getMessageReporter().createMessage() .withGroup("gradle.test.group") .withException(exception) .reportMessage(project); } | reportErrorMessage |
57,996 | boolean (String modelName) { return TestModelBuilderService_v_1_8_or_Above.class.getName().equals(modelName); } | canBuild |
57,997 | Object (String modelName, Project project) { return null; } | buildAll |
57,998 | void ( @NotNull String modelName, @NotNull Project project, @NotNull ModelBuilderContext context, @NotNull Exception exception ) { context.getMessageReporter().createMessage() .withGroup("gradle.test.group") .withException(exception) .reportMessage(project); } | reportErrorMessage |
57,999 | boolean (String modelName) { return TestModelBuilderService_between_v_1_8_and_1_9.class.getName().equals(modelName); } | canBuild |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.