Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
2,800
String () { return String.valueOf(myRootIndex); }
getRootId
2,801
SourceFileFilter () { return myFilter; }
getFilter
2,802
DestinationInfo () { return myDestinationInfo; }
getDestinationInfo
2,803
int () { return myRootIndex; }
getRootIndex
2,804
String () { return getOutputPath(); }
toString
2,805
SourceFileFilter (SourceFileFilter baseFilter, FileFilter filter) { return filter == FileFilters.EVERYTHING ? baseFilter : new CompositeSourceFileFilter(baseFilter, filter); }
createCompositeFilter
2,806
String () { return myRoot.getPath(); }
getFullPath
2,807
void (PrintWriter out, PathRelativizerService relativizer) { super.writeConfiguration(out, relativizer); myCopyingHandler.writeConfiguration(out); }
writeConfiguration
2,808
boolean (@NotNull String fullFilePath) { return myFilter.accept(new File(fullFilePath)) && myBaseFilter.accept(fullFilePath); }
accept
2,809
void (String pathInJar, ArtifactRootDescriptor descriptor) { myContent.add(Pair.create(pathInJar, descriptor)); }
addContent
2,810
void (String pathInJar, JarInfo jarInfo) { myContent.add(Pair.create(pathInJar, jarInfo)); }
addJar
2,811
DestinationInfo () { return myDestination; }
getDestination
2,812
String () { return myDestination.getOutputPath(); }
getPresentableDestination
2,813
FileFilter () { return FileFilters.EVERYTHING; }
createFileFilter
2,814
void (final JarInfo jarInfo) { if (myJars.add(jarInfo)) { final DestinationInfo destination = jarInfo.getDestination(); if (destination instanceof JarDestinationInfo) { addJarWithDependencies(((JarDestinationInfo)destination).getJarInfo()); } for (Pair<String, Object> pair : jarInfo.getContent()) { if (pair.getSecond()...
addJarWithDependencies
2,815
Set<JarInfo> () { return myJars; }
getJars
2,816
Collection<JpsArtifact> (JpsModel model, boolean includeSynthetic) { List<JpsArtifact> artifacts = JpsArtifactService.getInstance().getArtifacts(model.getProject()); if (!includeSynthetic) { return artifacts; } return ContainerUtil.concat(artifacts, getSyntheticArtifacts(model)); }
getArtifacts
2,817
List<JpsArtifact> (final JpsModel model) { JpsElementCollection<JpsArtifact> artifactsCollection = model.getProject().getContainer().getChild(SYNTHETIC_ARTIFACTS); if (artifactsCollection == null) { List<JpsArtifact> artifactList = computeSyntheticArtifacts(model); artifactsCollection = model.getProject().getContainer(...
getSyntheticArtifacts
2,818
List<JpsArtifact> (JpsModel model) { List<JpsArtifact> artifacts = new ArrayList<>(); for (JpsSyntheticArtifactProvider provider : JpsServiceManager.getInstance().getExtensions(JpsSyntheticArtifactProvider.class)) { artifacts.addAll(provider.createArtifacts(model)); } return artifacts; }
computeSyntheticArtifacts
2,819
boolean (@NotNull JpsPackagingElement element, @NotNull Processor<? super JpsPackagingElement> processor) { return processPackagingElements(element, processor, new HashSet<>()); }
processPackagingElements
2,820
boolean (@NotNull JpsPackagingElement element, @NotNull Processor<? super JpsPackagingElement> processor, final Set<? super JpsPackagingElement> processed) { if (!processed.add(element)) { return false; } if (!processor.process(element)) { return false; } if (element instanceof JpsCompositePackagingElement) { for (JpsP...
processPackagingElements
2,821
boolean (String name) { return name.length() >= 4 && name.charAt(name.length() - 4) == '.' && StringUtil.endsWithIgnoreCase(name, "ar"); }
isArchiveName
2,822
Set<JpsModule> (final @NotNull Collection<? extends JpsArtifact> artifacts) { final Set<JpsModule> modules = new HashSet<>(); for (JpsArtifact artifact : artifacts) { processPackagingElements(artifact.getRootElement(), element -> { if (element instanceof JpsModuleOutputPackagingElement) { ContainerUtil.addIfNotNull(mod...
getModulesIncludedInArtifacts
2,823
List<JpsArtifact> () { if (mySortedArtifacts == null) { mySortedArtifacts = doGetSortedArtifacts(); } return mySortedArtifacts; }
getArtifactsSortedByInclusion
2,824
List<JpsArtifact> () { Graph<JpsArtifact> graph = createArtifactsGraph(); DFSTBuilder<JpsArtifact> builder = new DFSTBuilder<>(graph); List<JpsArtifact> names = new ArrayList<>(graph.getNodes()); names.sort(builder.comparator()); return names; }
doGetSortedArtifacts
2,825
Set<JpsArtifact> (@NotNull Collection<? extends JpsArtifact> artifacts) { Set<JpsArtifact> result = new HashSet<>(); for (JpsArtifact artifact : artifacts) { collectIncludedArtifacts(artifact, new HashSet<>(), result, true); } return result; }
addIncludedArtifacts
2,826
void (JpsArtifact artifact, final Set<? super JpsArtifact> processed, final Set<? super JpsArtifact> result, final boolean withOutputPathOnly) { if (!processed.add(artifact)) { return; } if (!withOutputPathOnly || !StringUtil.isEmpty(artifact.getOutputPath())) { result.add(artifact); } processIncludedArtifacts(artifact...
collectIncludedArtifacts
2,827
Graph<JpsArtifact> () { return GraphGenerator.generate(CachingSemiGraph.cache(new ArtifactsGraph(myModel))); }
createArtifactsGraph
2,828
void (JpsArtifact artifact, final Consumer<? super JpsArtifact> consumer) { JpsArtifactUtil.processPackagingElements(artifact.getRootElement(), element -> { if (element instanceof JpsArtifactOutputPackagingElement) { JpsArtifact included = ((JpsArtifactOutputPackagingElement)element).getArtifactReference().resolve(); i...
processIncludedArtifacts
2,829
Collection<JpsArtifact> () { return myArtifactNodes; }
getNodes
2,830
Iterator<JpsArtifact> (JpsArtifact artifact) { final Set<JpsArtifact> included = new LinkedHashSet<>(); processIncludedArtifacts(artifact, includedArtifact -> { if (myArtifactNodes.contains(includedArtifact)) { included.add(includedArtifact); } }); return included.iterator(); }
getIn
2,831
String (@NotNull String path) { while (path.length() != 0 && (path.charAt(0) == '/' || path.charAt(0) == File.separatorChar)) { path = path.substring(1); } return path; }
trimForwardSlashes
2,832
String (@NotNull String basePath, @NotNull String relativePath) { final boolean endsWithSlash = StringUtilRt.endsWithChar(basePath, '/') || StringUtilRt.endsWithChar(basePath, '\\'); final boolean startsWithSlash = StringUtil.startsWithChar(relativePath, '/') || StringUtil.startsWithChar(relativePath, '\\'); String tai...
appendToPath
2,833
void () { for (File file : myBuiltJars.values()) { FileUtil.delete(file); } }
deleteTemporaryJars
2,834
void () { for (Map.Entry<JarInfo, File> entry : myBuiltJars.entrySet()) { File fromFile = entry.getValue(); final JarInfo jarInfo = entry.getKey(); DestinationInfo destination = jarInfo.getDestination(); if (destination instanceof ExplodedDestinationInfo) { File toFile = new File(FileUtil.toSystemDependentName(destinat...
copyJars
2,835
Collection<JarInfo> () { return myJarsToBuild; }
getNodes
2,836
Iterator<JarInfo> (final JarInfo n) { Set<JarInfo> ins = new HashSet<>(); final DestinationInfo destination = n.getDestination(); if (destination instanceof JarDestinationInfo) { ins.add(((JarDestinationInfo)destination).getJarInfo()); } return ins.iterator(); }
getIn
2,837
void (StandardResourceBuilderEnabler enabler) { ourEnablers.add(enabler); }
registerEnabler
2,838
boolean (JpsModule module) { synchronized (ourEnablers) { for (StandardResourceBuilderEnabler enabler : ourEnablers) { if (!enabler.isResourceProcessingEnabled(module)) { return false; } } } return true; }
isResourceProcessingEnabled
2,839
void (CompileContext context, ResourceRootDescriptor rd, File file, BuildOutputConsumer outputConsumer) { final File outputRoot = rd.getTarget().getOutputDir(); if (outputRoot == null) { return; } final String sourceRootPath = FileUtil.toCanonicalPath(rd.getRootFile().getAbsolutePath()); final String relativePath = Fil...
copyResource
2,840
String () { return getBuilderName(); }
getPresentableName
2,841
void () { try { final String path = (String)myControllerClass.getMethod("capturePerformanceSnapshot").invoke(myController); String message = "CPU Snapshot captured: " + path; LOG.warn(message); System.err.println(message); myControllerClass.getMethod("stopCpuProfiling").invoke(myController); } catch (Throwable e) { e.p...
stopProfiling
2,842
void (Class<?> aClass, Set<String> result) { Path path = PathManager.getJarForClass(aClass); if (path == null) { return; } final String pathString = path.toString(); if (result.add(pathString) && pathString.endsWith("app.jar") && path.getFileName().toString().equals("app.jar")) { if (path.getParent().equals(Paths.get(P...
addToClassPath
2,843
void (Set<String> cp, @NotNull Class<?> @NotNull [] classes) { for (Class<?> aClass : classes) { addToClassPath(aClass, cp); } }
addToClassPath
2,844
Collection<String> () { // predictable order Set<String> cp = new LinkedHashSet<>(); addToClassPath(BuildMain.class, cp); addToClassPath(ExternalJavacProcess.class, cp); // intellij.platform.jps.build.javac.rt part addToClassPath(JavacReferenceCollector.class, cp); // jps-javac-extension library // intellij.platform.ut...
getBuildProcessApplicationClasspath
2,845
void (Collection<? super String> cp, boolean includeEcj) { if (includeEcj) { File file = EclipseCompilerTool.findEcjJarFile(); if (file != null) { cp.add(file.getAbsolutePath()); } } }
appendJavaCompilerClasspath
2,846
List<File> (String sdkHome, JavaCompilingTool compilingTool) { // Important! All dependencies must be java 6 compatible (the oldest supported javac to be launched) final Set<File> cp = new LinkedHashSet<>(); cp.add(getResourceFile(ExternalJavacProcess.class)); // self cp.add(getResourceFile(JavacReferenceCollector.clas...
getExternalJavacProcessClasspath
2,847
void (Consumer<? super String> paramConsumer) { for (String aPackage : REFLECTION_OPEN_PACKAGES) { paramConsumer.accept("--add-opens"); paramConsumer.accept(aPackage); } }
configureReflectionOpenPackages
2,848
List<String> () { String instrumentationUtilPath = getResourcePath(NotNullVerifyingInstrumenter.class); File instrumentationUtil = new File(instrumentationUtilPath); if (instrumentationUtil.isDirectory()) { //running from sources: load classes from .../out/production/intellij.java.compiler.instrumentationUtil.java8 ret...
getInstrumentationUtilRoots
2,849
BuildRootIndex () { return myBuildRootIndex; }
getBuildRootIndex
2,850
BuildTargetIndex () { return myBuildTargetIndex; }
getBuildTargetIndex
2,851
IgnoredFileIndex () { return myIgnoredFileIndex; }
getIgnoredFileIndex
2,852
BuildTargetsState () { return dataManager.getTargetsState(); }
getTargetsState
2,853
CompilerEncodingConfiguration () { return myEncodingConfiguration; }
getEncodingConfiguration
2,854
BuildLoggingManager () { return myLoggingManager; }
getLoggingManager
2,855
void () { boolean shouldClose; synchronized (this) { --myUseCounter; shouldClose = myUseCounter == 0; } if (shouldClose) { try { myProjectStamps.close(); } finally { try { dataManager.close(); } catch (IOException e) { e.printStackTrace(System.err); } } } }
release
2,856
ModuleExcludeIndex () { return myModuleExcludeIndex; }
getModuleExcludeIndex
2,857
JpsModel () { return myModel; }
getModel
2,858
JpsProject () { return myProject; }
getProject
2,859
ProjectStamps () { return myProjectStamps; }
getProjectStamps
2,860
void (String[] args) { try { final long processStart = System.nanoTime(); final String startMessage = "Build process started. Classpath: " + System.getProperty("java.class.path"); System.out.println(startMessage); LOG.info("=================================================="); LOG.info(startMessage); final String host ...
main
2,861
void (Channel channel) { channel.pipeline().addLast(new ProtobufVarint32FrameDecoder(), new ProtobufDecoder(CmdlineRemoteProto.Message.getDefaultInstance()), new ProtobufVarint32LengthFieldPrepender(), new ProtobufEncoder(), new MyMessageHandler(sessionId)); }
initChannel
2,862
void (BuildMessage msg) { data.addMessage(msg); }
processMessage
2,863
void (String host, int port, Throwable reason) { System.err.println("Error connecting to " + host + ":" + port + "; reason: " + (reason != null ? reason.getMessage() : "unknown")); if (reason != null) { reason.printStackTrace(System.err); } System.err.println("Exiting."); System.exit(-1); }
printErrorAndExit
2,864
void (final ChannelHandlerContext context, CmdlineRemoteProto.Message message) { final CmdlineRemoteProto.Message.Type type = message.getType(); final Channel channel = context.channel(); if (type == CmdlineRemoteProto.Message.Type.CONTROLLER_MESSAGE) { final CmdlineRemoteProto.Message.ControllerMessage controllerMessa...
channelRead0
2,865
void () { //noinspection finally try { ourEventLoopGroup.shutdownGracefully(0, 15, TimeUnit.SECONDS); } finally { System.exit(0); } }
run
2,866
void (@Nullable List<String> filePaths) { myFilePaths = filePaths != null? filePaths : Collections.emptyList(); }
setFilePaths
2,867
void (@Nullable Map<String, String> builderParams) { myBuilderParams = builderParams != null? builderParams : Collections.emptyMap(); }
setBuilderParams
2,868
void (boolean forceCleanCaches) { myForceCleanCaches = forceCleanCaches; }
setForceCleanCaches
2,869
void (Set<? extends BuildTargetType<?>> targetTypes, Set<BuildTarget<?>> targets, Set<? super BuildTargetType<?>> targetTypesToForceBuild, ProjectDescriptor descriptor) { //todo get rid of CompileContext parameter for BuildTargetIndex.getDependencies() and use it here TargetOutputIndex dummyIndex = new TargetOutputInde...
includeDependenciesToScope
2,870
boolean () { return SystemProperties.getBooleanProperty(GlobalOptions.COMPILE_PARALLEL_OPTION, false); }
isParallelBuildEnabled
2,871
boolean () { return isParallelBuildEnabled() && SystemProperties.getBooleanProperty(GlobalOptions.ALLOW_PARALLEL_AUTOMAKE_OPTION, true); }
isParallelBuildAutomakeEnabled
2,872
void () { if (!Boolean.parseBoolean(System.getProperty(GlobalOptions.USE_DEFAULT_FILE_LOGGING_OPTION, "true"))) { return; } try { String logDir = System.getProperty(GlobalOptions.LOG_DIR_OPTION, null); Path configFile = logDir == null ? Paths.get(LOG_CONFIG_FILE_NAME) : Paths.get(logDir, LOG_CONFIG_FILE_NAME); ensureLo...
initLoggers
2,873
InputStream () { return LogSetup.class.getResourceAsStream("/defaultLogConfig.properties"); }
readDefaultLogConfig
2,874
void (@Nullable BuildRunner runner) { this.runner = runner; }
setRunner
2,875
void (@Nullable ProjectDescriptor projectDescriptor) { this.projectDescriptor = projectDescriptor; }
setProjectDescriptor
2,876
long () { return fsEventOrdinal; }
getFsEventOrdinal
2,877
void (long fsEventOrdinal) { this.fsEventOrdinal = fsEventOrdinal; }
setFsEventOrdinal
2,878
List<BuildMessage> () { return loadMessages; }
getLoadMessages
2,879
void (BuildMessage msg) { loadMessages.add(msg); }
addMessage
2,880
boolean () { return hasWorkFlag; }
hasWorkToDo
2,881
void (boolean hasWorkFlag) { this.hasWorkFlag = hasWorkFlag; }
setHasHasWorkToDo
2,882
String () { return "PreloadedData(fsEventOrdinal=" + fsEventOrdinal + ", hasWorkFlag=" + hasWorkFlag + ")"; }
toString
2,883
void () { final LowMemoryWatcherManager memWatcher = new LowMemoryWatcherManager(SharedThreadPool.getInstance()); Throwable error = null; final Ref<Boolean> hasErrors = new Ref<>(false); final Ref<Boolean> doneSomething = new Ref<>(false); try { ProfilingHelper profilingHelper; try { Utils.ProfilingMode profilingMode =...
run
2,884
void (BuildMessage buildMessage) { final CmdlineRemoteProto.Message.BuilderMessage response; if (buildMessage instanceof FileGeneratedEvent) { final Collection<Pair<String, String>> paths = ((FileGeneratedEvent)buildMessage).getPaths(); response = !paths.isEmpty() ? CmdlineProtoUtil.createFileGeneratedEvent(paths) : nu...
processMessage
2,885
void () { LOG.info("FilePageCache stats: " + StorageLockContext.getStatistics().dumpInfoImportantForBuildProcess()); }
logStorageDiagnostic
2,886
boolean (List<TargetTypeBuildScope> scopes) { TargetTypeRegistry typeRegistry = null; for (TargetTypeBuildScope scope : scopes) { if (scope.getForceBuild()) { LOG.debug("Build scope forces compilation for targets of type " + scope.getTypeId()); return false; } final String typeId = scope.getTypeId(); if (isJavaModuleBu...
scopeContainsModulesOnlyForIncrementalMake
2,887
boolean (String typeId) { for (JavaModuleBuildTargetType moduleBuildTargetType : JavaModuleBuildTargetType.ALL_TYPES) { if (moduleBuildTargetType.getTypeId().equals(typeId)) { return true; } } return false; }
isJavaModuleBuildType
2,888
void (final BuildFSState fsState, File dataStorageRoot) { final boolean wasInterrupted = Thread.interrupted(); try { saveFsState(dataStorageRoot, fsState); final ProjectDescriptor pd = myProjectDescriptor; if (pd != null) { pd.release(); } } finally { if (wasInterrupted) { Thread.currentThread().interrupt(); } } }
saveData
2,889
void (final CmdlineRemoteProto.Message.ControllerMessage.FSEvent event) { myEventsProcessor.execute(() -> { try { applyFSEvent(myProjectDescriptor, event, true); myLastEventOrdinal.addAndGet(1); } catch (IOException e) { LOG.error(e); } }); }
processFSEvent
2,890
void (File dataStorageRoot, DataInputStream original, final long ordinal) { if (LOG.isDebugEnabled()) { LOG.debug("updateFsStateOnDisk, ordinal=" + ordinal); } final File file = new File(dataStorageRoot, FS_STATE_FILE); try { final BufferExposingByteArrayOutputStream bytes = new BufferExposingByteArrayOutputStream(); t...
updateFsStateOnDisk
2,891
void (File dataStorageRoot, BuildFSState state) { final ProjectDescriptor pd = myProjectDescriptor; final File file = new File(dataStorageRoot, FS_STATE_FILE); try { final BufferExposingByteArrayOutputStream bytes = new BufferExposingByteArrayOutputStream(); try (DataOutputStream out = new DataOutputStream(bytes)) { ou...
saveFsState
2,892
boolean (BuildFSState state, @Nullable ProjectDescriptor pd) { if (pd == null) { return true; // assuming the worst case } final BuildTargetIndex targetIndex = pd.getBuildTargetIndex(); for (JpsModule module : pd.getProject().getModules()) { for (ModuleBasedTarget<?> target : targetIndex.getModuleBasedTargets(module, B...
hasWorkToDo
2,893
boolean (CmdlineRemoteProto.Message.ControllerMessage.FSEvent event) { return event.getChangedPathsCount() != 0 || event.getDeletedPathsCount() != 0; }
containsChanges
2,894
void (final Throwable error, boolean hadBuildErrors, boolean doneSomething) { CmdlineRemoteProto.Message lastMessage = null; try { if (error instanceof CannotLoadJpsModelException) { String text = JpsBuildBundle.message("build.message.failed.to.load.project.configuration.0", StringUtil.decapitalize(error.getMessage()))...
finishBuild
2,895
void () { myCanceled = true; }
cancel
2,896
boolean () { return myCanceled; }
isCanceled
2,897
BuildType (CmdlineRemoteProto.Message.ControllerMessage.ParametersMessage.Type compileType) { switch (compileType) { case CLEAN: return BuildType.CLEAN; case BUILD: return BuildType.BUILD; case UP_TO_DATE_CHECK: return BuildType.UP_TO_DATE_CHECK; } return BuildType.BUILD; }
convertCompileType
2,898
void () { myProcessingEnabled.up(); }
startProcessing
2,899
void (@NotNull Runnable task) { myExecutorService.execute(task); }
execute