Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
1,000
void (CompileContext context) { ALL_AFFECTED_FILES_KEY.set(context, null); ALL_COMPILED_FILES_KEY.set(context, null); }
cleanupChunkResources
1,001
boolean (File file) { final JavaSourceRootDescriptor rd = myBuildRootIndex.findJavaRootDescriptor(myContext, file); if (rd == null) { return true; } final BuildTarget<?> targetOfFile = rd.target; if (myChunkTargets.contains(targetOfFile)) { return true; } Set<BuildTarget<?>> targetOfFileWithDependencies = myCache.get(t...
accept
1,002
boolean (File file) { final JavaSourceRootDescriptor rd = myBuildRootIndex.findJavaRootDescriptor(myContext, file); return rd != null && myChunkTargets.contains(rd.target); }
belongsToCurrentTargetChunk
1,003
boolean (Collection<? extends File> files) { for (File file : files) { if (belongsToCurrentTargetChunk(file)) { return true; } } return false; }
containsFilesFromCurrentTargetChunk
1,004
boolean (File pathname) { return !myFilter.accept(pathname); }
accept
1,005
boolean (File file) { return !isJavadocExtSnippet(file); }
accept
1,006
boolean (File file) { String filePath = FileUtilRt.toSystemIndependentName(file.getPath()); int patternIndex = FIND_SNIPPETS_FOLDER_PATTERN.apply(filePath, 0); if (patternIndex < 0) { return false; } // ensure the file is under the root String rootPath = FileUtilRt.toSystemIndependentName(myRoot.getPath()); if (!FileUt...
isJavadocExtSnippet
1,007
boolean (@NotNull File file) { return JavaBuilder.JAVA_SOURCES_FILTER.accept(file); }
shouldHonorFileEncodingForCompilation
1,008
FileFilter () { FileFilter baseFilter = super.createFileFilter(); final JpsJavaCompilerConfiguration configuration = JpsJavaExtensionService.getInstance().getCompilerConfiguration(getTarget().getModule().getProject()); final JavadocSnippetsSkipFilter snippetsSkipFilter = new JavadocSnippetsSkipFilter(getRootFile()); re...
createFileFilter
1,009
String () { return "RootDescriptor{" + "target='" + target + '\'' + ", root=" + root + ", generated=" + isGeneratedSources + '}'; }
toString
1,010
Set<File> () { return myExcludes; }
getExcludedRoots
1,011
String () { return myPackagePrefix; }
getPackagePrefix
1,012
String () { return FileUtil.toSystemIndependentName(root.getPath()); }
getRootId
1,013
File () { return root; }
getRootFile
1,014
ModuleBuildTarget () { return target; }
getTarget
1,015
FileFilter () { final JpsCompilerExcludes excludes = JpsJavaExtensionService.getInstance().getCompilerConfiguration(target.getModule().getProject()).getCompilerExcludes(); final FileFilter baseFilter = BuilderRegistry.getInstance().getModuleBuilderFileFilter(); final JavadocSnippetsSkipFilter snippetsSkipFilter = new J...
createFileFilter
1,016
boolean () { return isGeneratedSources; }
isGenerated
1,017
boolean () { return true; }
canUseFileCache
1,018
List<ModuleBuildTarget> (@NotNull JpsModel model) { List<JpsModule> modules = model.getProject().getModules(); List<ModuleBuildTarget> targets = new ArrayList<>(modules.size()); for (JpsModule module : modules) { targets.add(new ModuleBuildTarget(module, this)); } return targets; }
computeAllTargets
1,019
Loader (@NotNull JpsModel model) { return new Loader(model); }
createLoader
1,020
boolean () { return myTests; }
isTests
1,021
JavaModuleBuildTargetType (boolean tests) { return tests ? TEST : PRODUCTION; }
getInstance
1,022
boolean (@NotNull File file) { return false; }
shouldHonorFileEncodingForCompilation
1,023
File () { return myRoot; }
getRootFile
1,024
Set<File> () { return myExcludes; }
getExcludedRoots
1,025
ResourcesTarget () { return myTarget; }
getTarget
1,026
String () { return myPackagePrefix; }
getPackagePrefix
1,027
FileFilter () { final JpsProject project = getTarget().getModule().getProject(); final JpsCompilerExcludes excludes = JpsJavaExtensionService.getInstance().getCompilerConfiguration(project).getCompilerExcludes(); return file -> !excludes.isExcluded(file) && myFilterForExcludedPatterns.accept(file); }
createFileFilter
1,028
String () { return "ResourceRootDescriptor{target='" + myTarget + '\'' + ", root=" + myRoot + '}'; }
toString
1,029
boolean () { return true; }
canUseFileCache
1,030
String () { return FileUtil.toSystemIndependentName(myRoot.getPath()); }
getRootId
1,031
boolean (final int key) { try { return map.containsMapping(key); } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
containsKey
1,032
Collection<V> (final int key) { final Collection<V> collection = cache.get(key); return collection == NULL_COLLECTION ? null : collection; }
get
1,033
void (int key, Collection<V> value) { try { cache.invalidate(key); if (value == null || value.isEmpty()) { map.remove(key); } else { map.put(key, value); } } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
replace
1,034
void (final int key, final Collection<V> value) { try { cache.invalidate(key); map.appendData(key, new AppendablePersistentMap.ValueDataAppender() { @Override public void append(@NotNull DataOutput out) throws IOException { for (V v : value) { valueExternalizer.save(out, v); } } }); } catch (IOException e) { throw new ...
put
1,035
void (final int key, final V value) { put(key, Collections.singleton(value)); }
put
1,036
void (int key, Collection<V> values) { try { if (!values.isEmpty()) { final Collection<V> collection = cache.get(key); if (collection != NULL_COLLECTION) { if (collection.removeAll(values)) { cache.invalidate(key); if (collection.isEmpty()) { map.remove(key); } else { map.put(key, collection); } } } } } catch (IOExcept...
removeAll
1,037
void (final int key, final V value) { try { final Collection<V> collection = cache.get(key); if (collection != NULL_COLLECTION) { if (collection.remove(value)) { cache.invalidate(key); if (collection.isEmpty()) { map.remove(key); } else { map.put(key, collection); } } } } catch (IOException e) { throw new BuildDataCorr...
removeFrom
1,038
void (final int key) { try { cache.invalidate(key); map.remove(key); } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
remove
1,039
void (IntObjectMultiMaplet<V> m) { m.forEachEntry((vs, value) -> put(value, vs)); }
putAll
1,040
void (IntObjectMultiMaplet<V> m) { m.forEachEntry((vs, value) -> replace(value, vs)); }
replaceAll
1,041
void () { try { cache.invalidateAll(); map.close(); } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
close
1,042
void (boolean memoryCachesOnly) { if (memoryCachesOnly) { if (map.isDirty()) { map.dropMemoryCaches(); } } else { map.force(); } }
flush
1,043
File (final File rootDir, final String name) { final File file = new File(FileUtil.toSystemIndependentName(rootDir.getAbsoluteFile() + File.separator + name)); FileUtil.createIfDoesntExist(file); return file; }
getTableFile
1,044
int (final String s) { try { return StringUtil.isEmpty(s) ? myEmptyName : myEnumerator.enumerate(myRelativizer.toRelative(s)); } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
get
1,045
void () { try { myEnumerator.close(); } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
close
1,046
void () { myEnumerator.force(); }
flush
1,047
LoggerWrapper<Integer> (final Logger log) { return new LoggerWrapper<>() { @Override public boolean isDebugEnabled() { return log.isDebugEnabled(); } @Override public void debug(String comment, Integer s) { if (isDebugEnabled()) { log.debug(comment + getValue(s)); } } @Override public void debug(String comment, String ...
getLogger
1,048
boolean () { return log.isDebugEnabled(); }
isDebugEnabled
1,049
void (String comment, Integer s) { if (isDebugEnabled()) { log.debug(comment + getValue(s)); } }
debug
1,050
void (String comment, String t) { if (isDebugEnabled()) { log.debug(comment + t); } }
debug
1,051
void (String comment, boolean t) { if (isDebugEnabled()) { log.debug(comment + t); } }
debug
1,052
PathRelativizerService () { return myRelativizer; }
getRelativizer
1,053
String (String path) { // on case-insensitive file systems save paths in normalized (lowercase) format in order to make tests run deterministically return SystemInfo.isFileSystemCaseSensitive ? path : path.toLowerCase(Locale.US); }
debugString
1,054
void (boolean processInc) { myProcessConstantsIncrementally = processInc; }
setProcessConstantsIncrementally
1,055
String (final int name) { return myContext.getValue(name); }
valueOf
1,056
int (final String string) { return myContext.get(string); }
getName
1,057
Mappings () { synchronized (myLock) { try { return new Mappings(this); } catch (IOException e) { throw new BuildDataCorruptedException(e); } } }
createDelta
1,058
void (final @NotNull Collection<? extends File> compiled, final @NotNull Collection<? extends File> compiledWithErrors) { for (final File file : compiled) { if (!compiledWithErrors.contains(file)) { String relative = toRelative(file); if (!myRelativeSourceFilePathToClasses.containsKey(relative)) { myRelativeSourceFileP...
compensateRemovedContent
1,059
Collection<ClassFileRepr> (File unchangedSource) { return myRelativeSourceFilePathToClasses.get(toRelative(unchangedSource)); }
sourceFileToClassesGet
1,060
String (File file) { return myRelativizer.toRelative(file.getAbsolutePath()); }
toRelative
1,061
File (String relativePath) { return new File(myRelativizer.toFull(relativePath)); }
toFull
1,062
IntIntTransientMultiMaplet () { return myRemovedSuperClasses; }
getRemovedSuperClasses
1,063
IntIntTransientMultiMaplet () { return myAddedSuperClasses; }
getAddedSuperClasses
1,064
void () { final Set<Pair<ClassFileRepr, File>> deleted = myDeletedClasses; if (deleted != null) { for (Pair<ClassFileRepr, File> pair : deleted) { final int deletedClassName = pair.first.name; final Iterable<File> sources = classToSourceFileGet(deletedClassName); if (sources == null || Iterators.isEmpty(sources)) { // ...
runPostPasses
1,065
IntSet (final IntSet acc, final boolean isField, final boolean root, final Predicate<? super ProtoMember> isSame, final int reflcass) { if (acc.contains(reflcass)) { return acc; // SOE prevention } final Iterable<ClassRepr> reprs = reprsByName(reflcass, ClassRepr.class); if (!Iterators.isEmpty(reprs)) { if (!root) { It...
propagateMemberAccessRec
1,066
void (MethodRepr m, ClassRepr methodClass, final ClassRepr fromClass, final Predicate<? super MethodRepr> predicate, final Collection<? super Pair<MethodRepr, ClassRepr>> container, IntSet visitedClasses) { if (m.name == myInitName) { return; // overriding is not defined for constructors } final IntSet subClasses = myC...
addOverridingMethods
1,067
boolean (final ClassRepr fromClass, final Predicate<? super MethodRepr> predicate, IntSet visitedClasses, ClassRepr visibilityScope) { if (visitedClasses == null) { visitedClasses = new IntOpenHashSet(); visitedClasses.add(fromClass.name); } for (TypeRepr.ClassType superName : fromClass.getSuperTypes()) { if (!visitedC...
hasOverriddenMethods
1,068
boolean (final ClassRepr fromClass, IntSet visitedClasses) { if (visitedClasses == null) { visitedClasses = new IntOpenHashSet(); visitedClasses.add(fromClass.name); } for (TypeRepr.ClassType superName : fromClass.getSuperTypes()) { if (!visitedClasses.add(superName.className) || superName.className == myObjectClassNam...
extendsLibraryClass
1,069
void (final ClassRepr fromClass, final Predicate<? super MethodRepr> predicate, final Collection<? super Pair<MethodRepr, ClassRepr>> container, IntSet visitedClasses, final ClassRepr visibilityScope) { if (visitedClasses == null) { visitedClasses = new IntOpenHashSet(); visitedClasses.add(fromClass.name); } for (TypeR...
addOverriddenMethods
1,070
Iterable<MethodRepr> (ClassRepr cls) { return Iterators.flat(collectRecursively(cls, c-> c.getMethods())); }
allMethodsRecursively
1,071
Iterable<OverloadDescriptor> (final ClassRepr cls, Function<? super MethodRepr, Integer> correspondenceFinder) { Function<ClassRepr, Iterable<OverloadDescriptor>> converter = c -> Iterators.filter(Iterators.map(c.getMethods(), m -> { Integer accessScope = correspondenceFinder.apply(m); return accessScope != null? new O...
findAllOverloads
1,072
boolean (int residence) { final Iterable<File> fNames = classToSourceFileGet(residence); if (fNames == null || Iterators.isEmpty(fNames)) { return true; } for (File fName : fNames) { if (myFilter.accept(fName)) { return true; } } return false; }
checkResidence
1,073
boolean (final int residence) { final String className = myContext.getValue(residence); return className == null || !ClassRepr.getPackageName(className).equals(packageName); }
checkResidence
1,074
boolean (final int residence) { final Boolean inheritorOf = isInheritorOf(residence, rootClass, null); return (inheritorOf == null || !inheritorOf) && super.checkResidence(residence); }
checkResidence
1,075
boolean (final ClassRepr c, final ProtoMember m, final ClassRepr scope) { final boolean privacy = m.isPrivate() && c.name != scope.name; final boolean packageLocality = m.isPackageLocal() && !Objects.equals(c.getPackageName(), scope.getPackageName()); return !privacy && !packageLocality; }
isVisibleIn
1,076
boolean (final int s) { return s == myEmptyName; }
isEmpty
1,077
IntSet (final int root) { return addAllSubclasses(root, new IntOpenHashSet(DEFAULT_SET_CAPACITY, DEFAULT_SET_LOAD_FACTOR)); }
getAllSubclasses
1,078
IntSet (final int root, final IntSet acc) { if (acc.add(root)) { final IntSet directSubclasses = myClassToSubclasses.get(root); if (directSubclasses != null) { directSubclasses.forEach(s -> { addAllSubclasses(s, acc); }); } } return acc; }
addAllSubclasses
1,079
boolean (final int owner, final Proto member, final Collection<? super File> affectedFiles, final Collection<? extends File> currentlyCompiled, final @Nullable DependentFilesFilter filter) { final Util self = new Util(); final int classname = member instanceof ClassRepr? member.name : owner; // Public branch --- hopele...
incrementalDecision
1,080
void () { if (myFilesToCompile != null) { myDelta.compensateRemovedContent( myFilesToCompile, myCompiledWithErrors != null ? myCompiledWithErrors : Collections.emptySet() ); } if (!myEasyMode) { final Collection<String> removed = myDelta.myRemovedFiles; if (removed != null) { for (final String file : removed) { final F...
processDisappearedClasses
1,081
void (final DiffState state, final ClassRepr.Diff diff, final ClassRepr it) { final Collection<MethodRepr> added = diff.methods().added(); if (added.isEmpty()) { return; } debug("Processing added methods: "); if (it.isAnnotation()) { debug("Class is annotation, skipping method analysis"); return; } assert myFuture != n...
processAddedMethods
1,082
void (final DiffState state, final ClassRepr.Diff diff, final ClassRepr it) { final Collection<MethodRepr> removed = diff.methods().removed(); if (removed.isEmpty()) { return; } assert myFuture != null; assert myPresent != null; assert myAffectedFiles != null; assert myCompiledFiles != null; debug("Processing removed m...
processRemovedMethods
1,083
void (final DiffState state, final ClassRepr.Diff diff, final ClassRepr it) { final Collection<Pair<MethodRepr, MethodRepr.Diff>> changed = diff.methods().changed(); if (changed.isEmpty()) { return; } debug("Processing changed methods:"); assert myPresent != null; assert myFuture != null; assert myAffectedFiles != null...
processChangedMethods
1,084
boolean (final DiffState state, final ClassRepr.Diff diff, final ClassRepr classRepr) { final Collection<FieldRepr> added = diff.fields().added(); if (added.isEmpty()) { return true; } debug("Processing added fields"); assert myFuture != null; assert myPresent != null; assert myCompiledFiles != null; assert myAffectedF...
processAddedFields
1,085
boolean (final DiffState state, final ClassRepr.Diff diff, final ClassRepr it) { final Collection<FieldRepr> removed = diff.fields().removed(); if (removed.isEmpty()) { return true; } assert myPresent != null; debug("Processing removed fields:"); for (final FieldRepr f : removed) { debug("Field: ", f.name); if (!myProc...
processRemovedFields
1,086
boolean (final DiffState state, final ClassRepr.Diff diff, final ClassRepr it) { final Collection<Pair<FieldRepr, Difference>> changed = diff.fields().changed(); if (changed.isEmpty()) { return true; } debug("Processing changed fields:"); assert myFuture != null; assert myPresent != null; for (final Pair<FieldRepr, Dif...
processChangedFields
1,087
boolean (final DiffState state) { final Collection<Pair<ClassRepr, ClassRepr.Diff>> changedClasses = state.myClassDiff.changed(); if (!changedClasses.isEmpty()) { debug("Processing changed classes:"); assert myFuture != null; assert myPresent != null; final Util.FileFilterConstraint fileFilterConstraint = myFilter != n...
processChangedClasses
1,088
void (final DiffState state, @NotNull File fileName) { final Collection<ClassRepr> removed = state.myClassDiff.removed(); if (removed.isEmpty()) { return; } assert myPresent != null; assert myDelta.myChangedFiles != null; myDelta.myChangedFiles.add(fileName); debug("Processing removed classes:"); for (final ClassRepr c...
processRemovedClases
1,089
void (DiffState state) { final Collection<ClassRepr> addedClasses = state.myClassDiff.added(); if (addedClasses.isEmpty()) { return; } debug("Processing added classes:"); if (!myEasyMode && myFilter != null) { // checking if this newly added class duplicates already existing one assert myCompiledFiles != null; assert m...
processAddedClasses
1,090
void (IntSet toAffect) { assert myAffectedFiles != null; toAffect.forEach(depClass -> { final Iterable<File> fNames = classToSourceFileGet(depClass); if (fNames != null) { for (File fName : fNames) { if (myFilter == null || myFilter.accept(fName)) { debug("Adding dependent file ", fName); myAffectedFiles.add(fName); } ...
affectCorrespondingSourceFiles
1,091
boolean (final DiffState state) { debug("Checking dependent classes:"); assert myAffectedFiles != null; assert myCompiledFiles != null; if (state.myDependants.isEmpty()) { return true; } BiFunction<ClassFileRepr, File, Boolean> dependentReprProcessor = new BiFunction<>() { private final Map<ClassFileRepr, Pair<Boolean,...
calculateAffectedFiles
1,092
Boolean (ClassFileRepr repr, File depFile) { final boolean isGenerated; if (repr instanceof ClassRepr) { final ClassRepr clsRepr = (ClassRepr)repr; if (!clsRepr.hasInlinedConstants() && myCompiledFiles.contains(depFile)) { // Classes containing inlined constants from other classes and compiled against older constant va...
apply
1,093
void (final DiffState state, File fileName) { final Difference.Specifier<ModuleRepr, ModuleRepr.Diff> modulesDiff = state.myModulesDiff; if (modulesDiff.unchanged()) { return; } for (ModuleRepr moduleRepr : modulesDiff.added()) { myDelta.addChangedClass(moduleRepr.name); // need this for integrate // after module has b...
processModules
1,094
boolean (int dep) { for (ModuleRequiresRepr requires : Iterators.flat(Iterators.map(myPresent.reprsByName(dep, ModuleRepr.class), depModule -> depModule.getRequires()))) { if (requires.name == moduleRepr.name && requires.getVersion() == version) { return true; } } return false; }
checkResidence
1,095
void (final Mappings delta) { new Differential(delta).differentiate(); }
differentiateOnRebuild
1,096
void (final Mappings delta, final Collection<String> removed, final Collection<? extends File> filesToCompile) { new Differential(delta, removed, filesToCompile).differentiate(); }
differentiateOnNonIncrementalMake
1,097
boolean (final Mappings delta, final Collection<String> removed, final Collection<? extends File> filesToCompile, final Collection<? extends File> compiledWithErrors, final Collection<? extends File> compiledFiles, final Collection<? super File> affectedFiles, final @NotNull DependentFilesFilter filter) { return new Di...
differentiateOnIncrementalMake
1,098
void (final int className, @Nullable Iterable<? extends UsageRepr.Usage> usages, final IntIntMultiMaplet buffer) { if (usages == null) { usages = Iterators.flat(Iterators.map(getReprsByName(className, ClassFileRepr.class), repr -> repr.getUsages())); } for (Integer owner : Iterators.unique(Iterators.map(usages, usage -...
cleanupBackDependency
1,099
void (final Mappings delta, final @NotNull ClassFileRepr cr, File sourceFile, final Set<? extends UsageRepr.Usage> usages, final IntIntMultiMaplet dependenciesTrashBin) { final int className = cr.name; // it is safe to cleanup class information if it is mapped to non-existing files only final Iterable<File> currentlyMa...
cleanupRemovedClass