Program: 110875
Project: 110875
Buggy source:
@Override public Path decompress(DecompressorDescriptor descriptor) throws RepositoryFunctionException {
  Optional<String> prefix=descriptor.prefix();
  boolean foundPrefix=false;
  try (InputStream decompressorStream=getDecompressorStream(descriptor)){
    TarArchiveInputStream tarStream=new TarArchiveInputStream(decompressorStream);
    TarArchiveEntry entry;
    while ((entry=tarStream.getNextTarEntry()) != null) {
      StripPrefixedPath entryPath=StripPrefixedPath.maybeDeprefix(entry.getName(),prefix);
      foundPrefix=foundPrefix || entryPath.foundPrefix();
      if (entryPath.skip()) {
        continue;
      }
      Path filename=descriptor.repositoryPath().getRelative(entryPath.getPathFragment());
      FileSystemUtils.createDirectoryAndParents(filename.getParentDirectory());
      if (entry.isDirectory()) {
        FileSystemUtils.createDirectoryAndParents(filename);
      }
 else {
        if (entry.isSymbolicLink()) {
          PathFragment linkName=new PathFragment(entry.getLinkName());
          if (linkName.isAbsolute()) {
            linkName=linkName.relativeTo(PathFragment.ROOT_DIR);
            linkName=descriptor.repositoryPath().getRelative(linkName).asFragment();
          }
          FileSystemUtils.ensureSymbolicLink(filename,linkName);
        }
 else {
          Files.copy(tarStream,filename.getPathFile().toPath(),StandardCopyOption.REPLACE_EXISTING);
          filename.chmod(entry.getMode());
        }
      }
    }
  }
 catch (  IOException e) {
    throw new RepositoryFunctionException(e,Transience.TRANSIENT);
  }
  if (prefix.isPresent() && !foundPrefix) {
    throw new RepositoryFunctionException(new IOException("String_Node_Str" + prefix.get() + "String_Node_Str"),Transience.PERSISTENT);
  }
  return descriptor.repositoryPath();
}

Fixed version (ground truth):
@Override public Path decompress(DecompressorDescriptor descriptor) throws RepositoryFunctionException {
  Optional<String> prefix=descriptor.prefix();
  boolean foundPrefix=false;
  try (InputStream decompressorStream=getDecompressorStream(descriptor)){
    TarArchiveInputStream tarStream=new TarArchiveInputStream(decompressorStream);
    TarArchiveEntry entry;
    while ((entry=tarStream.getNextTarEntry()) != null) {
      StripPrefixedPath entryPath=StripPrefixedPath.maybeDeprefix(entry.getName(),prefix);
      foundPrefix=foundPrefix || entryPath.foundPrefix();
      if (entryPath.skip()) {
        continue;
      }
      Path filename=descriptor.repositoryPath().getRelative(entryPath.getPathFragment());
      FileSystemUtils.createDirectoryAndParents(filename.getParentDirectory());
      if (entry.isDirectory()) {
        FileSystemUtils.createDirectoryAndParents(filename);
      }
 else {
        if (entry.isSymbolicLink() || entry.isLink()) {
          PathFragment linkName=new PathFragment(entry.getLinkName());
          if (linkName.isAbsolute()) {
            linkName=linkName.relativeTo(PathFragment.ROOT_DIR);
            linkName=descriptor.repositoryPath().getRelative(linkName).asFragment();
          }
          if (entry.isSymbolicLink()) {
            FileSystemUtils.ensureSymbolicLink(filename,linkName);
          }
 else {
            FileSystemUtils.createHardLink(filename,descriptor.repositoryPath().getRelative(linkName));
          }
        }
 else {
          Files.copy(tarStream,filename.getPathFile().toPath(),StandardCopyOption.REPLACE_EXISTING);
          filename.chmod(entry.getMode());
        }
      }
    }
  }
 catch (  IOException e) {
    throw new RepositoryFunctionException(e,Transience.TRANSIENT);
  }
  if (prefix.isPresent() && !foundPrefix) {
    throw new RepositoryFunctionException(new IOException("String_Node_Str" + prefix.get() + "String_Node_Str"),Transience.PERSISTENT);
  }
  return descriptor.repositoryPath();
}