#fixed code
                              public MetadataBuilder addFile(@NotNull File source, @NotNull String path) {
    if (!source.isFile()) {
      throw new IllegalArgumentException(source + " is not exist");
    }
    checkHashingResultIsNotSet();
    filesPaths.add(path);
    dataSources.add(new FileSourceHolder(source));
    return this;
  }
#vulnerable code 
                              public MetadataBuilder addFile(@NotNull File source, @NotNull String path) {
    if (!source.isFile()) {
      throw new IllegalArgumentException(source + " is not exist");
    }
    sources.add(new Source(source, path));
    return this;
  } 
                            #location 5 
                            #vulnerability type RESOURCE_LEAK