(a) If the title of the plaintiffs seeking partition or sale of lands for a division shall be controverted, or should the title or claim of any of the parties to the action be adverse to that of one or more of the other parties, the question of title shall be tried and determined in the action by the circuit court, which shall have power to determine all questions of title, and to remove all clouds upon the title, if any, of the lands, whereof partition is sought and to apportion incumbrances, if partition be made of land incumbered and it be deemed proper to do so; and the court may adjust the equities between and determine all claims of the several cotenants or claimants as well as the equities and claims of the incumbrancers; and may adjust, settle, and determine all questions as to dower or curtesy as if separate proceedings had been brought to settle and determine these questions.
(b) In actions for partition of lands, either by metes and bounds or by sale for division when the same cannot be equitably partitioned among the owners, if the defendant denies the title of the plaintiff or asserts an adverse claim or title in himself, the circuit judge need not dismiss the complaint, but may direct the issue as to the title of the complainant, or as to such adverse claim or title of the defendant, to be tried as other issues of fact are triable.