Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
18,800
WildcardQuery (String pattern) { return new WildcardQuery(new Term(SEARCH_TERM_CLASS_NAMES, "*/" + pattern.replaceAll("\\.", "/"))); }
getWildcardQuery
18,801
void (MavenToken token) { MavenServerUtil.checkToken(token); try { myEmbedder.release(token); } catch (Exception e) { throw wrapToSerializableRuntimeException(e); } }
release
18,802
void (IndexingContext ctx) { try { if (p.isCanceled()) throw new MavenProcessCanceledRuntimeException(); } catch (RemoteException e) { throw new RuntimeRemoteException(e); } }
scanningStarted
18,803
void (IndexingContext ctx, ScanningResult result) { try { if (p.isCanceled()) throw new MavenProcessCanceledRuntimeException(); } catch (RemoteException e) { throw new RuntimeRemoteException(e); } }
scanningFinished
18,804
void (ArtifactContext ac, Exception e) { }
artifactError
18,805
void (ArtifactContext ac) { try { if (p.isCanceled()) throw new MavenProcessCanceledRuntimeException(); ArtifactInfo info = ac.getArtifactInfo(); p.setText2(info.groupId + ":" + info.artifactId + ":" + info.version); } catch (RemoteException e) { throw new RuntimeRemoteException(e); } }
artifactDiscovered
18,806
void (ArtifactInfo ai, Document doc) { if (ai.packaging != null) { doc.add(FLD_PACKAGING_NOT_INDEXED.toField(ai.packaging)); } if ("maven-archetype".equals(ai.packaging) && ai.description != null) { doc.add(FLD_DESCRIPTION_NOT_INDEXED.toField(ai.description)); } }
updateDocument
18,807
Collection<IndexerField> () { return Arrays.asList(FLD_PACKAGING_NOT_INDEXED, FLD_DESCRIPTION_NOT_INDEXED); }
getIndexerFields
18,808
void (MavenServerSettings settings) { try { final Level rootLoggerLevel = toJavaUtilLoggingLevel(settings.getLoggingLevel()); Logger.getLogger("").setLevel(rootLoggerLevel); if (rootLoggerLevel.intValue() < Level.SEVERE.intValue()) { Logger.getLogger("org.apache.maven.wagon.providers.http.httpclient.wire").setLevel(Lev...
initLogging
18,809
Level (int level) { switch (level) { case MavenServerConsoleIndicator.LEVEL_DEBUG: return Level.ALL; case MavenServerConsoleIndicator.LEVEL_ERROR: return Level.SEVERE; case MavenServerConsoleIndicator.LEVEL_FATAL: return Level.SEVERE; case MavenServerConsoleIndicator.LEVEL_DISABLED: return Level.OFF; case MavenServerCo...
toJavaUtilLoggingLevel
18,810
List<ProjectBuildingResult> (@NotNull MavenExecutionRequest request, @NotNull Collection<File> files) { final ProjectBuilder builder = getComponent(ProjectBuilder.class); ModelInterpolator modelInterpolator = getComponent(ModelInterpolator.class); String savedLocalRepository = null; if (modelInterpolator instanceof Cus...
getProjectBuildingResults
18,811
void (ProjectBuilder builder, List<ProjectBuildingResult> buildingResults, ProjectBuildingRequest projectBuildingRequest, File pomFile) { try { ProjectBuildingResult build = builder.build(pomFile, projectBuildingRequest); buildingResults.add(build); } catch (ProjectBuildingException e) { Maven3ResolverUtil.handleProjec...
buildSinglePom
18,812
Maven3ExecutionResult (MavenProject project, List<Exception> exceptions, List<ResolutionListener> listeners, ArtifactRepository localRepository) { ArtifactResolutionRequest resolutionRequest = new ArtifactResolutionRequest(); resolutionRequest.setArtifactDependencies(project.getDependencyArtifacts()); resolutionRequest...
resolveMvn2CompatResult
18,813
void (MavenProject project, List<Exception> exceptions, List<ResolutionListener> listeners, ArtifactRepository localRepository, Collection<Maven3ExecutionResult> executionResults) { executionResults.add(resolveMvn2CompatResult(project, exceptions, listeners, localRepository)); }
addMvn2CompatResults
18,814
List<ArtifactRepository> (List<MavenRemoteRepository> repositories) { PlexusContainer container = getContainer(); List<ArtifactRepository> result = new ArrayList<>(); for (MavenRemoteRepository each : repositories) { try { ArtifactRepositoryFactory factory = getComponent(ArtifactRepositoryFactory.class); result.add(Pro...
map2ArtifactRepositories
18,815
String () { return MAVEN_VERSION; }
getMavenVersion
18,816
void (MavenExecutionRequest request, final Runnable runnable) { if (VersionComparatorUtil.compare(getMavenVersion(), "3.2.5") >= 0) { executeWithSessionScope(request, runnable); } else { executeWithMavenSessionLegacy(request, runnable); } }
executeWithMavenSession
18,817
void (MavenExecutionRequest request, Runnable runnable) { DefaultMaven maven = (DefaultMaven)getComponent(Maven.class); MavenSession mavenSession = createMavenSession(request, maven); LegacySupport legacySupport = getComponent(LegacySupport.class); MavenSession oldSession = legacySupport.getSession(); legacySupport.set...
executeWithMavenSessionLegacy
18,818
MavenSession (MavenExecutionRequest request, DefaultMaven maven) { RepositorySystemSession repositorySession = maven.newRepositorySession(request); request.getProjectBuildingRequest().setRepositorySession(repositorySession); return new MavenSession(getContainer(), repositorySession, request, new DefaultMavenExecutionRe...
createMavenSession
18,819
void (MavenSession mavenSession) { try { for (AbstractMavenLifecycleParticipant listener : getLifecycleParticipants(Collections.emptyList())) { listener.afterSessionStart(mavenSession); } } catch (MavenExecutionException e) { throw new RuntimeException(e); } }
notifyAfterSessionStart
18,820
void (MavenExecutionRequest request, Runnable runnable) { DefaultMaven maven = (DefaultMaven)getComponent(Maven.class); SessionScope sessionScope = getComponent(SessionScope.class); sessionScope.enter(); try { MavenSession mavenSession = createMavenSession(request, maven); sessionScope.seed(MavenSession.class, mavenSes...
executeWithSessionScope
18,821
MavenExecutionRequest (File file, List<String> activeProfiles, List<String> inactiveProfiles) { return createRequest(file, activeProfiles, inactiveProfiles, new Properties()); }
createRequest
18,822
void (String message, Throwable e) { MavenServerGlobals.getLogger().warn(new RuntimeException(message, e)); }
warn
18,823
ArrayList<MavenArchetype> (ArchetypeCatalog archetypeCatalog) { ArrayList<MavenArchetype> result = new ArrayList<>(archetypeCatalog.getArchetypes().size()); for (Archetype each : archetypeCatalog.getArchetypes()) { result.add(Maven3ModelConverter.convertArchetype(each)); } return result; }
getArchetypes
18,824
Collection<AbstractMavenLifecycleParticipant> (Collection<MavenProject> projects) { Collection<AbstractMavenLifecycleParticipant> lifecycleListeners = new LinkedHashSet<>(); ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader(); try { try { lifecycleListeners.addAll(getContainer().lookupList(...
getLifecycleParticipants
18,825
void (TransferEvent event) { checkCanceled(); }
transferInitiated
18,826
void () { try { if (myIndicator.isCanceled()) throw new MavenProcessCanceledRuntimeException(); } catch (RemoteException e) { throw new RuntimeRemoteException(e); } }
checkCanceled
18,827
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
18,828
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
18,829
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
18,830
void (TransferEvent event) { checkCanceled(); String resourceName = event.getResource().getName(); DownloadData data = myDownloads.remove(resourceName); if (data != null) { data.failed = true; updateProgress(resourceName, data); } }
transferError
18,831
void (String s) { checkCanceled(); }
debug
18,832
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
18,833
void (long downloaded, long total) { }
downloadProgress
18,834
int () { return System.identityHashCode(this); }
getId
18,835
MavenProject (int id) { Reference<RemoteNativeMaven3ProjectHolder> reference = myMap.get(id); RemoteNativeMaven3ProjectHolder result = reference == null ? null : reference.get(); if (result == null) { throw new RuntimeException("NativeMavenProjectHolder not found for id: " + id); } return result.myMavenProject; }
findProjectById
18,836
void (MavenServerConsoleIndicatorImpl wrappee) { myWrappee = wrappee; }
setWrappee
18,837
void (String string, Throwable throwable) { doPrint(MavenServerConsoleIndicator.LEVEL_DEBUG, string, throwable); }
debug
18,838
void (String string, Throwable throwable) { doPrint(MavenServerConsoleIndicator.LEVEL_INFO, string, throwable); }
info
18,839
void (String string, Throwable throwable) { doPrint(MavenServerConsoleIndicator.LEVEL_WARN, string, throwable); }
warn
18,840
void (String string, Throwable throwable) { doPrint(MavenServerConsoleIndicator.LEVEL_ERROR, string, throwable); }
error
18,841
void (String string, Throwable throwable) { doPrint(MavenServerConsoleIndicator.LEVEL_FATAL, string, throwable); }
fatalError
18,842
void (String message) { debug(message, null); }
debug
18,843
boolean () { return getThreshold() <= MavenServerConsoleIndicator.LEVEL_DEBUG; }
isDebugEnabled
18,844
void (String message) { info(message, null); }
info
18,845
boolean () { return getThreshold() <= MavenServerConsoleIndicator.LEVEL_INFO; }
isInfoEnabled
18,846
void (String message) { warn(message, null); }
warn
18,847
boolean () { return getThreshold() <= MavenServerConsoleIndicator.LEVEL_WARN; }
isWarnEnabled
18,848
void (String message) { error(message, null); }
error
18,849
boolean () { return getThreshold() <= MavenServerConsoleIndicator.LEVEL_ERROR; }
isErrorEnabled
18,850
void (String message) { fatalError(message, null); }
fatalError
18,851
boolean () { return getThreshold() <= MavenServerConsoleIndicator.LEVEL_FATAL; }
isFatalErrorEnabled
18,852
void (int threshold) { this.myThreshold = threshold; }
setThreshold
18,853
int () { return myThreshold; }
getThreshold
18,854
Logger (String s) { return null; }
getChildLogger
18,855
String () { return toString(); }
getName
18,856
boolean (Profile profile ) { return profile.getActivation() != null && profile.getActivation().getFile() != null; }
canDetectActivation
18,857
boolean (Profile profile ) { Activation activation = profile.getActivation(); ActivationFile actFile = activation.getFile(); if ( actFile != null ) { // check if the file exists, if it does then the profile will be active String fileString = actFile.getExists(); RegexBasedInterpolator interpolator = new RegexBasedInter...
isActive
18,858
boolean (String path) { return new File(path).exists() || new File(baseDir, path).exists(); }
fileExists
18,859
void (Logger logger ) { this.logger = logger; }
enableLogging
18,860
Settings (SettingsBuilder builder, MavenServerSettings settings, Properties systemProperties, Properties userProperties) { SettingsBuildingRequest settingsRequest = new DefaultSettingsBuildingRequest(); if (settings.getGlobalSettingsPath() != null) { settingsRequest.setGlobalSettingsFile(new File(settings.getGlobalSett...
buildSettings
18,861
void (List<ProjectBuildingResult> buildingResults, ProjectBuildingException e) { List<ProjectBuildingResult> results = e.getResults(); if (results != null && !results.isEmpty()) { buildingResults.addAll(results); } else { Throwable cause = e.getCause(); List<ModelProblem> problems = null; if (cause instanceof ModelBuil...
handleProjectBuildingException
18,862
String () { return myProjectId; }
getProjectId
18,863
File () { return myPomFile; }
getPomFile
18,864
MavenProject () { return myMavenProject; }
getProject
18,865
List<ModelProblem> () { return myProblems; }
getProblems
18,866
DependencyResolutionResult () { return myDependencyResolutionResult; }
getDependencyResolutionResult
18,867
List<ValueSource> (Model model, File projectDir, ProjectBuilderConfiguration config) { List<ValueSource> sources = super.createValueSources(model, projectDir, config); int firstMapIndex = -1; for (int i = 0; i < sources.size(); i++) { if (sources.get(i) instanceof MapBasedValueSource) { firstMapIndex = i; break; } } Ma...
createValueSources
18,868
String () { return myWrapee.getGroupId(); }
getGroupId
18,869
String () { return myWrapee.getArtifactId(); }
getArtifactId
18,870
String () { return myWrapee.getVersion(); }
getVersion
18,871
void (String version) { myWrapee.setVersion(version); }
setVersion
18,872
String () { return myWrapee.getScope(); }
getScope
18,873
String () { return myWrapee.getType(); }
getType
18,874
String () { return myWrapee.getClassifier(); }
getClassifier
18,875
boolean () { return myWrapee.hasClassifier(); }
hasClassifier
18,876
File () { update(); return myWrapee.getFile(); }
getFile
18,877
void () { if ("pom".equals(getType()) && isResolved()) { ensurePomFileExists(); } }
update
18,878
void () { File f = myWrapee.getFile(); if (f == null || f.exists()) return; isStub = true; ourCacheReadLock.lock(); try { f = ourStubCache.get(getId()); } finally { ourCacheReadLock.unlock(); } if (f != null) { myWrapee.setFile(f); return; } ourCacheWriteLock.lock(); try { f = ourStubCache.get(getId()); if (f != null) ...
ensurePomFileExists
18,879
void (File destination) { myWrapee.setFile(destination); }
setFile
18,880
boolean () { return isStub; }
isStub
18,881
String () { return myWrapee.getBaseVersion(); }
getBaseVersion
18,882
void (String baseVersion) { myWrapee.setBaseVersion(baseVersion); }
setBaseVersion
18,883
String () { try { return myWrapee.getId(); } catch (NullPointerException e) { if (e.getMessage() != null && e.getMessage().contains("version was null")) { VersionRange range = getVersionRange(); if (range != null) { setBaseVersion(range.toString()); return myWrapee.getId(); } } throw e; } }
getId
18,884
String () { return myWrapee.getDependencyConflictId(); }
getDependencyConflictId
18,885
void (ArtifactMetadata metadata) { myWrapee.addMetadata(metadata); }
addMetadata
18,886
Collection<ArtifactMetadata> () { return myWrapee.getMetadataList(); }
getMetadataList
18,887
void (ArtifactRepository remoteRepository) { myWrapee.setRepository(remoteRepository); }
setRepository
18,888
ArtifactRepository () { return myWrapee.getRepository(); }
getRepository
18,889
void (String version, ArtifactRepository localRepository) { myWrapee.updateVersion(version, localRepository); }
updateVersion
18,890
String () { return myWrapee.getDownloadUrl(); }
getDownloadUrl
18,891
void (String downloadUrl) { myWrapee.setDownloadUrl(downloadUrl); }
setDownloadUrl
18,892
ArtifactFilter () { return myWrapee.getDependencyFilter(); }
getDependencyFilter
18,893
void (ArtifactFilter artifactFilter) { myWrapee.setDependencyFilter(artifactFilter); }
setDependencyFilter
18,894
ArtifactHandler () { return myWrapee.getArtifactHandler(); }
getArtifactHandler
18,895
List<String> () { return myWrapee.getDependencyTrail(); }
getDependencyTrail
18,896
void (List<String> dependencyTrail) { myWrapee.setDependencyTrail(dependencyTrail); }
setDependencyTrail
18,897
void (String scope) { myWrapee.setScope(scope); }
setScope
18,898
VersionRange () { return myWrapee.getVersionRange(); }
getVersionRange
18,899
void (VersionRange newRange) { myWrapee.setVersionRange(newRange); }
setVersionRange