Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
1,100
void (final Mappings delta) { synchronized (myLock) { try { assert (delta.isDifferentiated()); final Collection<String> removed = delta.myRemovedFiles; delta.runPostPasses(); final IntIntMultiMaplet dependenciesTrashBin = new IntIntTransientMultiMaplet(); if (removed != null) { for (final String file : removed) { final...
integrate
1,101
void (int className) { Collection<String> currentPaths = myClassToRelativeSourceFilePath.get(className); if (currentPaths != null && !currentPaths.isEmpty()) { try { pathsBuffer.addAll(currentPaths); pathsBuffer.removeAll(changedRelativePaths); pathsBuffer.addAll(delta.myClassToRelativeSourceFilePath.get(className)); i...
accept
1,102
void (String classFileName, Collection<String> sources, ClassReader cr, boolean isGenerated) { synchronized (myLock) { final int classFileNameS = myContext.get(classFileName); final ClassFileRepr result = new ClassfileAnalyzer(myContext).analyze(classFileNameS, cr, isGenerated); if (result != null) { // since java9 're...
associate
1,103
void (String className, Collection<String> classImports, Collection<String> staticImports) { final String key = className.replace('.', '/'); if (!classImports.isEmpty() || !staticImports.isEmpty()) { myImportRefs.put(key, Pair.create(classImports, staticImports)); } else { myImportRefs.remove(key); } }
registerImports
1,104
void (String className, Collection<Callbacks.ConstantRef> cRefs) { final String key = className.replace('.', '/'); if (!cRefs.isEmpty()) { myConstantRefs.put(key, cRefs); } else { myConstantRefs.remove(key); } }
registerConstantReferences
1,105
void (ClassRepr repr, Collection<String> classImports, Collection<String> staticImports) { for (final String anImport : classImports) { if (!anImport.endsWith(IMPORT_WILDCARD_SUFFIX)) { repr.addUsage(UsageRepr.createClassUsage(myContext, myContext.get(anImport.replace('.', '/')))); } } for (String anImport : staticImpo...
addImportUsages
1,106
boolean (ClassRepr repr, Collection<? extends Callbacks.ConstantRef> cRefs) { boolean addedNewUsages = false; if (cRefs != null) { for (Callbacks.ConstantRef ref : cRefs) { final int owner = myContext.get(ref.getOwner().replace('.', '/')); if (repr.name != owner) { addedNewUsages |= repr.addUsage(UsageRepr.createFieldU...
addConstantUsages
1,107
Collection<File> (int className) { synchronized (myLock) { final Iterable<File> files = classToSourceFileGet(className); return files == null? Collections.emptyList() : ContainerUtil.collect(files.iterator()); } }
getClassSources
1,108
void () { BuildDataCorruptedException error = null; synchronized (myLock) { for (CloseableMaplet maplet : Arrays.asList(myClassToSubclasses, myClassToClassDependency, myRelativeSourceFilePathToClasses, myClassToRelativeSourceFilePath, myShortClassNameIndex)) { if (maplet != null) { try { maplet.close(); } catch (BuildD...
close
1,109
void (final boolean memoryCachesOnly) { synchronized (myLock) { myClassToSubclasses.flush(memoryCachesOnly); myClassToClassDependency.flush(memoryCachesOnly); myRelativeSourceFilePathToClasses.flush(memoryCachesOnly); myClassToRelativeSourceFilePath.flush(memoryCachesOnly); if (!myIsDelta) { myShortClassNameIndex.flush...
flush
1,110
void (final IntSet whereToAdd, final IntIntMultiMaplet maplet) { maplet.forEachEntry((integers, value) -> whereToAdd.add(value)); }
addAllKeys
1,111
void (final int aClass, final int superClass) { assert (myAddedSuperClasses != null); myAddedSuperClasses.put(superClass, aClass); }
registerAddedSuperClass
1,112
void (final int aClass, final int superClass) { assert (myRemovedSuperClasses != null); myRemovedSuperClasses.put(superClass, aClass); }
registerRemovedSuperClass
1,113
boolean () { return myIsDifferentiated; }
isDifferentiated
1,114
boolean () { return myIsRebuild; }
isRebuild
1,115
void (final ClassFileRepr cr, File fileName) { assert (myDeletedClasses != null); myDeletedClasses.add(Pair.create(cr, fileName)); addChangedClass(cr.name); }
addDeletedClass
1,116
void (final ClassRepr cr) { assert (myAddedClasses != null); myAddedClasses.add(cr); addChangedClass(cr.name); }
addAddedClass
1,117
void (final int it) { assert (myChangedClasses != null && myChangedFiles != null); myChangedClasses.add(it); final Iterable<File> files = classToSourceFileGet(it); if (files != null) { ContainerUtil.addAll(myChangedFiles, files); } }
addChangedClass
1,118
Set<ClassRepr> () { return myAddedClasses == null ? Collections.emptySet() : Collections.unmodifiableSet(myAddedClasses); }
getAddedClasses
1,119
IntSet () { return myChangedClasses; }
getChangedClasses
1,120
Set<File> () { return myChangedFiles; }
getChangedFiles
1,121
void (final String s) { LOG.debug(s); }
debug
1,122
void (final String comment, final int s) { myDebugS.debug(comment, s); }
debug
1,123
void (final String comment, final File f) { debug(comment, f.getPath()); }
debug
1,124
void (final String comment, final String s) { myDebugS.debug(comment, s); }
debug
1,125
void (final String comment, final boolean s) { myDebugS.debug(comment, s); }
debug
1,126
void (final PrintStream stream) { final Streamable[] data = { myClassToSubclasses, myClassToClassDependency, myRelativeSourceFilePathToClasses, myClassToRelativeSourceFilePath, }; final String[] info = { "ClassToSubclasses", "ClassToClassDependency", "SourceFileToClasses", "ClassToSourceFile", "SourceFileToAnnotationUs...
toStream
1,127
T () { return (calculated != null? calculated : (calculated = new Ref<>(calculation.get()))).get(); }
get
1,128
void (File outputRoot) { final Streamable[] data = { myClassToSubclasses, myClassToClassDependency, myRelativeSourceFilePathToClasses, myClassToRelativeSourceFilePath, myShortClassNameIndex }; final String[] info = { "ClassToSubclasses", "ClassToClassDependency", "SourceFileToClasses", "ClassToSourceFile", "ShortClassN...
toStream
1,129
void (final DependencyContext context, final PrintStream stream) { final List<Pair<K, String>> keys = new ArrayList<>(); forEachEntry((a, b) -> { keys.add(Pair.create(a, debugString(a))); return true; }); keys.sort(Pair.comparingBySecond()); for (final Pair<K, String> a: keys) { final Collection<V> b = get(a.first); st...
toStream
1,130
String (K k) { return k.toString(); }
debugString
1,131
Set<MethodRepr> () { return myMethods; }
getMethods
1,132
Set<FieldRepr> () { return myFields; }
getFields
1,133
int () { return myOuterClassName; }
getOuterClassName
1,134
boolean () { return myIsLocal; }
isLocal
1,135
boolean () { return myIsAnonymous; }
isAnonymous
1,136
boolean () { return myIsGenerated; }
isGenerated
1,137
boolean () { return myHasInlinedConstants; }
hasInlinedConstants
1,138
void (boolean hasConstants) { myHasInlinedConstants = hasConstants; }
setHasInlinedConstants
1,139
RetentionPolicy () { return myRetentionPolicy; }
getRetentionPolicy
1,140
Set<ElemType> () { final Set<ElemType> targets = myAnnotationTargets; return targets != null ? Collections.unmodifiableSet(targets) : Collections.emptySet(); }
getAnnotationTargets
1,141
boolean () { return (access & Opcodes.ACC_INTERFACE) != 0; }
isInterface
1,142
boolean () { return (access & Opcodes.ACC_ENUM) != 0; }
isEnum
1,143
boolean () { return base() == NONE && interfaces().unchanged() && fields().unchanged() && methods().unchanged() && targets().unchanged() && !retentionChanged(); }
no
1,144
Diff (final Proto past) { final ClassRepr pastClass = (ClassRepr)past; final Difference diff = super.difference(past); int base = diff.base(); if (!mySuperClass.equals(pastClass.mySuperClass)) { base |= Difference.SUPERCLASS; } if (!getUsages().equals(pastClass.getUsages())) { base |= Difference.USAGES; } if (hasInline...
difference
1,145
boolean () { if ((d & Difference.SUPERCLASS) <= 0) { return false; } final String pastSuperName = myContext.getValue(((ClassRepr)past).mySuperClass.className); return "java/lang/Object".equals(pastSuperName); }
extendsAdded
1,146
boolean () { return !((myRetentionPolicy == null && pastClass.myRetentionPolicy == RetentionPolicy.CLASS) || (myRetentionPolicy == RetentionPolicy.CLASS && pastClass.myRetentionPolicy == null) || (myRetentionPolicy == pastClass.myRetentionPolicy)); }
retentionChanged
1,147
boolean () { final Specifier<ElemType, Difference> targetsDiff = targets(); if (!targetsDiff.unchanged()) { for (ElemType elemType : Set.of(ElemType.TYPE_USE, ElemType.RECORD_COMPONENT)) { if (targetsDiff.added().contains(elemType) || targetsDiff.removed().contains(elemType) || pastClass.getAnnotationTargets().contains...
targetAttributeCategoryMightChange
1,148
int () { return d; }
base
1,149
boolean () { return false; }
hadValue
1,150
void (final DependencyContext context, final Set<? super UsageRepr.Usage> s) { mySuperClass.updateClassUsages(context, name, s); for (TypeRepr.AbstractType t : myInterfaces) { t.updateClassUsages(context, name, s); } for (MethodRepr m : myMethods) { m.updateClassUsages(context, name, s); } for (FieldRepr f : myFields) ...
updateClassUsages
1,151
void (final DataOutput out) { try { super.save(out); mySuperClass.save(out); RW.save(myInterfaces, out); RW.save(myFields, out); RW.save(myMethods, out); RW.save(myAnnotationTargets, UsageRepr.AnnotationUsage.elementTypeExternalizer, out); RW.writeUTF(out, myRetentionPolicy == null ? "" : myRetentionPolicy.toString());...
save
1,152
String () { final String strValue = myContext.getValue(name); return strValue != null? getPackageName(strValue) : null; }
getPackageName
1,153
String () { final String strValue = myContext.getValue(name); return strValue != null? getShortName(strValue) : null; }
getShortName
1,154
String (final @NotNull String raw) { final int index = raw.lastIndexOf('/'); if (index == -1) { return ""; } return raw.substring(0, index); }
getPackageName
1,155
String (final @NotNull String fqName) { final int index = fqName.lastIndexOf('/'); if (index == -1) { return fqName; } return fqName.substring(index + 1); }
getShortName
1,156
Collection<MethodRepr> (final Predicate<? super MethodRepr> p) { final Collection<MethodRepr> result = new LinkedList<>(); for (MethodRepr mm : myMethods) { if (p.test(mm)) { result.add(mm); } } return result; }
findMethods
1,157
DataExternalizer<ClassRepr> (final DependencyContext context) { return new DataExternalizer<>() { @Override public void save(final @NotNull DataOutput out, final ClassRepr value) { value.save(out); } @Override public ClassRepr read(final @NotNull DataInput in) { return new ClassRepr(context, in); } }; }
externalizer
1,158
void (final @NotNull DataOutput out, final ClassRepr value) { value.save(out); }
save
1,159
ClassRepr (final @NotNull DataInput in) { return new ClassRepr(context, in); }
read
1,160
void (final DependencyContext context, final PrintStream stream) { super.toStream(context, stream); stream.print(" Superclass : "); stream.println(mySuperClass.getDescr(context)); stream.print(" Interfaces : "); final TypeRepr.AbstractType[] is = myInterfaces.toArray(TypeRepr.AbstractType.EMPTY_TYPE_ARRAY); Arrays.sort...
toStream
1,161
boolean (final int key) { return myMap.containsKey(key); }
containsKey
1,162
IntSet (final int key) { return myMap.get(key); }
get
1,163
void (IntIntMultiMaplet m) { m.forEachEntry((integers, value) -> put(value, integers)); }
putAll
1,164
void (final int key, final IntSet value) { final IntSet x = myMap.get(key); if (x == null) { myMap.put(key, value); } else { x.addAll(value); } }
put
1,165
void (int key, IntSet value) { if (value == null || value.isEmpty()) { myMap.remove(key); } else { myMap.put(key, value); } }
replace
1,166
void (final int key, final int value) { final IntSet collection = myMap.get(key); if (collection == null) { final IntSet x = new IntOpenHashSet(); x.add(value); myMap.put(key, x); } else { collection.add(value); } }
put
1,167
void (final int key, final int value) { final IntSet collection = myMap.get(key); if (collection != null) { if (collection.remove(value)) { if (collection.isEmpty()) { myMap.remove(key); } } } }
removeFrom
1,168
void (int key, IntSet values) { final IntSet collection = myMap.get(key); if (collection != null) { collection.removeAll(values); if (collection.isEmpty()) { myMap.remove(key); } } }
removeAll
1,169
void (final int key) { myMap.remove(key); }
remove
1,170
void (IntIntMultiMaplet m) { m.forEachEntry((integers, value) -> replace(value, integers)); }
replaceAll
1,171
void () { myMap.clear(); // free memory }
close
1,172
void (boolean memoryCachesOnly) { }
flush
1,173
void (final DependencyContext context, final PrintStream stream) { kindToStream(stream); stream.println(" Name : " + context.getValue(myName)); stream.println(" Owner: " + context.getValue(myOwner)); }
toStream
1,174
int () { return myOwner; }
getOwner
1,175
void (final byte tag, final DataOutput out) { try { out.writeByte(tag); DataInputOutputUtil.writeINT(out, myName); DataInputOutputUtil.writeINT(out, myOwner); } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
save
1,176
boolean (final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; FMUsage fmUsage = (FMUsage)o; if (myName != fmUsage.myName) return false; if (myOwner != fmUsage.myOwner) return false; return true; }
equals
1,177
int () { return 31 * myName + myOwner; }
hashCode
1,178
void (final PrintStream stream) { stream.println("FieldUsage:"); }
kindToStream
1,179
void (final DependencyContext context, final PrintStream stream) { super.toStream(context, stream); stream.println(" Type: " + myType.getDescr(context)); }
toStream
1,180
void (final DataOutput out) { save(FIELD_USAGE, out); myType.save(out); }
save
1,181
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final FieldUsage that = (FieldUsage)o; return myType.equals(that.myType) && myName == that.myName && myOwner == that.myOwner; }
equals
1,182
int () { return 31 * (31 * myType.hashCode() + myName) + myOwner; }
hashCode
1,183
void (final PrintStream stream) { stream.println("FieldAssignUsage:"); }
kindToStream
1,184
void (final DataOutput out) { save(FIELD_ASSIGN_USAGE, out); myType.save(out); }
save
1,185
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final FieldAssignUsage that = (FieldAssignUsage)o; return myType.equals(that.myType) && myName == that.myName && myOwner == that.myOwner; }
equals
1,186
int () { return super.hashCode() + 1; }
hashCode
1,187
void (final DataOutput out) { save(METHOD_USAGE, out); RW.save(myArgumentTypes, out); myReturnType.save(out); }
save
1,188
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final MethodUsage that = (MethodUsage)o; if (myReturnType != null ? !myReturnType.equals(that.myReturnType) : that.myReturnType != null) return false; if (myName != that.myName) return false; if (myOwner != that....
equals
1,189
int () { return ((31 * Arrays.hashCode(myArgumentTypes) + (myReturnType.hashCode())) * 31 + (myName)) * 31 + (myOwner); }
hashCode
1,190
void (DependencyContext context, PrintStream stream) { super.toStream(context, stream); stream.println(" Arguments:"); for (final TypeRepr.AbstractType at : myArgumentTypes) { stream.println(" " + at.getDescr(context)); } stream.println(" Return type:"); stream.println(" " + myReturnType.getDescr(context)); }
toStream
1,191
void (final DataOutput out) { save(METAMETHOD_USAGE, out); }
save
1,192
void (final DataOutput out) { save(IMPORT_STATIC_MEMBER_USAGE, out); }
save
1,193
int () { return myClassName; }
getOwner
1,194
void (final DataOutput out) { try { out.writeByte(CLASS_USAGE); DataInputOutputUtil.writeINT(out, myClassName); } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
save
1,195
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final ClassUsage that = (ClassUsage)o; return myClassName == that.myClassName; }
equals
1,196
int () { return myClassName; }
hashCode
1,197
void (final DependencyContext context, final PrintStream stream) { stream.println("ClassUsage: " + context.getValue(myClassName)); }
toStream
1,198
int () { return myModuleName; }
getOwner
1,199
void (final DataOutput out) { try { out.writeByte(MODULE_USAGE); DataInputOutputUtil.writeINT(out, myModuleName); } catch (IOException e) { throw new BuildDataCorruptedException(e); } }
save