If the taxpayer has given in an account, and if on the trial of the petition, either with or without a jury, it appears that the taxpayer's real estate, tangible personal property, or intangible personal property has been assessed in excess of the provisions of § 44-5-12 or if it appears that the tax assessed is illegal in whole or in part, the court shall give judgment that the sum by which the taxpayer has been so overtaxed, or illegally taxed, with his or her costs, be deducted from his or her tax; but if the taxpayer's tax be paid, whether before or after the filing of the petition, then the court shall give judgment for the petitioner for the sum by which he or she has been so overtaxed, or illegally taxed, plus the amount of any penalty paid on the tax, with interest from the date on which the tax and penalty were paid and costs, which judgment shall be paid to the petitioner by the city or town treasurer out of the treasury. If, however, on the trial of the petition, it appears that the taxpayer has fraudulently concealed or omitted any property from his or her account, or if it appears that the assessors have not assessed either the taxpayer's real estate or his or her tangible personal property or his or her intangible personal property at a value in excess of the provisions of § 44-5-12, and that the taxpayer has not been illegally taxed, the assessors shall have judgment and execution for their costs.
R.I. Gen. Laws § 44-5-30