Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
2,300 | boolean (final File file, final Collection<? super String> deletedPaths) { try { Files.walkFileTree(file.toPath(), EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(Path f, BasicFileAttributes attrs) throws IOException { try { Files.d... | deleteRecursively |
2,301 | void (String builderName) { myCurrentBuilderName = builderName; } | setCurrentBuilderName |
2,302 | Collection<CompiledClass> (@NotNull BuildTarget<?> target) { final Collection<CompiledClass> classes = myTargetToClassesMap.get(target); if (classes != null) { return Collections.unmodifiableCollection(classes); } return Collections.emptyList(); } | getTargetCompiledClasses |
2,303 | void () { for (BuildOutputConsumerImpl consumer : myTarget2Consumer.values()) { consumer.fireFileGeneratedEvent(); } } | fireFileGeneratedEvents |
2,304 | int () { int total = 0; for (BuildOutputConsumerImpl consumer : myTarget2Consumer.values()) { total += consumer.getNumberOfProcessedSources(); } return total; } | getNumberOfProcessedSources |
2,305 | void () { myTarget2Consumer.clear(); myClasses.clear(); myTargetToClassesMap.clear(); myOutputToBuilderNameMap.clear(); } | clear |
2,306 | void (@NotNull PreloadedData data) { final ProjectDescriptor pd = data.getProjectDescriptor(); if (pd != null) { myTask = IncProjectBuilder.startTempDirectoryCleanupTask(pd); } } | preloadData |
2,307 | void (@NotNull PreloadedData data) { } | buildSessionInitialized |
2,308 | void (PreloadedData data) { } | discardPreloadedData |
2,309 | BuilderCategory () { return myCategory; } | getCategory |
2,310 | void (CompileContext context, ModuleChunk chunk) { } | chunkBuildStarted |
2,311 | void (CompileContext context, ModuleChunk chunk) { } | chunkBuildFinished |
2,312 | long () { //temporary workaround until this method is overridden in Kotlin plugin if (getClass().getName().equals("org.jetbrains.kotlin.jps.build.KotlinBuilder")) { return 100; } return super.getExpectedBuildTime(); } | getExpectedBuildTime |
2,313 | Collection<File> (@NotNull CompileContext context) { Collection<File> result = new SmartList<>(); final File outputDir = getOutputDir(); if (outputDir != null) { result.add(outputDir); } final JpsModule module = getModule(); final JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCom... | getOutputRoots |
2,314 | boolean () { return myTargetType.isTests(); } | isTests |
2,315 | List<JavaSourceRootDescriptor> (@NotNull JpsModel model, @NotNull ModuleExcludeIndex index, @NotNull IgnoredFileIndex ignoredFileIndex, @NotNull BuildDataPaths dataPaths) { List<JavaSourceRootDescriptor> roots = new ArrayList<>(); JavaSourceRootType type = isTests() ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType... | computeRootDescriptors |
2,316 | String () { return "Module '" + getModule().getName() + "' " + (myTargetType.isTests() ? "tests" : "production"); } | getPresentableName |
2,317 | void (@NotNull ProjectDescriptor pd, @NotNull PrintWriter out) { final JpsModule module = getModule(); final PathRelativizerService relativizer = pd.dataManager.getRelativizer(); final StringBuilder logBuilder = LOG.isDebugEnabled() ? new StringBuilder() : null; int fingerprint = getDependenciesFingerprint(logBuilder, ... | writeConfiguration |
2,318 | int (@Nullable StringBuilder logBuilder, @NotNull PathRelativizerService relativizer) { int fingerprint = 0; if (!REBUILD_ON_DEPENDENCY_CHANGE) { return fingerprint; } final JpsModule module = getModule(); JpsJavaDependenciesEnumerator enumerator = JpsJavaExtensionService.dependencies(module).compileOnly().recursivelyE... | getDependenciesFingerprint |
2,319 | int (@NotNull String path) { // On case-insensitive OS hash calculated from path converted to lower case if (ProjectStamps.PORTABLE_CACHES) { return StringUtil.isEmpty(path) ? 0 : FileUtil.toCanonicalPath(path).hashCode(); } return FileUtil.pathHashCode(path); } | pathHashCode |
2,320 | BuilderRegistry () { return Holder.ourInstance; } | getInstance |
2,321 | FileFilter () { return myModuleBuilderFileFilter; } | getModuleBuilderFileFilter |
2,322 | int () { int count = 0; for (BuilderCategory category : BuilderCategory.values()) { count += getBuilders(category).size(); } return count; } | getModuleLevelBuilderCount |
2,323 | List<BuildTask> () { return Collections.emptyList(); // todo } | getBeforeTasks |
2,324 | List<BuildTask> () { return Collections.emptyList(); // todo } | getAfterTasks |
2,325 | List<ModuleLevelBuilder> (BuilderCategory category) { return Collections.unmodifiableList(myModuleLevelBuilders.get(category)); } | getBuilders |
2,326 | List<ModuleLevelBuilder> () { List<ModuleLevelBuilder> result = new ArrayList<>(); for (BuilderCategory category : BuilderCategory.values()) { result.addAll(getBuilders(category)); } return result; } | getModuleLevelBuilders |
2,327 | long (BuildTargetType<?> targetType) { //it may happen that there is no builders registered for a given type, so it won't be built at all. return myExpectedBuildTime.getLong(targetType); } | getExpectedBuildTimeForTarget |
2,328 | boolean (CompileContext context, final CompilationRound round, final File file) { final JavaSourceRootDescriptor rd = context.getProjectDescriptor().getBuildRootIndex().findJavaRootDescriptor(context, file); if (rd != null) { final ProjectDescriptor pd = context.getProjectDescriptor(); return pd.fsState.isMarkedForReco... | isMarkedDirty |
2,329 | boolean () { return !dirtyFiles.isEmpty(); } | hasDirtyFiles |
2,330 | boolean () { return false; } | hasRemovedFiles |
2,331 | Collection<String> (@NotNull T target) { return Collections.emptyList(); } | getRemovedFiles |
2,332 | Set<JpsModule> (final JpsModule module, final JpsJavaClasspathKind kind) { return JpsJavaExtensionService.dependencies(module).includedIn(kind).recursivelyExportedOnly().getModules(); } | getDependentModulesRecursively |
2,333 | FileVisitResult (Path dir, BasicFileAttributes attrs) { return dirFilter.accept(dir.toFile())? FileVisitResult.CONTINUE : FileVisitResult.SKIP_SUBTREE; } | preVisitDirectory |
2,334 | void (CompileContext context, final @Nullable Set<File> dirsToDelete) { if (dirsToDelete == null || dirsToDelete.isEmpty()) { return; } Set<File> doNotDelete = ALL_OUTPUTS_KEY.get(context); if (doNotDelete == null) { doNotDelete = FileCollectionFactory.createCanonicalFileSet(); for (BuildTarget<?> target : context.getP... | pruneEmptyDirs |
2,335 | boolean (CompileContext context, ModuleChunk chunk) { synchronized (TARGETS_COMPLETELY_MARKED_DIRTY) { Set<BuildTarget<?>> marked = TARGETS_COMPLETELY_MARKED_DIRTY.get(context); return marked != null && marked.containsAll(chunk.getTargets()); } } | isMarkedDirty |
2,336 | long (File file) { return lastModified(file.toPath()); } | lastModified |
2,337 | long (Path path) { try { return Files.getLastModifiedTime(path).toMillis(); } catch (NoSuchFileException ignored) { } catch (IOException e) { LOG.warn(e); } return 0L; } | lastModified |
2,338 | boolean (CompileContext context, BuildTarget<?> target) { synchronized (TARGETS_COMPLETELY_MARKED_DIRTY) { Set<BuildTarget<?>> marked = TARGETS_COMPLETELY_MARKED_DIRTY.get(context); return marked != null && marked.contains(target); } } | isMarkedDirty |
2,339 | void (CompileContext context, BuildTarget<?> target) { synchronized (TARGETS_COMPLETELY_MARKED_DIRTY) { Set<BuildTarget<?>> marked = TARGETS_COMPLETELY_MARKED_DIRTY.get(context); if (marked == null) { marked = new HashSet<>(); TARGETS_COMPLETELY_MARKED_DIRTY.set(context, marked); } marked.add(target); } } | addCompletelyMarkedDirtyTarget |
2,340 | void (CompileContext context, Set<ModuleBuildTarget> targetsSetToFilter) { synchronized (TARGETS_COMPLETELY_MARKED_DIRTY) { Set<BuildTarget<?>> marked = TARGETS_COMPLETELY_MARKED_DIRTY.get(context); if (marked != null) { targetsSetToFilter.removeAll(marked); } } } | removeTargetsAlreadyMarkedDirty |
2,341 | Collection<File> (@NotNull CompileContext context) { return ContainerUtil.createMaybeSingletonList(getOutputDir()); } | getOutputRoots |
2,342 | boolean () { return myTargetType.isTests(); } | isTests |
2,343 | boolean () { return true; } | isCompiledBeforeModuleLevelBuilders |
2,344 | List<ResourceRootDescriptor> (@NotNull JpsModel model, @NotNull ModuleExcludeIndex index, @NotNull IgnoredFileIndex ignoredFileIndex, @NotNull BuildDataPaths dataPaths) { List<ResourceRootDescriptor> roots = new ArrayList<>(); JavaSourceRootType type = isTests() ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOU... | computeRootDescriptors |
2,345 | boolean (Iterable<ExcludedJavaSourceRootProvider> excludedRootProviders, JpsModuleSourceRoot sourceRoot) { for (ExcludedJavaSourceRootProvider provider : excludedRootProviders) { if (provider.isExcludedFromCompilation(myModule, sourceRoot)) { return true; } } return false; } | isExcludedFromCompilation |
2,346 | String () { return "Resources for '" + getModule().getName() + "' " + (myTargetType.isTests() ? "tests" : "production"); } | getPresentableName |
2,347 | void (@NotNull ProjectDescriptor pd, @NotNull PrintWriter out) { int fingerprint = 0; final BuildRootIndex rootIndex = pd.getBuildRootIndex(); final PathRelativizerService relativizer = pd.dataManager.getRelativizer(); final List<ResourceRootDescriptor> roots = rootIndex.getTargetRoots(this, null); for (ResourceRootDes... | writeConfiguration |
2,348 | int (@Nullable String path) { // On case insensitive OS hash calculated from path converted to lower case if (ProjectStamps.PORTABLE_CACHES) { return StringUtil.isEmpty(path) ? 0 : FileUtil.toCanonicalPath(path).hashCode(); } return FileUtil.pathHashCode(path); } | pathHashCode |
2,349 | CompileContext (@NotNull CompileScope scope, @NotNull ProjectDescriptor descriptor) { return new CompileContextImpl(scope, descriptor, DEAF, Collections.emptyMap(), CanceledStatus.NULL); } | createContextForTests |
2,350 | long (BuildTarget<?> target) { synchronized (myCompilationStartStamp) { return myCompilationStartStamp.getLong(target); } } | getCompilationStartStamp |
2,351 | void (@NotNull Collection<? extends BuildTarget<?>> targets, long stamp) { synchronized (myCompilationStartStamp) { for (BuildTarget<?> target : targets) { myCompilationStartStamp.put(target, stamp); } } } | setCompilationStartStamp |
2,352 | boolean () { return JavaBuilderUtil.isCompileJavaIncrementally(this); } | isMake |
2,353 | boolean () { return JavaBuilderUtil.isForcedRecompilationAllJavaModules(this); } | isProjectRebuild |
2,354 | BuildLoggingManager () { return myProjectDescriptor.getLoggingManager(); } | getLoggingManager |
2,355 | void (@NotNull BuildListener listener) { myListeners.addListener(listener); } | addBuildListener |
2,356 | void (@NotNull BuildListener listener) { myListeners.removeListener(listener); } | removeBuildListener |
2,357 | void (@NotNull ModuleBuildTarget target) { if (!target.isTests()) { myNonIncrementalModules.add(new ModuleBuildTarget(target.getModule(), JavaModuleBuildTargetType.TEST)); } myNonIncrementalModules.add(target); } | markNonIncremental |
2,358 | boolean (@NotNull ModuleChunk chunk) { if (myNonIncrementalModules.isEmpty()) { return true; } for (ModuleBuildTarget target : chunk.getTargets()) { if (myNonIncrementalModules.contains(target)) { return false; } } return true; } | shouldDifferentiate |
2,359 | CanceledStatus () { return myCancelStatus; } | getCancelStatus |
2,360 | void (@NotNull ModuleBuildTarget target) { myNonIncrementalModules.remove(target); } | clearNonIncrementalMark |
2,361 | CompileScope () { return myScope; } | getScope |
2,362 | void (BuildMessage msg) { if (msg.getKind() == BuildMessage.Kind.ERROR) { Utils.ERRORS_DETECTED_KEY.set(this, Boolean.TRUE); } if (msg instanceof ProgressMessage) { ((ProgressMessage)msg).setDone(myDone); } myDelegateMessageHandler.processMessage(msg); if (msg instanceof FileGeneratedEvent) { myListeners.getMulticaster... | processMessage |
2,363 | void (float done) { myDone = done; } | setDone |
2,364 | ProjectDescriptor () { return myProjectDescriptor; } | getProjectDescriptor |
2,365 | void (BuildMessage msg) { for (MessageHandler h : myMessageHandlers) { h.processMessage(msg); } } | processMessage |
2,366 | void (MessageHandler handler) { myMessageHandlers.add(handler); } | addMessageHandler |
2,367 | void (@NotNull CompileScope scope) { CompileContextImpl context = null; try { context = createContext(scope); final BuildFSState fsState = myProjectDescriptor.fsState; for (BuildTarget<?> target : myProjectDescriptor.getBuildTargetIndex().getAllTargets()) { context.checkCanceled(); if (scope.isAffected(target)) { Build... | checkUpToDate |
2,368 | boolean (BuildTarget<?> target) { // optimization, since we know here that all targets of types JavaModuleBuildTargetType are affected return allTargetsAffected.contains(target.getTargetType()) || scope.isAffected(target); } | test |
2,369 | long (@NotNull ProjectDescriptor projectDescriptor, @NotNull Predicate<BuildTarget<?>> isAffected) { final BuildTargetsState targetsState = projectDescriptor.getTargetsState(); // compute estimated times for dirty targets long estimatedBuildTime = 0L; final BuildTargetIndex targetIndex = projectDescriptor.getBuildTarge... | calculateEstimatedBuildTime |
2,370 | void (@NotNull CanceledStatus status, Future<?> task) { try { while (true) { try { task.get(500L, TimeUnit.MILLISECONDS); break; } catch (TimeoutException ignored) { if (status.isCanceled()) { break; } } } } catch (Throwable th) { LOG.info(th); } } | waitForTask |
2,371 | void (CompileContextImpl context) { final Set<JpsModule> modules = BuildTargetConfiguration.MODULES_WITH_TARGET_CONFIG_CHANGED_KEY.get(context); if (modules == null || modules.isEmpty()) { return; } int shown = modules.size() == 6 ? 6 : Math.min(5, modules.size()); String modulesText = modules.stream().limit(shown).map... | reportRebuiltModules |
2,372 | void (CompileContextImpl context) { final ProjectDescriptor pd = context.getProjectDescriptor(); final BuildFSState fsState = pd.fsState; for (BuildTarget<?> target : pd.getBuildTargetIndex().getAllTargets()) { if (fsState.hasUnprocessedChanges(context, target)) { context.processMessage(new UnprocessedFSChangesNotifica... | reportUnprocessedChanges |
2,373 | void (CompileContext context) { if (context != null) { final ProjectDescriptor pd = context.getProjectDescriptor(); pd.getProjectStamps().getStampStorage().force(); pd.dataManager.flush(false); } final ExternalJavacManager server = ExternalJavacManager.KEY.get(context); if (server != null) { server.stop(); ExternalJava... | flushContext |
2,374 | boolean () { return Boolean.parseBoolean(myBuilderParams.get(BuildParametersKeys.IS_AUTOMAKE)); } | isAutoBuild |
2,375 | boolean () { return isAutoBuild() ? BuildRunner.isParallelBuildAutomakeEnabled() : BuildRunner.isParallelBuildEnabled(); } | isParallelBuild |
2,376 | void (@NotNull FileGeneratedEvent event) { Collection<Pair<String, String>> paths = event.getPaths(); FileSystem fs = FileSystems.getDefault(); if (paths.size() == 1) { deleteFiles(paths.iterator().next().first, fs); return; } Set<String> outputs = new HashSet<>(); for (Pair<String, String> pair : paths) { String root ... | filesGenerated |
2,377 | void (String rootPath, FileSystem fs) { Path root = fs.getPath(rootPath); try { Files.deleteIfExists(root.resolve(CLASSPATH_INDEX_FILE_NAME)); Files.deleteIfExists(root.resolve(UNMODIFIED_MARK_FILE_NAME)); } catch (IOException ignore) { } } | deleteFiles |
2,378 | void (CompileContext context) { myElapsedTimeNanosByBuilder.entrySet() .stream() .map(entry -> { AtomicInteger processedSourcesRef = myNumberOfSourcesProcessedByBuilder.get(entry.getKey()); int processedSources = processedSourcesRef != null ? processedSourcesRef.get() : 0; return new BuilderStatisticsMessage(entry.getK... | sendElapsedTimeMessages |
2,379 | CompileContextImpl (@NotNull CompileScope scope) { return new CompileContextImpl(scope, myProjectDescriptor, myMessageDispatcher, myBuilderParams, myCancelStatus); } | createContext |
2,380 | void (BuildTargetType<?> type, CompileContext context) { List<Pair<String, Integer>> targetIds = myProjectDescriptor.dataManager.getTargetsState().getStaleTargetIds(type); if (targetIds.isEmpty()) return; context.processMessage(new ProgressMessage(JpsBuildBundle.message("progress.message.cleaning.old.output.directories... | cleanOutputOfStaleTargets |
2,381 | void (CompileContext context, Collection<? extends BuildTarget<?>> targets) { synchronized (TARGET_WITH_CLEARED_OUTPUT) { Set<BuildTarget<?>> data = context.getUserData(TARGET_WITH_CLEARED_OUTPUT); if (data == null) { data = new HashSet<>(); context.putUserData(TARGET_WITH_CLEARED_OUTPUT, data); } data.addAll(targets);... | registerTargetsWithClearedOutput |
2,382 | boolean (CompileContext context, BuildTarget<?> target) { synchronized (TARGET_WITH_CLEARED_OUTPUT) { Set<BuildTarget<?>> data = context.getUserData(TARGET_WITH_CLEARED_OUTPUT); return data != null && data.contains(target); } } | isTargetOutputCleared |
2,383 | boolean (File outputRoot) { final String[] files = outputRoot.list(); return files == null || files.length == 0; } | isEmpty |
2,384 | void (CompileContext context, BuildTarget<?> target) { try { clearOutputFiles(context, target); } catch (Throwable e) { LOG.info(e); String reason = e.getMessage(); if (reason == null) { reason = e.getClass().getName(); } context.processMessage(new CompilerMessage("", BuildMessage.Kind.WARNING, JpsBuildBundle .message(... | clearOutputFilesUninterruptibly |
2,385 | int () { return myDepsScore + mySelfScore; } | getScore |
2,386 | BuildTargetChunk () { return myChunk; } | getChunk |
2,387 | boolean () { return myNotBuildDependenciesCount.get() == 0; } | isReady |
2,388 | void (BuildChunkTask dependency) { if (myNotBuiltDependencies.add(dependency)) { myNotBuildDependenciesCount.incrementAndGet(); dependency.myTasksDependsOnThis.add(this); } } | addDependency |
2,389 | List<BuildChunkTask> () { List<BuildChunkTask> nextTasks = new SmartList<>(); for (BuildChunkTask task : myTasksDependsOnThis) { int dependenciesCount = task.myNotBuildDependenciesCount.decrementAndGet(); if (dependenciesCount == 0) { nextTasks.add(task); } } return nextTasks; } | markAsFinishedAndGetNextReadyTasks |
2,390 | void (List<BuildChunkTask> tasks) { if (tasks.isEmpty()) return; ArrayList<BuildChunkTask> sorted = new ArrayList<>(tasks); sorted.sort(Comparator.comparingLong(BuildChunkTask::getScore).reversed()); if (LOG.isDebugEnabled()) { final List<BuildTargetChunk> chunksToLog = new ArrayList<>(); for (BuildChunkTask task : sor... | queueTasks |
2,391 | void (final BuildChunkTask task) { final CompileContext chunkLocalContext = createContextWrapper(myContext); myParallelBuildExecutor.execute(new RunnableWithPriority(task.getScore()) { @Override public void run() { try { try { if (myException.get() == null) { buildChunkIfAffected(chunkLocalContext, myContext.getScope()... | queueTask |
2,392 | void () { try { try { if (myException.get() == null) { buildChunkIfAffected(chunkLocalContext, myContext.getScope(), task.getChunk(), myBuildProgress); } } finally { Tracer.Span flush = Tracer.start("flushing"); myProjectDescriptor.dataManager.closeSourceToOutputStorages(Collections.singletonList(task.getChunk())); myF... | run |
2,393 | boolean (CompileScope scope, BuildTargetChunk chunk) { for (BuildTarget<?> target : chunk.getTargets()) { if (scope.isAffected(target)) { return true; } } return false; } | isAffected |
2,394 | CompileContext (CompileContext context, Collection<ModuleBuildTarget> moduleTargets) { final Class<MessageHandler> messageHandlerInterface = MessageHandler.class; return ReflectionUtil.proxy(context.getClass().getClassLoader(), CompileContext.class, new InvocationHandler() { @Override public Object invoke(Object proxy,... | wrapWithModuleInfoAppender |
2,395 | void (@NotNull Set<? extends BuildTarget<?>> targets, @NotNull BuildingTargetProgressMessage.Event event) { myMessageDispatcher.processMessage(new BuildingTargetProgressMessage(targets, event)); } | sendBuildingTargetMessages |
2,396 | void (CompileContext context, ModuleChunk chunk, ModuleLevelBuilder builder) { String infoMessage = JpsBuildBundle.message("builder.0.requested.rebuild.of.module.chunk.1", builder.getPresentableName(), chunk.getName()); LOG.info(infoMessage); BuildMessage.Kind kind = BuildMessage.Kind.JPS_INFO; final CompileScope scope... | notifyChunkRebuildRequested |
2,397 | void (Builder builder, long elapsedTime, int processedFiles) { myElapsedTimeNanosByBuilder.computeIfAbsent(builder, b -> new AtomicLong()).addAndGet(elapsedTime); myNumberOfSourcesProcessedByBuilder.computeIfAbsent(builder, b -> new AtomicInteger()).addAndGet(processedFiles); } | storeBuilderStatistics |
2,398 | CompileContext (final CompileContext delegate) { final UserDataHolderBase localDataHolder = new UserDataHolderBase(); final Set<Object> deletedKeysSet = ContainerUtil.newConcurrentSet(); final Class<UserDataHolder> dataHolderInterface = UserDataHolder.class; final Class<MessageHandler> messageHandlerInterface = Message... | createContextWrapper |
2,399 | TargetTypeRegistry () { return Holder.ourInstance; } | getInstance |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.