Any person having no title or bona fide claim of title thereto or right of possession, who enters upon any land, and on demand of the owner or person entitled to the possession thereof, refuses to surrender such possession, or any person or his privy, who, having been dispossessed of any real estate by an officer under legal process from any court having jurisdiction of the subject matter; or any person or his privy, who voluntarily surrenders possession of the lands as a result of a judgment of a court of competent jurisdiction and goes back into the possession of such real estate by force or otherwise; or who, having regained possession of such real estate, holds the same by force or threats without having been restored to the possession of such real estate by an order of a court of competent jurisdiction, shall, on conviction, be fined not less than $200.00 nor more than $1,000.00, and imprisoned in the county jail for not less than six months; and one half of the fine shall go to the person for whose benefit the writ of possession is issued.