Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
2,200
boolean (K key) { try { return myMap.containsMapping(key); } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
containsKey
2,201
C (K key) { try { C col = myMap.get(key); return col != null? col : myEmptyCollection; } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
get
2,202
void (K key, @NotNull Iterable<? extends V> values) { try { //noinspection unchecked C data = ensureCollection(values); if (data.isEmpty()) { myMap.remove(key); } else { myMap.put(key, data); } } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
put
2,203
C (Iterable<? extends V> seq) { if (myEmptyCollection instanceof Set && seq instanceof Set) { return (C)seq; } if (myEmptyCollection instanceof List && seq instanceof List) { return (C)seq; } return Iterators.collect(seq, myCollectionFactory.get()); }
ensureCollection
2,204
void (K key) { try { myMap.remove(key); } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
remove
2,205
void (K key, V value) { appendValues(key, Collections.singleton(value)); }
appendValue
2,206
void (K key, @NotNull Iterable<? extends V> values) { try { myMap.appendData(key, new AppendablePersistentMap.ValueDataAppender() { @Override public void append(@NotNull DataOutput out) throws IOException { for (V v : values) { myValuesExternalizer.save(out, v); } } }); } catch (IOException e) { throw new BuildDataCorr...
appendValues
2,207
void (K key, V value) { removeValues(key, Collections.singleton(value)); }
removeValue
2,208
void (K key, @NotNull Iterable<? extends V> values) { try { C collection = get(key); if (!collection.isEmpty()) { boolean changes = false; for (V value : values) { changes |= collection.remove(value); } if (changes) { if (collection.isEmpty()) { myMap.remove(key); } else { myMap.put(key, collection); } } } } catch (IOE...
removeValues
2,209
Iterable<K> () { try { return myMap.getAllKeysWithExistingMapping(); } catch (IOException e) { throw new RuntimeException(e); } }
getKeys
2,210
void () { try { myMap.close(); } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
close
2,211
Set<NodeSource> () { return myBaseSources; }
getBaseSources
2,212
Set<NodeSource> () { return myDeletedSources; }
getDeletedSources
2,213
void (@NotNull Node<?, ?> node, @NotNull Iterable<NodeSource> sources) { ReferenceID nodeID = node.getReferenceID(); for (NodeSource src : sources) { myNodeToSourcesMap.appendValue(nodeID, src); mySourceToNodesMap.appendValue(src, node); } // deduce dependencies for (BackDependencyIndex index : getIndices()) { index.in...
associate
2,214
boolean (K key) { return myMap.containsKey(key); }
containsKey
2,215
void (K key, V value) { myMap.put(key, value); }
put
2,216
void (K key) { myMap.remove(key); }
remove
2,217
Iterable<K> () { return myMap.keySet(); }
getKeys
2,218
void () { myMap.clear(); }
close
2,219
Path () { return myPath; }
getPath
2,220
boolean (Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final FileSource that = (FileSource)o; if (!myPath.equals(that.myPath)) { return false; } return true; }
equals
2,221
int () { return myPath.hashCode(); }
hashCode
2,222
String () { return "NodeSource {" + myPath + "}"; }
toString
2,223
Iterable<ReferenceID> (Node<?, ?> node) { ReferenceID nodeID = node.getReferenceID(); return Iterators.unique(Iterators.map(Iterators.filter(node.getUsages(), u -> !nodeID.equals(u.getElementOwner())), u -> u.getElementOwner())); }
getIndexedDependencies
2,224
DifferentiateResult (Delta delta, DifferentiateParameters params) { Iterable<NodeSource> deltaSources = delta.getSources(); Set<NodeSource> allProcessedSources = Iterators.collect(Iterators.flat(Arrays.asList(delta.getBaseSources(), deltaSources, delta.getDeletedSources())), new HashSet<>()); Set<Node<?, ?>> nodesBefor...
differentiate
2,225
Delta () { return delta; }
getDelta
2,226
Iterable<NodeSource> () { return Collections.emptyList(); }
getAffectedSources
2,227
DifferentiateParameters () { return params; }
getParams
2,228
Graph () { return DependencyGraphImpl.this; }
getGraph
2,229
Delta () { return delta; }
getDelta
2,230
boolean (NodeSource src) { return compiledSources.contains(src); }
isCompiled
2,231
void (@NotNull Usage usage) { affectedUsages.put(usage, ANY_CONSTRAINT); }
affectUsage
2,232
void (@NotNull Usage usage, @NotNull Predicate<Node<?, ?>> constraint) { Predicate<Node<?, ?>> prevConstraint = affectedUsages.put(usage, constraint); if (prevConstraint != null) { affectedUsages.put(usage, prevConstraint == ANY_CONSTRAINT? ANY_CONSTRAINT : prevConstraint.or(constraint)); } }
affectUsage
2,233
void (@NotNull BiPredicate<Node<?, ?>, Usage> usageQuery) { usageQueries.add(usageQuery); }
affectUsage
2,234
void (@NotNull NodeSource source) { affectedSources.add(source); }
affectNodeSource
2,235
Delta () { return delta; }
getDelta
2,236
Iterable<NodeSource> () { return affectedSources; }
getAffectedSources
2,237
void (@NotNull DifferentiateResult diffResult) { final Delta delta = diffResult.getDelta(); // handle deleted nodes and sources if (!Iterators.isEmpty(diffResult.getDeletedNodes())) { Set<NodeSource> differentiatedSources = Iterators.collect(Iterators.flat(List.of(delta.getBaseSources(), delta.getSources(), delta.getDe...
integrate
2,238
Set<NodeSource> (Iterable<NodeSource> sources, Iterable<NodeSource> deletedSources) { // ensure initial sources are in the result Set<NodeSource> result = Iterators.collect(sources, new HashSet<>()); // todo: check if a special hashing-policy set is required here Set<NodeSource> deleted = Iterators.collect(deletedSourc...
completeSourceSet
2,239
boolean (K key) { return myDelegate.containsKey(key); }
containsKey
2,240
Iterable<V> (K key) { return myCache.get(key); }
get
2,241
void (K key, @NotNull Iterable<? extends V> values) { myCache.invalidate(key); myDelegate.put(key, values); }
put
2,242
void (K key) { myCache.invalidate(key); myDelegate.remove(key); }
remove
2,243
void (K key, V value) { appendValues(key, Collections.singleton(value)); }
appendValue
2,244
void (K key, @NotNull Iterable<? extends V> values) { if (!Iterators.isEmpty(values)) { myCache.invalidate(key); myDelegate.appendValues(key, values); } }
appendValues
2,245
void (K key, V value) { removeValues(key, Collections.singleton(value)); }
removeValue
2,246
void (K key, @NotNull Iterable<? extends V> values) { if (Iterators.isEmpty(values)) { return; } Iterable<V> currentData = myCache.get(key); Collection<V> collection = currentData instanceof Collection? (Collection<V>)currentData : Iterators.collect(currentData, new SmartList<>()); if (!collection.isEmpty()) { boolean ...
removeValues
2,247
Iterable<K> () { return myDelegate.getKeys(); }
getKeys
2,248
DataInput (DataInput in) { return new GraphDataInput(in); }
wrap
2,249
DataInput (DataInput in, StringEnumerator enumerator) { return new GraphDataInput(in) { @Override public @NotNull String readUTF() throws IOException { return enumerator.toString(readInt()); } }; }
wrap
2,250
boolean (K key) { try { return myMap.containsMapping(key); } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
containsKey
2,251
void (K key, V value) { try { if (value == null) { myMap.remove(key); } else { myMap.put(key, value); } } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
put
2,252
void (K key) { try { myMap.remove(key); } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
remove
2,253
Iterable<K> () { try { return myMap.getAllKeysWithExistingMapping(); } catch (IOException e) { throw new RuntimeException(e); } }
getKeys
2,254
void (BackDependencyIndex index) { myIndices.add(index); }
addIndex
2,255
Iterable<ReferenceID> (@NotNull ReferenceID id) { return myDependencyIndex.getDependencies(id); }
getDependingNodes
2,256
Iterable<BackDependencyIndex> () { return myIndices; }
getIndices
2,257
Iterable<NodeSource> (@NotNull ReferenceID id) { return myNodeToSourcesMap.get(id); }
getSources
2,258
Iterable<ReferenceID> () { return myNodeToSourcesMap.getKeys(); }
getRegisteredNodes
2,259
Iterable<NodeSource> () { return mySourceToNodesMap.getKeys(); }
getSources
2,260
void (@NotNull FileGeneratedEvent event) { final ProjectDescriptor pd = myContext.getProjectDescriptor(); final BuildFSState fsState = pd.fsState; for (Pair<String, String> pair : event.getPaths()) { final String relativePath = pair.getSecond(); final File file = relativePath.equals(".") ? new File(pair.getFirst()) : n...
filesGenerated
2,261
void (@NotNull FileDeletedEvent event) { final BuildFSState state = myContext.getProjectDescriptor().fsState; final BuildRootIndex rootsIndex = myContext.getProjectDescriptor().getBuildRootIndex(); for (String path : event.getFilePaths()) { final File file = new File(FileUtil.toSystemDependentName(path)); for (BuildRoo...
filesDeleted
2,262
ProfilingMode () { String profilingModeString = System.getProperty(PROFILING_MODE_PROPERTY, "false"); switch (profilingModeString) { case "false": return ProfilingMode.NONE; case "true": return ProfilingMode.YOURKIT_SAMPLING; case "tracing": return ProfilingMode.YOURKIT_TRACING; default: throw new IllegalArgumentExcept...
getProfilingMode
2,263
File () { return ourSystemRoot; }
getSystemRoot
2,264
void (@NotNull File systemRoot) { ourSystemRoot = systemRoot; }
setSystemRoot
2,265
File (@NotNull String projectPath) { return getDataStorageRoot(ourSystemRoot, projectPath); }
getDataStorageRoot
2,266
File (@NotNull File systemRoot, @NotNull String projectPath) { return getDataStorageRoot(systemRoot, projectPath, s -> s.hashCode()); }
getDataStorageRoot
2,267
File (@NotNull File systemRoot, @NotNull String projectPath, @NotNull Function<? super String, Integer> hashFunction) { projectPath = FileUtil.toCanonicalPath(projectPath); String name; final int locationHash; final Path rootFile = Paths.get(projectPath); if (!Files.isDirectory(rootFile) && projectPath.endsWith(".ipr")...
getDataStorageRoot
2,268
boolean (CompileContext context) { return ERRORS_DETECTED_KEY.get(context, Boolean.FALSE); }
errorsDetected
2,269
String (long duration) { return StringUtil.formatDuration(duration); }
formatDuration
2,270
int () { //final JpsProject project = context.getProjectDescriptor().getProject(); //final JpsJavaCompilerConfiguration config = JpsJavaExtensionService.getInstance().getOrCreateCompilerConfiguration(project); //final JpsJavaCompilerOptions options = config.getCurrentCompilerOptions(); //return options.MAXIMUM_HEAP_SIZ...
suggestForkedCompilerHeapSize
2,271
Runnable (int count, Runnable operation) { return new Runnable() { private final AtomicInteger myCounter = new AtomicInteger(count); @Override public void run() { int currentVal = myCounter.decrementAndGet(); if (currentVal % count == 0) { try { operation.run(); } finally { while (currentVal <= 0 && !myCounter.compareA...
asCountedRunnable
2,272
void () { int currentVal = myCounter.decrementAndGet(); if (currentVal % count == 0) { try { operation.run(); } finally { while (currentVal <= 0 && !myCounter.compareAndSet(currentVal, count + (currentVal % count))) { // restore the counter currentVal = myCounter.get(); } } } }
run
2,273
boolean (Iterable<? extends JavaBuilderExtension> builders, File file) { for (JavaBuilderExtension extension : builders) { if (extension.shouldHonorFileEncodingForCompilation(file)) { return true; } } return false; }
shouldHonorEncodingForCompilation
2,274
String (JpsModule module) { final Set<String> encodings = getModuleCharsetMap().get(module); return ContainerUtil.getFirstItem(encodings, null); }
getPreferredModuleEncoding
2,275
Set<String> (@NotNull ModuleChunk moduleChunk) { final Map<JpsModule, Set<String>> map = getModuleCharsetMap(); Set<String> encodings = new HashSet<>(); for (JpsModule module : moduleChunk.getModules()) { final Set<String> moduleEncodings = map.get(module); if (moduleEncodings != null) { encodings.addAll(moduleEncoding...
getAllModuleChunkEncodings
2,276
boolean (@NotNull BuildTarget<?> target) { return isWholeTargetAffected(target) || myFiles.containsKey(target) || myIndirectlyAffectedFiles.containsKey(target); }
isAffected
2,277
boolean (@NotNull BuildTarget<?> target) { return (myTypes.contains(target.getTargetType()) || myTargets.contains(target) || isAffectedByAssociatedModule(target)) && !myFiles.containsKey(target); }
isWholeTargetAffected
2,278
boolean (@NotNull BuildTargetType<?> type) { return myTypes.contains(type) && myFiles.isEmpty(); }
isAllTargetsOfTypeAffected
2,279
boolean (@NotNull BuildTarget<?> target) { return myFiles.isEmpty() && myTypesToForceBuild.contains(target.getTargetType()) && isWholeTargetAffected(target); }
isBuildForced
2,280
boolean (@NotNull BuildTargetType<?> targetType) { return myTypesToForceBuild.contains(targetType) && isAllTargetsOfTypeAffected(targetType); }
isBuildForcedForAllTargets
2,281
boolean (@NotNull BuildTargetType<?> targetType) { return !myTypesToForceBuild.contains(targetType); }
isBuildIncrementally
2,282
boolean (BuildTarget<?> target, @NotNull File file) { final Set<File> files = myFiles.isEmpty()? null : myFiles.get(target); if (files == null) { return isWholeTargetAffected(target) || isIndirectlyAffected(target, file); } return files.contains(file) || isIndirectlyAffected(target, file); }
isAffected
2,283
boolean (BuildTarget<?> target, @NotNull File file) { synchronized (myIndirectlyAffectedFiles) { final Set<File> indirect = myIndirectlyAffectedFiles.get(target); return indirect != null && indirect.contains(file); } }
isIndirectlyAffected
2,284
void (BuildTarget<?> target, @NotNull File file) { synchronized (myIndirectlyAffectedFiles) { Set<File> files = myIndirectlyAffectedFiles.get(target); if (files == null) { files = new HashSet<>(); myIndirectlyAffectedFiles.put(target, files); } files.add(file); } }
markIndirectlyAffected
2,285
boolean (BuildTarget<?> target) { if (target instanceof ModuleBasedTarget) { final JpsModule module = ((ModuleBasedTarget<?>)target).getModule(); // this target is associated with module JavaModuleBuildTargetType targetType = JavaModuleBuildTargetType.getInstance(((ModuleBasedTarget<?>)target).isTests()); if (myTypes.c...
isAffectedByAssociatedModule
2,286
File () { return myOutputFile; }
getOutputFile
2,287
Collection<File> () { return mySourceFiles; }
getSourceFiles
2,288
List<String> () { return ContainerUtil.map(mySourceFiles, file -> file.getPath()); }
getSourceFilesPaths
2,289
BinaryContent () { return myContent; }
getContent
2,290
void (@NotNull BinaryContent content) { myContent = content; myIsDirty = true; }
setContent
2,291
boolean () { return myIsDirty; }
isDirty
2,292
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CompiledClass aClass = (CompiledClass)o; if (!FileUtil.filesEqual(myOutputFile, aClass.myOutputFile)) return false; return true; }
equals
2,293
int () { return FileUtil.fileHashCode(myOutputFile); }
hashCode
2,294
String () { return "CompiledClass{" + "myOutputFile=" + myOutputFile + ", mySourceFiles=" + mySourceFiles + ", myIsDirty=" + myIsDirty + '}'; }
toString
2,295
String () { return getModule().getName(); }
getId
2,296
Set<File> (File root, ModuleExcludeIndex index) { final Collection<File> moduleExcludes = index.getModuleExcludes(getModule()); if (moduleExcludes.isEmpty()) { return Collections.emptySet(); } final Set<File> excludes = FileCollectionFactory.createCanonicalFileSet(); for (File excluded : moduleExcludes) { if (FileUtil....
computeRootExcludes
2,297
R (@NotNull String rootId, @NotNull BuildRootIndex rootIndex) { final List<R> descriptors = rootIndex.getRootDescriptors( new File(rootId), Collections.singletonList((BuildTargetType<? extends JVMModuleBuildTarget<R>>)getTargetType()), null ); return ContainerUtil.getFirstItem(descriptors); }
findRootDescriptor
2,298
void (BuildMessage msg) { }
processMessage
2,299
boolean (@NotNull String path, @NotNull Collection<? super String> deletedPaths, @Nullable Set<? super File> parentDirs) { File file = new File(path); boolean deleted = deleteRecursively(file, deletedPaths); if (deleted && parentDirs != null) { File parent = file.getParentFile(); if (parent != null) { parentDirs.add(pa...
deleteRecursively