class LocalSnapshotMetadata extends MavenMetadata {

    private final Collection<Artifact> artifacts = new ArrayList<>();

    LocalSnapshotMetadata(Artifact artifact, Date timestamp) {
        super(createMetadata(artifact), (Path) null, timestamp);
    }

    LocalSnapshotMetadata(Metadata metadata, Path path, Date timestamp) {
        super(metadata, path, timestamp);
    }

    private static Metadata createMetadata(Artifact artifact) {
        Snapshot snapshot = new Snapshot();
        snapshot.setLocalCopy(true);
        Versioning versioning = new Versioning();
        versioning.setSnapshot(snapshot);

        Metadata metadata = new Metadata();
        metadata.setVersioning(versioning);
        metadata.setGroupId(artifact.getGroupId());
        metadata.setArtifactId(artifact.getArtifactId());
        metadata.setVersion(artifact.getBaseVersion());
        metadata.setModelVersion("1.1.0");
        return metadata;
    }

    public void bind(Artifact artifact) {
        artifacts.add(artifact);
    }

    @Deprecated
    @Override
    public MavenMetadata setFile(File file) {
        return new LocalSnapshotMetadata(metadata, file.toPath(), timestamp);
    }

    @Override
    public MavenMetadata setPath(Path path) {
        return new LocalSnapshotMetadata(metadata, path, timestamp);
    }

    public Object getKey() {
        return getGroupId() + ':' + getArtifactId() + ':' + getVersion();
    }

    public static Object getKey(Artifact artifact) {
        return artifact.getGroupId() + ':' + artifact.getArtifactId() + ':' + artifact.getBaseVersion();
    }

    @Override
    protected void merge(Metadata recessive) {<FILL_FUNCTION_BODY>}

    private String getKey(String classifier, String extension) {
        return classifier + ':' + extension;
    }

    @Override
    public String getGroupId() {
        return metadata.getGroupId();
    }

    @Override
    public String getArtifactId() {
        return metadata.getArtifactId();
    }

    @Override
    public String getVersion() {
        return metadata.getVersion();
    }

    @Override
    public Nature getNature() {
        return Nature.SNAPSHOT;
    }
}

        metadata.getVersioning().setLastUpdatedTimestamp(timestamp);

        String lastUpdated = metadata.getVersioning().getLastUpdated();

        Map<String, SnapshotVersion> versions = new LinkedHashMap<>();

        for (Artifact artifact : artifacts) {
            SnapshotVersion sv = new SnapshotVersion();
            sv.setClassifier(artifact.getClassifier());
            sv.setExtension(artifact.getExtension());
            sv.setVersion(getVersion());
            sv.setUpdated(lastUpdated);
            versions.put(getKey(sv.getClassifier(), sv.getExtension()), sv);
        }

        Versioning versioning = recessive.getVersioning();
        if (versioning != null) {
            for (SnapshotVersion sv : versioning.getSnapshotVersions()) {
                String key = getKey(sv.getClassifier(), sv.getExtension());
                if (!versions.containsKey(key)) {
                    versions.put(key, sv);
                }
            }
        }

        metadata.getVersioning().setSnapshotVersions(new ArrayList<>(versions.values()));

        artifacts.clear();
    
<methods>public java.io.File getFile() ,public java.nio.file.Path getPath() ,public Map<java.lang.String,java.lang.String> getProperties() ,public java.lang.String getType() ,public boolean isMerged() ,public void merge(java.io.File, java.io.File) throws RepositoryException,public void merge(java.nio.file.Path, java.nio.file.Path) throws RepositoryException,public org.eclipse.aether.metadata.Metadata setProperties(Map<java.lang.String,java.lang.String>) <variables>static final java.lang.String MAVEN_METADATA_XML,private boolean merged,protected org.apache.maven.artifact.repository.metadata.Metadata metadata,private final non-sealed java.nio.file.Path path,protected final non-sealed java.util.Date timestamp