Program: 9005
Project: 9005
Buggy source:
private void updateDir(@NotNull SessionContext context,@NotNull String wcPath,@Nullable VcsFile oldFile,@NotNull VcsFile newFile,@NotNull String parentTokenId,boolean rootDir) throws IOException, SVNException {
  final SvnServerWriter writer=context.getWriter();
  final String tokenId;
  if (rootDir) {
    tokenId=parentTokenId;
  }
 else {
    tokenId=createTokenId();
    if (oldFile == null) {
      sendStartEntry(writer,"String_Node_Str",wcPath,parentTokenId,tokenId,null);
    }
 else {
      sendStartEntry(writer,"String_Node_Str",wcPath,parentTokenId,tokenId,oldFile.getLastChange().getId());
    }
  }
  updateProps(writer,"String_Node_Str",tokenId,oldFile,newFile);
  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()));
    if (!forced.remove(entryPath)) {
      if (newEntry.equals(oldEntry)) {
        continue;
      }
    }
    updateEntry(context,entryPath,oldEntry,newEntry,tokenId,false);
  }
  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);
  }
  if (!rootDir) {
    writer.listBegin().word("String_Node_Str").listBegin().string(tokenId).listEnd().listEnd();
  }
}

Fixed version (ground truth):
private void updateDir(@NotNull SessionContext context,@NotNull String wcPath,@Nullable VcsFile oldFile,@NotNull VcsFile newFile,@NotNull String parentTokenId,boolean rootDir,@NotNull Depth wcDepth,@NotNull Depth requestedDepth) throws IOException, SVNException {
  final SvnServerWriter writer=context.getWriter();
  final String tokenId;
  if (rootDir) {
    tokenId=parentTokenId;
  }
 else {
    tokenId=createTokenId();
    if (oldFile == null) {
      sendStartEntry(writer,"String_Node_Str",wcPath,parentTokenId,tokenId,null);
    }
 else {
      sendStartEntry(writer,"String_Node_Str",wcPath,parentTokenId,tokenId,oldFile.getLastChange().getId());
    }
  }
  updateProps(writer,"String_Node_Str",tokenId,oldFile,newFile);
  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);
  }
  if (!rootDir) {
    writer.listBegin().word("String_Node_Str").listBegin().string(tokenId).listEnd().listEnd();
  }
}