Source:
<code>InternalBranch rebase(InternalBranch branch, InternalBranch onTopOf, String commitMessage, Runnable postReopen) { CDOTransaction testTransaction = null; CDOTransaction newTransaction = null; try { if (branch.headTimestamp() > branch.baseTimestamp()) { testTransaction = applyChangeSet(branch, onTopOf, true); final InternalCDOBasedBranch tmpBranch = (InternalCDOBasedBranch) reopen(onTopOf, String.format(TEMP_BRANCH_NAME_FORMAT, Branch.TEMP_PREFIX, branch.name(), System.currentTimeMillis()), branch.metadata()); postReopen.run(); newTransaction = transferChangeSet(testTransaction, tmpBranch); <START> final InternalCDOBasedBranch tmpBranchWithChanges = (InternalCDOBasedBranch) commitChanges(branch, tmpBranch, commitMessage, newTransaction); <END> final CDOBranchImpl rebasedBranch = new CDOBranchImpl(branch.name(), branch.parentPath(), tmpBranchWithChanges.baseTimestamp(), tmpBranchWithChanges.headTimestamp(), branch.metadata(), tmpBranchWithChanges.cdoBranchId(), tmpBranchWithChanges.segmentId(), tmpBranchWithChanges.segments(), tmpBranchWithChanges.parentSegments()); final IndexWrite<Void> replace = prepareReplace(branch.getClass(), branch.path(), rebasedBranch); final CDOBranch rebasedCDOBranch = getCDOBranch(rebasedBranch); rebasedCDOBranch.rename(branch.name()); commit(replace); sendChangeEvent(branch.path()); return rebasedBranch; } else { final InternalBranch rebasedBranch = reopen(onTopOf, branch.name(), branch.metadata()); postReopen.run(); sendChangeEvent(rebasedBranch.path()); return rebasedBranch; } } finally { LifecycleUtil.deactivate(testTransaction); LifecycleUtil.deactivate(newTransaction); } }</code><technical_language>FYI, branch argument is for logging; checked</technical_language>

Target:
InternalBranch rebase(InternalBranch branch, InternalBranch onTopOf, String commitMessage, Runnable postReopen) { CDOTransaction testTransaction = null; CDOTransaction newTransaction = null; try { if (branch.headTimestamp() > branch.baseTimestamp()) { testTransaction = applyChangeSet(branch, onTopOf, true); final InternalCDOBasedBranch tmpBranch = (InternalCDOBasedBranch) reopen(onTopOf, String.format(Branch.TEMP_BRANCH_NAME_FORMAT, Branch.TEMP_PREFIX, branch.name(), System.currentTimeMillis()), branch.metadata()); postReopen.run(); newTransaction = transferChangeSet(testTransaction, tmpBranch); final InternalCDOBasedBranch tmpBranchWithChanges = (InternalCDOBasedBranch) commitChanges(branch, tmpBranch, commitMessage, newTransaction); final CDOBranchImpl rebasedBranch = new CDOBranchImpl(branch.name(), onTopOf.path(), tmpBranchWithChanges.baseTimestamp(), tmpBranchWithChanges.headTimestamp(), branch.metadata(), tmpBranchWithChanges.cdoBranchId(), tmpBranchWithChanges.segmentId(), tmpBranchWithChanges.segments(), tmpBranchWithChanges.parentSegments()); final IndexWrite<Void> replace = prepareReplace(branch.getClass(), branch.path(), rebasedBranch); final CDOBranch rebasedCDOBranch = getCDOBranch(rebasedBranch); rebasedCDOBranch.rename(branch.name()); commit(replace); sendChangeEvent(branch.path()); return rebasedBranch; } else { final InternalBranch rebasedBranch = reopen(onTopOf, branch.name(), branch.metadata()); postReopen.run(); sendChangeEvent(rebasedBranch.path()); return rebasedBranch; } } finally { LifecycleUtil.deactivate(testTransaction); LifecycleUtil.deactivate(newTransaction); } }