Source:
<code>public void processObjectVersions(final Iterable<ObjectVersionReference> versions) { final Map<String, String> dsCreateDates = new HashMap<>(); versions.forEach(ov -> { final String objectId = ov.getObjectInfo().getPid(); final String f6ObjectId = FCREPO_ROOT + objectId; final OcflObjectSession session = sessionFactory.newSession(f6ObjectId); if (ov.isFirstVersion()) { writeObjectFiles(f6ObjectId, ov, session); } ov.listChangedDatastreams().forEach(dv -> { final var mimeType = resolveMimeType(dv); final String dsId = dv.getDatastreamInfo().getDatastreamId(); <START> final String f6DsId = resolveF6DatastreamId(dsId, f6ObjectId, mimeType); <END> final var datastreamFilename = lastPartFromId(f6DsId); if (dv.isFirstVersionIn(ov.getObject())) { dsCreateDates.put(dsId, dv.getCreated()); } final var createDate = dsCreateDates.get(dsId); final var datastreamHeaders = createDatastreamHeaders(dv, f6DsId, f6ObjectId, datastreamFilename, mimeType, createDate); if ("RE".contains(dv.getDatastreamInfo().getControlGroup())) { InputStream content = null; if (migrationType == MigrationType.VANILLA_OCFL) { content = IOUtils.toInputStream(dv.getExternalOrRedirectURL()); } session.writeResource(datastreamHeaders, content); } else { try (var content = dv.getContent()) { session.writeResource(datastreamHeaders, content); } catch (final IOException e) { throw new UncheckedIOException(e); } writeDescriptionFiles(f6DsId, datastreamFilename, createDate, datastreamHeaders, dv, session); } }); LOGGER.debug("Committing object <{}>", f6ObjectId); session.commit(); }); }</code><technical_language>I is fedoraDsId embedding version in variable name objection</technical_language>

Target:
public void processObjectVersions(final Iterable<ObjectVersionReference> versions) { final Map<String, String> dsCreateDates = new HashMap<>(); versions.forEach(ov -> { final String objectId = ov.getObjectInfo().getPid(); final String f6ObjectId = FCREPO_ROOT + objectId; final OcflObjectSession session = sessionFactory.newSession(f6ObjectId); if (ov.isFirstVersion()) { writeObjectFiles(f6ObjectId, ov, session); } ov.listChangedDatastreams().forEach(dv -> { final var mimeType = resolveMimeType(dv); final String dsId = dv.getDatastreamInfo().getDatastreamId(); final String f6DsId = resolveF6DatastreamId(dsId, f6ObjectId, mimeType); final var datastreamFilename = lastPartFromId(f6DsId); if (dv.isFirstVersionIn(ov.getObject())) { dsCreateDates.put(dsId, dv.getCreated()); } final var createDate = dsCreateDates.get(dsId); final var datastreamHeaders = createDatastreamHeaders(dv, f6DsId, f6ObjectId, datastreamFilename, mimeType, createDate); if (externalHandlingMap.containsKey(dv.getDatastreamInfo().getControlGroup())) { InputStream content = null; if (migrationType == MigrationType.PLAIN_OCFL) { content = IOUtils.toInputStream(dv.getExternalOrRedirectURL()); } session.writeResource(datastreamHeaders, content); } else { try (var content = dv.getContent()) { session.writeResource(datastreamHeaders, content); } catch (final IOException e) { throw new UncheckedIOException(e); } writeDescriptionFiles(f6DsId, datastreamFilename, createDate, datastreamHeaders, dv, session); } }); LOGGER.debug("Committing object <{}>", f6ObjectId); session.commit(); }); }