Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
22,700 | MavenProfileActivationFile (ActivationFile file) { return file == null ? null : new MavenProfileActivationFile(file.getExists(), file.getMissing()); } | convertFileActivation |
22,701 | MavenProfileActivationProperty (ActivationProperty property) { return property == null ? null : new MavenProfileActivationProperty(property.getName(), property.getValue()); } | convertPropertyActivation |
22,702 | boolean (String toStringResult, Object o) { String className = o.getClass().getName(); return (toStringResult.startsWith(className) && toStringResult.startsWith("@", className.length())); } | isNativeToString |
22,703 | boolean (Class clazz) { return clazz.isArray() || Collection.class.isAssignableFrom(clazz) || Map.class.isAssignableFrom(clazz) || Xpp3Dom.class.isAssignableFrom(clazz); } | shouldSkip |
22,704 | Model (MavenModel model) { Model result = new Model(); result.setArtifactId(model.getMavenId().getArtifactId()); result.setGroupId(model.getMavenId().getGroupId()); result.setVersion(model.getMavenId().getVersion()); result.setPackaging(model.getPackaging()); result.setName(model.getName()); if (model.getParent() != nu... | toNativeModel |
22,705 | List<Profile> (List<MavenProfile> profiles) { List<Profile> result = new ArrayList<Profile>(profiles.size()); for (MavenProfile each : profiles) { Profile p = new Profile(); p.setId(each.getId()); p.setSource(each.getSource()); p.setBuild(new Build()); p.setActivation(toNativeActivation(each.getActivation())); toNative... | toNativeProfiles |
22,706 | Activation (MavenProfileActivation activation) { if (activation == null) return null; Activation result = new Activation(); result.setActiveByDefault(activation.isActiveByDefault()); result.setJdk(activation.getJdk()); result.setOs(toNativeOsActivation(activation.getOs())); result.setFile(toNativeFileActivation(activat... | toNativeActivation |
22,707 | ActivationOS (MavenProfileActivationOS os) { if (os == null) return null; ActivationOS result = new ActivationOS(); result.setArch(os.getArch()); result.setFamily(os.getFamily()); result.setName(os.getName()); result.setVersion(os.getVersion()); return result; } | toNativeOsActivation |
22,708 | ActivationFile (MavenProfileActivationFile file) { if (file == null) return null; ActivationFile result = new ActivationFile(); result.setExists(file.getExists()); result.setMissing(file.getMissing()); return result; } | toNativeFileActivation |
22,709 | ActivationProperty (MavenProfileActivationProperty property) { if (property == null) return null; ActivationProperty result = new ActivationProperty(); result.setName(property.getName()); result.setValue(property.getValue()); return result; } | toNativePropertyActivation |
22,710 | void (MavenModelBase from, ModelBase to) { to.setModules(from.getModules()); to.setProperties(from.getProperties()); } | toNativeModelBase |
22,711 | void (MavenBuildBase from, BuildBase to) { to.setFinalName(from.getFinalName()); to.setDefaultGoal(from.getDefaultGoal()); to.setDirectory(from.getDirectory()); to.setFilters(from.getFilters()); to.setResources(toNativeResources(from.getResources())); to.setTestResources(toNativeResources(from.getTestResources())); } | toNativeBuildBase |
22,712 | List<Resource> (List<MavenResource> resources) { List<Resource> result = new ArrayList<Resource>(resources.size()); for (MavenResource each : resources) { Resource r = new Resource(); r.setDirectory(each.getDirectory()); r.setTargetPath(each.getTargetPath()); r.setFiltering(each.isFiltered()); r.setIncludes(each.getInc... | toNativeResources |
22,713 | Repository (MavenRemoteRepository r) { Repository result = new Repository(); result.setId(r.getId()); result.setName(r.getName()); result.setUrl(r.getUrl()); result.setLayout(r.getLayout() == null ? "default" : r.getLayout()); if (r.getReleasesPolicy() != null) result.setReleases(toNativePolicy(r.getReleasesPolicy()));... | toNativeRepository |
22,714 | RepositoryPolicy (MavenRemoteRepository.Policy policy) { RepositoryPolicy result = new RepositoryPolicy(); result.setEnabled(policy.isEnabled()); result.setUpdatePolicy(policy.getUpdatePolicy()); result.setChecksumPolicy(policy.getChecksumPolicy()); return result; } | toNativePolicy |
22,715 | List<MavenArtifact> (Collection<? extends Artifact> artifacts, Map<Artifact, MavenArtifact> nativeToConvertedMap, File localRepository) { if (artifacts == null) return new ArrayList<>(); Set<MavenArtifact> result = new LinkedHashSet<>(artifacts.size()); for (Artifact each : artifacts) { result.add(convertArtifact(each,... | convertArtifacts |
22,716 | MavenArtifact (Artifact artifact, Map<Artifact, MavenArtifact> nativeToConvertedMap, File localRepository) { MavenArtifact result = nativeToConvertedMap.get(artifact); if (result == null) { result = convertArtifact(artifact, localRepository); nativeToConvertedMap.put(artifact, result); } return result; } | convertArtifact |
22,717 | MavenArtifact (Artifact artifact, File localRepository) { return new MavenArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getBaseVersion(), artifact.getType(), artifact.getClassifier(), artifact.getScope(), artifact.isOptional(), convertExtension(artifact), artifact.getFile(), ... | convertArtifact |
22,718 | WorkspaceRepository () { return myRepository; } | getRepository |
22,719 | File (Artifact artifact) { MavenWorkspaceMap.Data resolved = myWorkspaceMap.findFileAndOriginalId(new MavenId(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion())); if (resolved == null) return null; return resolved.getFile(artifact.getExtension()); } | findArtifact |
22,720 | List<String> (Artifact artifact) { List<String> res = new ArrayList<>(); Set<MavenId> ids = myWorkspaceMap.getAvailableIdsForArtifactId(artifact.getArtifactId()); for (MavenId id : ids) { if (Objects.equals(id.getGroupId(), artifact.getGroupId())) { String version = id.getVersion(); if (version != null) { res.add(versi... | findVersions |
22,721 | void (ArtifactInfo ai, Document doc) { if (ai.getPackaging() != null) { doc.add(FLD_PACKAGING_NOT_INDEXED.toField(ai.getPackaging())); } if ("maven-archetype".equals(ai.getPackaging()) && ai.getDescription() != null) { doc.add(FLD_DESCRIPTION_NOT_INDEXED.toField(ai.getDescription())); } } | updateDocument |
22,722 | Collection<IndexerField> () { return Arrays.asList(FLD_PACKAGING_NOT_INDEXED, FLD_DESCRIPTION_NOT_INDEXED); } | getIndexerFields |
22,723 | int (MavenToken token) { MavenServerUtil.checkToken(token); synchronized (myContexts) { return myContexts.size(); } } | getIndexCount |
22,724 | void (MavenToken token) { MavenServerUtil.checkToken(token); try { synchronized (myContexts) { for (IndexingContext indexingContext : myContexts.values()) { indexingContext.close(false); } myContexts.clear(); } } catch (Exception e) { throw wrapToSerializableRuntimeException(e); } } | release |
22,725 | String (IndexingContext index) { File file = index.getRepository(); return file == null ? index.getRepositoryUrl() : file.getPath(); } | getRepositoryPathOrUrl |
22,726 | WildcardQuery (String pattern) { return new WildcardQuery(new Term(SEARCH_TERM_CLASS_NAMES, "*/" + pattern.replaceAll("\\.", "/"))); } | getWildcardQuery |
22,727 | void (IndexingContext ctx) { try { if (p.isCanceled()) throw new MavenProcessCanceledRuntimeException(); p.setText("Maven Indexing Started"); } catch (RemoteException e) { throw new RuntimeException(e); } } | scanningStarted |
22,728 | void (IndexingContext ctx, ScanningResult result) { try { if (p.isCanceled()) throw new MavenProcessCanceledRuntimeException(); p.setText("Maven Indexing Finished: " + result.getTotalFiles() + " was scanned"); } catch (RemoteException e) { throw new RuntimeException(e); } } | scanningFinished |
22,729 | void (ArtifactContext ac, Exception e) { } | artifactError |
22,730 | void (ArtifactContext ac) { try { if (p.isCanceled()) throw new MavenProcessCanceledRuntimeException(); if (scanned.incrementAndGet() % 100 == 0) { p.setText("Scanned " + scanned.get() + " artifacts..."); } } catch (RemoteException e) { throw new RuntimeException(e); } } | artifactDiscovered |
22,731 | Level (String level) { switch (level) { case "error": return Level.SEVERE; case "debug": return Level.ALL; default: return Level.INFO; } } | getLogLevel |
22,732 | MavenServerStatus (boolean clean) { MavenServerStatus result = new MavenServerStatus(); result.statusCollected = false; return result; } | getDebugStatus |
22,733 | void (TransferEvent event) { checkCanceled(); } | transferInitiated |
22,734 | void () { try { if (myIndicator.isCanceled()) throw new MavenProcessCanceledRuntimeException(); } catch (RemoteException e) { throw new RuntimeRemoteException(e); } } | checkCanceled |
22,735 | void (TransferEvent event) { checkCanceled(); String resourceName = event.getResource().getName(); DownloadData data = new DownloadData(event.getWagon().getRepository().getName(), event.getResource().getContentLength()); myDownloads.put(resourceName, data); updateProgress(resourceName, data); } | transferStarted |
22,736 | void (TransferEvent event, byte[] bytes, int i) { checkCanceled(); String resourceName = event.getResource().getName(); DownloadData data = myDownloads.get(resourceName); data.downloaded += i; updateProgress(resourceName, data); } | transferProgress |
22,737 | void (TransferEvent event) { MavenServerGlobals.getDownloadListener().artifactDownloaded(event.getLocalFile(), event.getResource().getName()); checkCanceled(); String resourceName = event.getResource().getName(); DownloadData data = myDownloads.remove(resourceName); data.finished = true; updateProgress(resourceName, da... | transferCompleted |
22,738 | void (TransferEvent event) { checkCanceled(); String resourceName = event.getResource().getName(); DownloadData data = myDownloads.remove(resourceName); if (data != null) { data.failed = true; updateProgress(resourceName, data); } } | transferError |
22,739 | void (String s) { checkCanceled(); } | debug |
22,740 | void (String resourceName, DownloadData data) { String prefix = ""; if (data.finished) { prefix = "Finished "; } if (data.failed) { prefix = "Failed "; } String sizeInfo; if (data.finished || data.failed || data.total <= 0) { sizeInfo = StringUtilRt.formatFileSize(data.downloaded); } else { sizeInfo = ((int)100f * data... | updateProgress |
22,741 | void (long downloaded, long total) { try { myIndicator.setFraction(((double)downloaded) / total); } catch (RemoteException e) { throw new RuntimeRemoteException(e); } } | downloadProgress |
22,742 | String () { return new File(PluginPathManager.getPluginHomePath("stream-debugger") + "/testData/" + getRelativeTestPath()).getAbsolutePath(); } | getTestDataPath |
22,743 | PsiElement () { final String name = File.separator + getTestName(false) + getFileExtension(); configureByFile(name); final PsiFile file = getFile(); final int offset = getEditor().getCaretModel().getCurrentCaret().getOffset(); final PsiElement elementAtCaret = DebuggerUtilsEx.findElementAt(file, offset); assertNotNull(... | configureAndGetElementAtCaret |
22,744 | StreamChainBuilder () { return myBuilder; } | getChainBuilder |
22,745 | List<StreamChain> () { return ApplicationManager.getApplication().runReadAction((Computable<List<StreamChain>>)() -> { final PsiElement elementAtCaret = configureAndGetElementAtCaret(); assertNotNull(elementAtCaret); final StreamChainBuilder builder = getChainBuilder(); assertTrue(builder.isChainExists(elementAtCaret))... | buildChains |
22,746 | String () { return ".java"; } | getFileExtension |
22,747 | OutputChecker () { return new OutputChecker(() -> getTestAppPath(), () -> getAppOutputPath()) { @Override protected String replaceAdditionalInOutput(String str) { return TraceExecutionTestCase.this.replaceAdditionalInOutput(super.replaceAdditionalInOutput(str)); } }; } | initOutputChecker |
22,748 | String (String str) { return TraceExecutionTestCase.this.replaceAdditionalInOutput(super.replaceAdditionalInOutput(str)); } | replaceAdditionalInOutput |
22,749 | String (@NotNull String str) { return str; } | replaceAdditionalInOutput |
22,750 | LibrarySupportProvider () { return DEFAULT_LIBRARY_SUPPORT_PROVIDER; } | getLibrarySupportProvider |
22,751 | String () { return new File(PluginPathManager.getPluginHomePath("stream-debugger") + "/testData/debug/").getAbsolutePath(); } | getTestAppPath |
22,752 | void (boolean isResultNull) { doTest(isResultNull, DEFAULT_CHAIN_SELECTOR); } | doTest |
22,753 | void (boolean isResultNull, @NotNull String className) { doTest(isResultNull, className, DEFAULT_CHAIN_SELECTOR); } | doTest |
22,754 | void (boolean isResultNull, @NotNull ChainSelector chainSelector) { final String className = getTestName(false); doTest(isResultNull, className, chainSelector); } | doTest |
22,755 | void (boolean isResultNull, @NotNull String className, @NotNull ChainSelector chainSelector) { try { doTestImpl(isResultNull, className, chainSelector); } catch (Exception e) { throw new AssertionError("exception thrown", e); } } | doTest |
22,756 | void () { if (completed.getAndSet(true)) { resume(); return; } try { sessionPausedImpl(); } catch (Throwable t) { println("Exception caught: " + t + ", " + t.getMessage(), ProcessOutputTypes.SYSTEM); //noinspection CallToPrintStackTrace t.printStackTrace(); resume(); } } | sessionPaused |
22,757 | void () { printContext(getDebugProcess().getDebuggerContext()); final StreamChain chain = ApplicationManager.getApplication().runReadAction((Computable<StreamChain>)() -> { final PsiElement elementAtBreakpoint = positionResolver.getNearestElementToBreakpoint(session); final List<StreamChain> chains = elementAtBreakpoin... | sessionPausedImpl |
22,758 | void (@NotNull TracingResult result, @NotNull EvaluationContextImpl context) { complete(chain, result, null, null); } | evaluated |
22,759 | void (@NotNull String traceExpression, @NotNull String message) { complete(chain, null, message, FailureReason.EVALUATION); } | evaluationFailed |
22,760 | void (@NotNull String traceExpression, @NotNull String message) { LOG.warn("[" + getTestName(false) + "] Compilation failed."); complete(chain, null, message, FailureReason.COMPILATION); } | compilationFailed |
22,761 | void (@Nullable StreamChain chain, @Nullable TracingResult result, @Nullable String error, @Nullable FailureReason errorReason) { try { if (error != null) { assertNotNull(errorReason); assertNotNull(chain); handleError(chain, error, errorReason); } else { assertNull(errorReason); handleSuccess(chain, result, isResultNu... | complete |
22,762 | void () { ApplicationManager.getApplication().invokeLater(session::resume); } | resume |
22,763 | DebuggerPositionResolver () { return myPositionResolver; } | getPositionResolver |
22,764 | TraceResultInterpreter () { return new TraceResultInterpreterImpl(getLibrarySupportProvider().getLibrarySupport().getInterpreterFactory()); } | getResultInterpreter |
22,765 | StreamChainBuilder () { return getLibrarySupportProvider().getChainBuilder(); } | getChainBuilder |
22,766 | TraceExpressionBuilder () { return getLibrarySupportProvider().getExpressionBuilder(getProject()); } | getExpressionBuilder |
22,767 | void (@NotNull StreamChain chain, @NotNull String error, @NotNull FailureReason reason) { fail(error); } | handleError |
22,768 | void (@Nullable StreamChain chain, @Nullable TracingResult result, boolean resultMustBeNull) { assertNotNull(chain); assertNotNull(result); println(chain.getText(), ProcessOutputTypes.SYSTEM); final TraceElement resultValue = result.getResult(); handleResultValue(resultValue.getValue(), resultMustBeNull); final List<Tr... | handleSuccess |
22,769 | void (@Nullable Value result, boolean mustBeNull) { if (mustBeNull) { assertNull(result); } else { assertNotNull(result); } } | handleResultValue |
22,770 | void (@NotNull List<TraceInfo> trace) { for (final TraceInfo info : trace) { final String name = info.getCall().getName(); println(name, ProcessOutputTypes.SYSTEM); print(" before: ", ProcessOutputTypes.SYSTEM); final Map<Integer, TraceElement> before = info.getValuesOrderBefore(); println(traceToString(before.values()... | handleTrace |
22,771 | void (@NotNull ResolvedTracingResult result) { final ResolvedStreamChain resolvedChain = result.getResolvedChain(); checkChain(resolvedChain); checkTracesIsCorrectInBothDirections(resolvedChain); final ResolvedStreamCall.Terminator terminator = resolvedChain.getTerminator(); resolvedChain.getIntermediateCalls().forEach... | handleResolvedTrace |
22,772 | void (@Nullable NextAwareState before, @Nullable PrevAwareState after) { assertFalse(before == null && after == null); final StreamCall call = before == null ? after.getPrevCall() : before.getNextCall(); assertNotNull(call); println("mappings for " + call.getName(), ProcessOutputTypes.SYSTEM); println(" direct:", Proce... | printBeforeAndAfterValues |
22,773 | void (@NotNull List<TraceElement> values, @NotNull Function<? super TraceElement, ? extends List<TraceElement>> mapper, @NotNull Direction direction) { if (values.isEmpty()) { println(" empty", ProcessOutputTypes.SYSTEM); } for (final TraceElement element : values) { final List<TraceElement> mappedValues = mapper.apply... | printMapping |
22,774 | void (@NotNull ResolvedStreamChain chain) { final List<ResolvedStreamCall.Intermediate> intermediates = chain.getIntermediateCalls(); final ResolvedStreamCall.Terminator terminator = chain.getTerminator(); if (intermediates.isEmpty()) { assertFalse(terminator.getStateBefore() instanceof PrevAwareState); } checkIntermed... | checkChain |
22,775 | void (@NotNull List<ResolvedStreamCall.Intermediate> intermediates) { for (int i = 0; i < intermediates.size() - 1; i++) { final ResolvedStreamCall.Intermediate prev = intermediates.get(i); final ResolvedStreamCall.Intermediate next = intermediates.get(i + 1); assertSame(prev.getStateAfter(), next.getStateBefore()); fi... | checkIntermediates |
22,776 | void (@NotNull ResolvedStreamChain resolvedChain) { for (final ResolvedStreamCall.Intermediate intermediate : resolvedChain.getIntermediateCalls()) { checkNeighborTraces(intermediate.getStateBefore(), intermediate.getStateAfter()); } final ResolvedStreamCall.Terminator terminator = resolvedChain.getTerminator(); final ... | checkTracesIsCorrectInBothDirections |
22,777 | void (@NotNull NextAwareState left, @NotNull PrevAwareState right) { final Set<TraceElement> leftValues = new HashSet<>(left.getTrace()); final Set<TraceElement> rightValues = new HashSet<>(right.getTrace()); checkThatMappingsIsCorrect(leftValues, rightValues, left::getNextValues, right::getPrevValues); checkThatMappin... | checkNeighborTraces |
22,778 | void (@NotNull Set<TraceElement> prev, @NotNull Set<TraceElement> next, @NotNull Function<? super TraceElement, ? extends List<TraceElement>> toNext, @NotNull Function<? super TraceElement, ? extends List<TraceElement>> toPrev) { for (final TraceElement leftElement : prev) { final List<TraceElement> mapToRight = toNext... | checkThatMappingsIsCorrect |
22,779 | String (@NotNull Collection<TraceElement> trace) { return replaceIfEmpty(StreamEx.of(trace).map(TraceElement::getTime).sorted().joining(",")); } | traceToString |
22,780 | String (@NotNull String str) { return str.isEmpty() ? "nothing" : str; } | replaceIfEmpty |
22,781 | ChainSelector (int index) { return chains -> chains.get(index); } | byIndex |
22,782 | void () { ApplicationManager.getApplication().runWriteAction(() -> { configureFromFileText("Main.java", """ import java.util.stream.Stream; public class Main { public static void main(String[] args) { <caret>Stream.of(1,2,3).map(x -> x * x ).filter(x -> x % 2 == 1).toArray(); } } """, true); final PsiFile file = getFil... | testPsiFileException |
22,783 | void (String[] args) { <caret>Stream.of(1,2,3).map(x -> x * x ).filter(x -> x % 2 == 1).toArray(); } | main |
22,784 | void () { doTest(); } | testCollectionStream |
22,785 | void () { doTest(); } | testCustomSource |
22,786 | void () { doTest(); } | testIntStreamRange |
22,787 | void () { doTest(); } | testIntStreamRangeClosed |
22,788 | void () { doTest(); } | testIterate |
22,789 | void () { doTest(); } | testConcat |
22,790 | void (@NotNull List<StreamChain> chains) { assertFalse(chains.isEmpty()); assertNotNull(chains.get(0).getQualifierExpression()); } | checkResultChains |
22,791 | String () { return "producer"; } | getDirectoryName |
22,792 | void () { doTest(JavaTypes.INSTANCE.getANY()); } | testSimpleObject |
22,793 | void () { doTest(JavaTypes.INSTANCE.getINT()); } | testSimpleInt |
22,794 | void () { doTest(JavaTypes.INSTANCE.getDOUBLE()); } | testSimpleDouble |
22,795 | void () { doTest(JavaTypes.INSTANCE.getLONG()); } | testSimpleLong |
22,796 | void () { doTest(JavaTypes.INSTANCE.getANY(), JavaTypes.INSTANCE.getINT()); } | testObj2Int |
22,797 | void () { doTest(JavaTypes.INSTANCE.getANY(), JavaTypes.INSTANCE.getLONG()); } | testObj2Long |
22,798 | void () { doTest(JavaTypes.INSTANCE.getANY(), JavaTypes.INSTANCE.getDOUBLE()); } | testObj2Double |
22,799 | void () { doTest(JavaTypes.INSTANCE.getINT(), JavaTypes.INSTANCE.getINT()); } | testPrimitiveIdentity |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.