Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
16,000 | void (int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; } | yypushback |
16,001 | boolean (Language language) { return language != null && language.is(ShLanguage.INSTANCE); } | isApplicable |
16,002 | boolean (@NotNull String command, @NotNull Project project, @Nullable String workingDirectory, @NotNull Executor executor) { ShRunner shRunner = ApplicationManager.getApplication().getService(ShRunner.class); if (shRunner != null && shRunner.isAvailable(project)) { shRunner.run(project, command, workingDirectory, "RunM... | run |
16,003 | String () { return ShBundle.message("sh.markdown.runner.title"); } | title |
16,004 | GeneralCommandLine (Project project, String workingDirectory, String command) { PtyCommandLine commandLine = new PtyCommandLine(); commandLine.withConsoleMode(false); commandLine.withInitialColumns(120); commandLine.withParentEnvironmentType(GeneralCommandLine.ParentEnvironmentType.CONSOLE); commandLine.setWorkDirector... | createCommandLineForScript |
16,005 | String () { return PluginPathManager.getPluginHomePath("sh") + "/copyright/testData/copyright/"; } | getTestDataPath |
16,006 | UpdateCopyright (Project project, Module module, VirtualFile file, FileType base, CopyrightProfile options) { return new ShUpdatePsiFileCopyright(project, module, file, options); } | createInstance |
16,007 | boolean () { return getFile() instanceof ShFile; } | accept |
16,008 | void () { PsiFile file = getFile(); PsiElement first = file.getFirstChild(); if (first instanceof PsiComment && ((PsiComment)first).getTokenType() == ShTypes.SHEBANG) first = getNextSibling(first); PsiElement next = first; while (next instanceof PsiComment || ((next instanceof ASTNode) && ((ASTNode)next).getElementType... | scanFile |
16,009 | boolean (@NotNull PsiElement element) { PsiFile psiFile = element.getContainingFile(); return psiFile instanceof PyFile; } | isRunningProhibitedForElement |
16,010 | boolean (@NotNull PsiFile file) { return file instanceof PyFile; } | isRunningProhibitedForFile |
16,011 | String () { TerminalProjectOptionsProvider terminalProjectOptionsProvider = TerminalProjectOptionsProvider.getInstance(myProject); return terminalProjectOptionsProvider.getShellPath(); } | getDefaultShell |
16,012 | void (@NotNull Project project, @NotNull String command, @NotNull String workingDirectory, @NotNull @NlsContexts.TabTitle String title, boolean activateToolWindow) { TerminalToolWindowManager terminalToolWindowManager = TerminalToolWindowManager.getInstance(project); ToolWindow window = ToolWindowManager.getInstance(pr... | run |
16,013 | boolean (@NotNull Project project) { ToolWindow window = ToolWindowManager.getInstance(project).getToolWindow(TerminalToolWindowFactory.TOOL_WINDOW_ID); return window != null && window.isAvailable(); } | isAvailable |
16,014 | String () { // A decoded result of calling `WebPGetDecoderVersion()`; we don't want to load the native library just to get this constant. return "1.3.2"; } | getDecoderVersion |
16,015 | String () { return getDecoderVersion(); } | getEncoderVersion |
16,016 | boolean () { if (!sJniLibLoadAttempted) { try { loadNativeLibrary(); } catch (UnsatisfiedLinkError e) { Logger.getInstance(WebpNativeLibHelper.class).warn(e); } } return sJniLibLoaded; } | loadNativeLibraryIfNeeded |
16,017 | boolean (ImageTypeSpecifier type) { return canWriteImage(type); } | canEncodeImage |
16,018 | boolean (ImageTypeSpecifier type) { SampleModel sm = type.getSampleModel(); ColorModel cm = type.getColorModel(); return (sm.getNumBands() >= 2 && sm.getNumBands() <= 4 || cm instanceof IndexColorModel) && sm.getSampleSize(0) <= 8 && sm.getWidth() <= 65535 && sm.getHeight() <= 65535 && (cm == null || cm.getComponentSiz... | canWriteImage |
16,019 | String (Locale locale) { return "WebP Image Encoder"; } | getDescription |
16,020 | IIOMetadata (ImageWriteParam param) { return new WebpMetadata(); } | getDefaultStreamMetadata |
16,021 | IIOMetadata (ImageTypeSpecifier imageType, ImageWriteParam param) { return new WebpMetadata(); } | getDefaultImageMetadata |
16,022 | IIOMetadata (IIOMetadata inData, ImageWriteParam param) { return null; } | convertStreamMetadata |
16,023 | IIOMetadata (IIOMetadata inData, ImageTypeSpecifier imageType, ImageWriteParam param) { return null; } | convertImageMetadata |
16,024 | void (Object output) { super.setOutput(output); if (output != null) { if (!(output instanceof ImageOutputStream)) { throw new IllegalArgumentException("output is not an ImageOutputStream"); } this.stream = (ImageOutputStream)output; this.stream.setByteOrder(ByteOrder.LITTLE_ENDIAN); } else { this.stream = null; } } | setOutput |
16,025 | Raster (@NotNull IIOImage image) { boolean rasterOnly = image.hasRaster(); if (rasterOnly) { return image.getRaster(); } else { RenderedImage renderedImage = image.getRenderedImage(); if (renderedImage instanceof BufferedImage bufferedImage) { // Convert indexed to RGB if (renderedImage.getColorModel() instanceof Index... | getRaster |
16,026 | boolean (byte[] a1, int offset, int len, byte[] a2) { for (int i = 0; i < len; i++) { if (a1[offset + i] != a2[i]) { return false; } } return true; } | arrayEquals |
16,027 | String (Locale locale) { return "Webp Image Decoder"; } | getDescription |
16,028 | void () { myInputBytes = null; } | dispose |
16,029 | void (Object input, boolean seekForwardOnly, boolean ignoreMetadata) { super.setInput(input, seekForwardOnly, ignoreMetadata); myInputBytes = null; myError = 0; } | setInput |
16,030 | int (boolean allowSearch) { return myInputBytes == null ? 0 : 1; } | getNumImages |
16,031 | LauncherDiscoveryRequest (String[] suiteClassNames, String[] packageNameRef, String param) { if (suiteClassNames.length == 0) { return null; } LauncherDiscoveryRequestBuilder builder = LauncherDiscoveryRequestBuilder.request(); if (suiteClassNames.length == 1 && suiteClassNames[0].charAt(0) == '@') { // all tests in th... | buildRequest |
16,032 | boolean (MethodSelector selector) { try { Class<?> aClass = Class.forName(selector.getClassName()); return ReflectionSupport.findMethod(aClass, selector.getMethodName(), selector.getMethodParameterTypes()).isPresent(); } catch (ClassNotFoundException e) { return false; } } | loadMethodByReflection |
16,033 | boolean (List<DiscoverySelector> selectors) { for (DiscoverySelector selector : selectors) { if (selector instanceof MethodSelector && !loadMethodByReflection((MethodSelector)selector)) { return true; } } return false; } | hasBrokenSelector |
16,034 | PostDiscoveryFilter (List<DiscoverySelector> selectors) { return new PostDiscoveryFilter() { @Override public FilterResult apply(TestDescriptor descriptor) { return FilterResult.includedIf(shouldRun(descriptor), () -> descriptor.getDisplayName() + " matches", () -> descriptor.getDisplayName() + " doesn't match"); } pri... | createMethodFilter |
16,035 | FilterResult (TestDescriptor descriptor) { return FilterResult.includedIf(shouldRun(descriptor), () -> descriptor.getDisplayName() + " matches", () -> descriptor.getDisplayName() + " doesn't match"); } | apply |
16,036 | boolean (TestDescriptor descriptor) { TestSource source = descriptor.getSource().orElse(null); if (source instanceof MethodSource) { for (DiscoverySelector selector : selectors) { if (selector instanceof MethodSelector && ((MethodSelector)selector).getMethodName().equals(((MethodSource)source).getMethodName()) && (((Me... | shouldRun |
16,037 | boolean (MethodSource source, DiscoverySelector selector) { return selector instanceof NestedClassSelector && ((NestedClassSelector)selector).getNestedClassName().equals(source.getClassName()); } | inNestedClass |
16,038 | DiscoverySelector (String line, String[] packageNameRef) { if (line.startsWith("\u001B")) { String uniqueId = line.substring("\u001B".length()); return DiscoverySelectors.selectUniqueId(uniqueId); } else if (line.startsWith("\u002B")) { String directory = line.substring("\u002B".length()); List<ClasspathRootSelector> s... | createSelector |
16,039 | DiscoverySelector (String line) { int nestedClassIdx = line.lastIndexOf("$"); if (nestedClassIdx > 0) { AtomicReference<DiscoverySelector> nestedClassSelector = new AtomicReference<>(); ReflectionSupport.tryToLoadClass(line).ifFailure(__ -> { nestedClassSelector.set(getNestedSelector(line, nestedClassIdx)); }); if (nes... | createClassSelector |
16,040 | DiscoverySelector (DiscoverySelector methodSelector, String param) { Integer index = null; if (param != null) { Matcher matcher = VALUE_SOURCE_PATTERN.matcher(param); if (matcher.find()) { String group = matcher.group(1); try { index = Integer.parseInt(group); } catch (NumberFormatException ignored) { } } } if (index !... | createMethodSelectIteration |
16,041 | NestedClassSelector (String line, int nestedClassIdx) { String enclosingClass = line.substring(0, nestedClassIdx); String nestedClassName = line.substring(nestedClassIdx + 1); DiscoverySelector enclosingClassSelector = createClassSelector(enclosingClass); Class<?> klass = enclosingClassSelector instanceof NestedClassSe... | getNestedSelector |
16,042 | void (ArrayList<String> listeners, int count) { myListeners = listeners; do { JUnit5TestExecutionListener currentListener = new JUnit5TestExecutionListener(); myExecutionListeners.add(currentListener); if (count > 2) { currentListener.initializeIdSuffix(count); } } while (--count > 0); myLauncher = LauncherFactory.crea... | createListeners |
16,043 | int (String[] args, String programParam, int count, boolean sendTree) { try { JUnit5TestExecutionListener listener = myExecutionListeners.get(0); listener.initializeIdSuffix(!sendTree); final String[] packageNameRef = new String[1]; final LauncherDiscoveryRequest discoveryRequest = JUnit5TestRunnerUtil.buildRequest(arg... | startRunnerWithArgs |
16,044 | TestIdentifier (String[] args, String name) { final LauncherDiscoveryRequest discoveryRequest = JUnit5TestRunnerUtil.buildRequest(args, new String[1], ""); myForkedTestPlan = LauncherFactory.create().discover(discoveryRequest); final Set<TestIdentifier> roots = myForkedTestPlan.getRoots(); if (roots.isEmpty()) return n... | getTestToStart |
16,045 | List<TestIdentifier> (TestIdentifier description) { if (description == FAKE_ROOT) { return myForkedTestPlan.getRoots() .stream() .flatMap(root -> myForkedTestPlan.getChildren(root).stream()) .collect(Collectors.toList()); } return new ArrayList<>(myForkedTestPlan.getChildren(description)); } | getChildTests |
16,046 | String (TestIdentifier child) { if (!myForkedTestPlan.getParent(child).isPresent()) { //if fork mode is "repeat", then the only child is the corresponding class child = myForkedTestPlan.getChildren(child).iterator().next(); } final TestIdentifier testIdentifier = child; final String className = JUnit5TestExecutionListe... | getStartDescription |
16,047 | String (TestIdentifier child) { return child.toString(); } | getTestClassName |
16,048 | void (TestIdentifier testIdentifier) { if (testIdentifier.isTest()) { final String className = JUnit5TestExecutionListener.getClassName(testIdentifier); final String methodName = JUnit5TestExecutionListener.getMethodName(testIdentifier); myJunitListener.testStarted(className, methodName); } } | executionStarted |
16,049 | void (TestIdentifier testIdentifier, TestExecutionResult testExecutionResult) { if (testIdentifier.isTest()) { final String className = JUnit5TestExecutionListener.getClassName(testIdentifier); final String methodName = JUnit5TestExecutionListener.getMethodName(testIdentifier); if (myJunitListener instanceof IDEAJUnitL... | executionFinished |
16,050 | boolean () { return mySuccessful; } | wasSuccessful |
16,051 | void (boolean forked) { if (forked && myIdSuffix.isEmpty()) { myIdSuffix = String.valueOf(System.currentTimeMillis()); } } | initializeIdSuffix |
16,052 | void (int i) { myIdSuffix = i + "th"; } | initializeIdSuffix |
16,053 | void (TestIdentifier testIdentifier, ReportEntry entry) { StringBuilder builder = new StringBuilder(); builder.append("timestamp = ").append(entry.getTimestamp()); entry.getKeyValuePairs().forEach((key, value) -> builder.append(", ").append(key).append(" = ").append(value)); builder.append("\n"); myPrintStream.println(... | reportingEntryPublished |
16,054 | void (TestPlan testPlan) { myTestPlan = testPlan; if (mySendTree) { for (TestIdentifier root : myTestPlan.getRoots()) { assert root.isContainer(); for (TestIdentifier testIdentifier : myTestPlan.getChildren(root)) { String legacyReportingName = testIdentifier.getLegacyReportingName(); if (legacyReportingName != null &&... | testPlanExecutionStarted |
16,055 | void (TestIdentifier root, HashSet<TestIdentifier> visited) { String idAndName = idAndName(root); if (root.isContainer()) { boolean skipContainer = shouldSkipContainer(root); if (!skipContainer) myPrintStream.println("##teamcity[suiteTreeStarted" + idAndName + " " + getLocationHint(root) + "]"); for (TestIdentifier chi... | sendTreeUnderRoot |
16,056 | void (TestIdentifier testIdentifier, String reason) { executionStarted (testIdentifier); executionFinished(testIdentifier, TestExecutionResult.Status.ABORTED, null, reason); } | executionSkipped |
16,057 | void (TestIdentifier testIdentifier) { if (testIdentifier.isTest()) { testStarted(testIdentifier); myCurrentTestStart = System.nanoTime(); } else if (!shouldSkipContainer(testIdentifier)) { myFinishCount = 0; myPrintStream.println("##teamcity[testSuiteStarted" + idAndName(testIdentifier) + getLocationHint(testIdentifie... | executionStarted |
16,058 | void (TestIdentifier testIdentifier, TestExecutionResult testExecutionResult) { TestExecutionResult.Status status = testExecutionResult.getStatus(); Throwable throwableOptional = testExecutionResult.getThrowable().orElse(null); executionFinished(testIdentifier, status, throwableOptional, null); mySuccessful &= TestExec... | executionFinished |
16,059 | void (TestIdentifier testIdentifier, TestExecutionResult.Status status, Throwable throwableOptional, String reason) { if (testIdentifier.isTest()) { long duration = getDuration(); if (status == TestExecutionResult.Status.FAILED) { testFailure(testIdentifier, MapSerializerUtil.TEST_FAILED, throwableOptional, duration, r... | executionFinished |
16,060 | boolean (TestIdentifier testIdentifier) { UniqueId id = UniqueId.parse(testIdentifier.getUniqueId()); List<UniqueId.Segment> segments = id.getSegments(); if (segments.isEmpty()) return false; UniqueId.Segment lastSegment = segments.get(segments.size() - 1); return lastSegment.getType().equals("engine") || myRootName !=... | shouldSkipContainer |
16,061 | long () { return (System.nanoTime() - myCurrentTestStart) / 1_000_000; } | getDuration |
16,062 | void (TestIdentifier testIdentifier) { myPrintStream.println("##teamcity[testStarted" + idAndName(testIdentifier) + " " + getLocationHint(testIdentifier) + "]"); } | testStarted |
16,063 | void (TestIdentifier testIdentifier, long duration) { myPrintStream.println("##teamcity[testFinished" + idAndName(testIdentifier) + (duration > 0 ? " duration='" + duration + "'" : "") + "]"); } | testFinished |
16,064 | void (TestIdentifier testIdentifier, String messageName, Throwable ex, long duration, String reason, boolean includeThrowable) { testFailure(testIdentifier.getDisplayName(), getId(testIdentifier), getParentId(testIdentifier), messageName, ex, duration, reason, includeThrowable); } | testFailure |
16,065 | void (String methodName, String id, String parentId, String messageName, Throwable ex, long duration, String reason, boolean includeThrowable) { Map<String, String> attrs = new LinkedHashMap<>(); attrs.put("name", methodName); attrs.put("id", id); attrs.put("nodeId", id); attrs.put("parentNodeId", parentId); if (durati... | testFailure |
16,066 | String (Throwable ex) { StringWriter stringWriter = new StringWriter(); PrintWriter writer = new PrintWriter(stringWriter); ex.printStackTrace(writer); return stringWriter.toString(); } | getTrace |
16,067 | void (String rootName) { myRootName = rootName; } | setRootName |
16,068 | void (String presentableName) { myPresentableName = presentableName; } | setPresentableName |
16,069 | String (TestIdentifier identifier) { return identifier.getUniqueId() + myIdSuffix; } | getId |
16,070 | String (TestIdentifier testIdentifier) { return " id='" + escapeName(getId(testIdentifier)) + "' name='" + escapeName(testIdentifier.getDisplayName()) + "' nodeId='" + escapeName(getId(testIdentifier)) + "' parentNodeId='" + escapeName(getParentId(testIdentifier)) + "'"; } | idAndName |
16,071 | String (TestIdentifier testIdentifier) { Optional<TestIdentifier> parent = myTestPlan.getParent(testIdentifier); return parent .map(identifier -> shouldSkipContainer(identifier) ? getParentId(identifier) : identifier.getUniqueId() + myIdSuffix) .orElse("0"); } | getParentId |
16,072 | String (TestIdentifier root) { return getLocationHint(root, myTestPlan.getParent(root).orElse(null)); } | getLocationHint |
16,073 | String (TestIdentifier root, TestIdentifier rootParent) { return root.getSource() .map(testSource -> getLocationHintValue(testSource, rootParent != null ? rootParent.getSource().orElse(null) : null)) .filter(maybeLocationHintValue -> !NO_LOCATION_HINT_VALUE.equals(maybeLocationHintValue)) .map(locationHintValue -> "loc... | getLocationHint |
16,074 | String (TestIdentifier root) { return root.getSource() .map(testSource -> { if (testSource instanceof MethodSource) { //noinspection SpellCheckingInspection return " metainfo='" + ((MethodSource)testSource).getMethodParameterTypes() + "'"; } if (testSource instanceof ClassSource) { //noinspection SpellCheckingInspectio... | getMetaInfo |
16,075 | String (TestSource testSource, TestSource parentSource) { if (testSource instanceof CompositeTestSource) { CompositeTestSource compositeTestSource = ((CompositeTestSource)testSource); for (TestSource sourceFromComposite : compositeTestSource.getSources()) { String locationHintValue = getLocationHintValue(sourceFromComp... | getLocationHintValue |
16,076 | String (String className, String maybeMethodName, boolean isTest) { String type = isTest ? "test" : "suite"; String methodName = maybeMethodName == null ? "" : "/" + maybeMethodName; String location = escapeName(className + methodName); return "java:" + type + "://" + location; } | javaLocation |
16,077 | String (String str) { return MapSerializerUtil.escapeStr(str, MapSerializerUtil.STD_ESCAPER); } | escapeName |
16,078 | String (TestIdentifier description) { return description.getSource().map(source -> { if (source instanceof MethodSource) { return ((MethodSource)source).getClassName(); } if (source instanceof ClassSource) { return ((ClassSource)source).getClassName(); } return null; }).orElse(null); } | getClassName |
16,079 | String (TestIdentifier testIdentifier) { return testIdentifier.getSource().map((source) -> { if (source instanceof MethodSource) { return ((MethodSource)source).getMethodName(); } return null; }).orElse(null); } | getMethodName |
16,080 | String (TestIdentifier testIdentifier) { return testIdentifier.getSource().map((source) -> { if (source instanceof MethodSource) { String parameterTypes = ((MethodSource)source).getMethodParameterTypes(); return ((MethodSource)source).getMethodName() + (parameterTypes != null ? "(" + parameterTypes + ")" : ""); } retur... | getMethodSignature |
16,081 | String () { return PluginPathManager.getPluginHomePath("rareJavaRefactorings") + "/testData/removemiddleman/"; } | getTestDataPath |
16,082 | void (final String conflict) { doTest(() -> { PsiClass aClass = myFixture.findClass("Test"); final PsiField field = aClass.findFieldByName("myField", false); final Set<PsiMethod> methods = DelegationUtils.getDelegatingMethodsForField(field); List<MemberInfo> infos = new ArrayList<>(); for (PsiMethod method : methods) {... | doTest |
16,083 | void () { doTest((String)null); } | testNoGetter |
16,084 | void () { doTest("foo() will be deleted. Hierarchy will be broken"); } | testSiblings |
16,085 | void () { doTest("foo() will be deleted. Hierarchy will be broken"); } | testInterface |
16,086 | void () { doTest("foo() will be deleted. Hierarchy will be broken"); } | testPresentGetter |
16,087 | void () { doTest("foo() will be deleted. Hierarchy will be broken"); } | testInterfaceDelegation |
16,088 | String () { return PluginPathManager.getPluginHomePath("rareJavaRefactorings") + "/testData/wrapReturnValue/"; } | getTestDataPath |
16,089 | void () { doTest(false); } | testSimple |
16,090 | void () { doTest(false); } | testGenerics |
16,091 | void () { doTest(true, "Existing class does not have getter for selected field"); } | testInconsistentWrapper |
16,092 | void () { doTest(true); } | testWrapper |
16,093 | void () { doTest(true); } | testStrip |
16,094 | void () { doTest(true, "Existing class does not have appropriate constructor"); } | testNoConstructor |
16,095 | void () { doTest(false, null, true); } | testInnerClass |
16,096 | void () { doTest(false, null, true); } | testHierarchy |
16,097 | void () { doTest(true, null, false); } | testAnonymous |
16,098 | void () { doTest(true, "Existing class does not have appropriate constructor", false); } | testWrongFieldAssignment |
16,099 | void () { doTest(true, null, false); } | testInferFieldType |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.