code: protected CmsLock getRelatedLock() {
  
          if (m_relatedLock == null) {
              CmsLockType type;
              if (isSystemLock()) {
                  type = CmsLockType.UNLOCKED;
              } else {
                  type = CmsLockType.SYSTEM_UNLOCKED;
              }
              CmsLock lock = new CmsLock(getResourceName(), getUserId(), getProject(), type);
              lock.setRelatedLock(this);
              if (isUnlocked()) {
                  // prevent the null lock gets modified
                  return lock;
              }
              m_relatedLock = lock;
          }
          return m_relatedLock;
      }
docs: Returns the related Lock.<p>
  
  @return the related Lock