code: protected boolean isSuccessor(NodeData mergeVersion, NodeData corrVersion) throws RepositoryException
     {
        SessionDataManager mergeDataManager = mergeSession.getTransientNodesManager();
  
        PropertyData successorsProperty =
           (PropertyData)mergeDataManager.getItemData(mergeVersion, new QPathEntry(Constants.JCR_SUCCESSORS, 0),
              ItemType.PROPERTY);
  
        if (successorsProperty != null)
        {
           for (ValueData sv : successorsProperty.getValues())
           {
              String sidentifier = ValueDataUtil.getString(sv);
  
              if (sidentifier.equals(corrVersion.getIdentifier()))
              {
                 return true; // got it
              }
  
              // search in successors of the successor
              NodeData successor = (NodeData)mergeDataManager.getItemData(sidentifier);
              if (successor != null)
              {
                 if (isSuccessor(successor, corrVersion))
                 {
                    return true;
                 }
              }
              else
              {
                 throw new RepositoryException("Merge. Ssuccessor is not found by uuid " + sidentifier + ". Version "
                    + mergeSession.getLocationFactory().createJCRPath(mergeVersion.getQPath()).getAsString(false));
              }
           }
           // else it's a end of version graph node
        }
  
        return false;
     }
docs: Is a successor of the merge version