Source:
<code>public Serializable checkIn(Node node, String label, String checkinComment) { Boolean checkedIn = (Boolean) node.hierFragment.get(Model.MAIN_CHECKED_IN_KEY); if (Boolean.TRUE.equals(checkedIn)) { throw new NuxeoException("Already checked in"); } if (label == null) { Serializable major = node.getSimpleProperty(Model.MAIN_MAJOR_VERSION_PROP).getValue(); Serializable minor = node.getSimpleProperty(Model.MAIN_MINOR_VERSION_PROP).getValue(); if (major == null) { major = "0"; } if (minor == null) { minor = "0"; } label = major + "." + minor; } Serializable id = node.getId(); boolean excludeSpecialChildren = false; CopyResult res = mapper.copy(new IdWithTypes(node), null, null, null, excludeSpecialChildren); Serializable newId = res.copyId; markInvalidated(res.invalidations); <START> SimpleFragment verHier = getHier(newId, excludeSpecialChildren); <END> verHier.put(Model.MAIN_IS_VERSION_KEY, Boolean.TRUE); boolean isMajor = Long.valueOf(0).equals(verHier.get(Model.MAIN_MINOR_VERSION_KEY)); Row row = new Row(Model.VERSION_TABLE_NAME, newId); row.putNew(Model.VERSION_VERSIONABLE_KEY, id); row.putNew(Model.VERSION_CREATED_KEY, new GregorianCalendar()); row.putNew(Model.VERSION_LABEL_KEY, label); row.putNew(Model.VERSION_DESCRIPTION_KEY, checkinComment); row.putNew(Model.VERSION_IS_LATEST_KEY, Boolean.TRUE); row.putNew(Model.VERSION_IS_LATEST_MAJOR_KEY, Boolean.valueOf(isMajor)); createVersionFragment(row); node.hierFragment.put(Model.MAIN_CHECKED_IN_KEY, Boolean.TRUE); node.hierFragment.put(Model.MAIN_BASE_VERSION_KEY, newId); recomputeVersionSeries(id); return newId; }</code><technical_language>This is wrong, argument of getHier is allowAbsent changed here</technical_language>

Target:
public Serializable checkIn(Node node, String label, String checkinComment) { Boolean checkedIn = (Boolean) node.hierFragment.get(Model.MAIN_CHECKED_IN_KEY); if (Boolean.TRUE.equals(checkedIn)) { throw new NuxeoException("Already checked in"); } if (label == null) { Serializable major = node.getSimpleProperty(Model.MAIN_MAJOR_VERSION_PROP).getValue(); Serializable minor = node.getSimpleProperty(Model.MAIN_MINOR_VERSION_PROP).getValue(); if (major == null) { major = "0"; } if (minor == null) { minor = "0"; } label = major + "." + minor; } Serializable id = node.getId(); boolean excludeSpecialChildren = false; CopyResult res = mapper.copy(new IdWithTypes(node), null, null, null, excludeSpecialChildren); Serializable newId = res.copyId; markInvalidated(res.invalidations); SimpleFragment verHier = getHier(newId, false); verHier.put(Model.MAIN_IS_VERSION_KEY, Boolean.TRUE); boolean isMajor = Long.valueOf(0).equals(verHier.get(Model.MAIN_MINOR_VERSION_KEY)); Row row = new Row(Model.VERSION_TABLE_NAME, newId); row.putNew(Model.VERSION_VERSIONABLE_KEY, id); row.putNew(Model.VERSION_CREATED_KEY, new GregorianCalendar()); row.putNew(Model.VERSION_LABEL_KEY, label); row.putNew(Model.VERSION_DESCRIPTION_KEY, checkinComment); row.putNew(Model.VERSION_IS_LATEST_KEY, Boolean.TRUE); row.putNew(Model.VERSION_IS_LATEST_MAJOR_KEY, Boolean.valueOf(isMajor)); createVersionFragment(row); node.hierFragment.put(Model.MAIN_CHECKED_IN_KEY, Boolean.TRUE); node.hierFragment.put(Model.MAIN_BASE_VERSION_KEY, newId); recomputeVersionSeries(id); return newId; }