Program: 8996
Project: 8996
Buggy source:
private void updateDirEntries(@NotNull SessionContext context,@NotNull String wcPath,@Nullable VcsFile oldFile,@NotNull VcsFile newFile,@NotNull String tokenId,@NotNull Depth wcDepth,@NotNull Depth requestedDepth) throws IOException, SVNException {
  final Depth.Action dirAction=wcDepth.determineAction(requestedDepth,true);
  final Depth.Action fileAction=wcDepth.determineAction(requestedDepth,false);
  final Map<String,VcsFile> oldEntries;
  if (oldFile != null) {
    oldEntries=new HashMap<>();
    for (    VcsFile entry : oldFile.getEntries()) {
      oldEntries.put(entry.getFileName(),entry);
    }
  }
 else {
    oldEntries=Collections.emptyMap();
  }
  final Set<String> forced=new HashSet<>(forcedPaths.getOrDefault(wcPath,Collections.emptySet()));
  for (  VcsFile newEntry : newFile.getEntries()) {
    final String entryPath=joinPath(wcPath,newEntry.getFileName());
    final VcsFile oldEntry=getPrevFile(context,entryPath,oldEntries.remove(newEntry.getFileName()));
    final Depth.Action action=newEntry.isDirectory() ? dirAction : fileAction;
    if (!forced.remove(entryPath) && newEntry.equals(oldEntry) && action == Depth.Action.Normal)     continue;
    if (action == Depth.Action.Skip)     continue;
    final Depth entryDepth=getWcDepth(entryPath,wcDepth);
    updateEntry(context,entryPath,action == Depth.Action.Upgrade ? null : oldEntry,newEntry,tokenId,false,entryDepth,requestedDepth.deepen());
  }
  for (  VcsFile entry : oldEntries.values()) {
    final String entryPath=joinPath(wcPath,entry.getFileName());
    removeEntry(context,entryPath,entry.getLastChange().getId(),tokenId);
    forced.remove(entryPath);
  }
  for (  String removed : forced) {
    removeEntry(context,removed,newFile.getLastChange().getId(),tokenId);
  }
}

Fixed version (ground truth):
private void updateDirEntries(@NotNull SessionContext context,@NotNull String wcPath,@Nullable VcsFile oldFile,@NotNull VcsFile newFile,@NotNull String tokenId,@NotNull Depth wcDepth,@NotNull Depth requestedDepth) throws IOException, SVNException {
  final Depth.Action dirAction=wcDepth.determineAction(requestedDepth,true);
  final Depth.Action fileAction=wcDepth.determineAction(requestedDepth,false);
  final Map<String,VcsFile> oldEntries;
  if (oldFile != null) {
    oldEntries=new HashMap<>();
    for (    VcsFile entry : oldFile.getEntries()) {
      oldEntries.put(entry.getFileName(),entry);
    }
  }
 else {
    oldEntries=Collections.emptyMap();
  }
  final Set<String> forced=new HashSet<>(forcedPaths.getOrDefault(wcPath,Collections.emptySet()));
  for (  VcsFile newEntry : newFile.getEntries()) {
    final String entryPath=joinPath(wcPath,newEntry.getFileName());
    final VcsFile oldEntry=getPrevFile(context,entryPath,oldEntries.remove(newEntry.getFileName()));
    final Depth.Action action=newEntry.isDirectory() ? dirAction : fileAction;
    if (!forced.remove(entryPath) && newEntry.equals(oldEntry) && action == Depth.Action.Normal && requestedDepth == wcDepth)     continue;
    if (action == Depth.Action.Skip)     continue;
    final Depth entryDepth=getWcDepth(entryPath,wcDepth);
    updateEntry(context,entryPath,action == Depth.Action.Upgrade ? null : oldEntry,newEntry,tokenId,false,entryDepth,requestedDepth.deepen());
  }
  for (  VcsFile entry : oldEntries.values()) {
    final String entryPath=joinPath(wcPath,entry.getFileName());
    removeEntry(context,entryPath,entry.getLastChange().getId(),tokenId);
    forced.remove(entryPath);
  }
  for (  String removed : forced) {
    removeEntry(context,removed,newFile.getLastChange().getId(),tokenId);
  }
}