
340 Mass. 773 (1960)
166 N.E.2d 694
EUGENE RATNER & others, trustees,
vs.
ROCKWOOD SPRINKLER COMPANY.
Supreme Judicial Court of Massachusetts, Suffolk.
March 8, 1960.
May 2, 1960.
Present: WILKINS, C.J., SPALDING, WILLIAMS, COUNIHAN, & CUTTER, JJ.
Thomas B. Shea, for the plaintiffs.
Edward J. Barshak, for the defendant.
COUNIHAN, J.
This is an action of contract in which the plaintiffs allege that they were the owners of a building; that the defendant sometime during the period from May 1 to July 1, 1952, contracted with the plaintiffs to bring to full operating capacity the water sprinkler system, which the defendant many years before had installed in the building; and that the defendant failed to make the system fully operable with the result that a fire which occurred in the building in November, 1952, almost completely destroyed the building. The defendant's answer was a general denial and a plea of res judicata.
Before trial the defendant filed a motion for the entry of judgment. G.L.c. 231, § 59, as amended through St. 1955, c. 674, § 1. This motion was supported by two affidavits of counsel for the defendant, the first of which set forth that there was no genuine issue of material fact in connection with the plea of res judicata. The other affidavit set forth facts relating to a previous action of tort brought by the plaintiffs against the defendant which was based on the same facts as alleged in the present action of contract. The earlier case was referred to an auditor whose report was incorporated in the defendant's second affidavit in which it also appeared that, upon motion of the defendant, judgment *775 was entered for it upon the auditor's report in that case. The plaintiffs in the earlier case took no exceptions to the entry of judgment for the defendant.
The auditor's report in the previous action contained findings that there was a fire in the third floor of the building on May 1, 1952; that the defendant did no work on the premises at any time at the request of the plaintiffs; that the defendant upon an order from someone other than the plaintiffs did repair the sprinkler system by the replacement of many sprinkler heads which had been fused by the fire; that the defendant was never ordered to test the entire system and did not test it; and that the order received by the defendant to repair the system was fully complied with. The auditor further found that the fire in November, 1952, got out of control because of an empty bottle which was protruding from a broken pipe and there was no evidence as to how or when the bottle got there.[1]
The affidavit of the plaintiffs did not dispute any of the facts relied upon in the affidavits of the defendant. There was a statement in it, which we consider immaterial, to the effect that after a judge in the earlier case had denied the plaintiffs' motion to amend the writ and declaration in that case to add a cause of action in contract, he told the plaintiffs that they could bring a new action of contract.
The present action comes here upon the exception of the plaintiffs to the allowance of the defendant's motion for the immediate entry of judgment for it. There was no error.
The prior adjudication on the merits operates as a bar to a later proceeding upon the same cause of action as to every issue that in fact was or in law might have been litigated. *776 Cleaveland v. Malden Sav. Bank, 291 Mass. 295, 298. Willett v. Webster, 337 Mass. 98, 102. Varying the form and phrases of a declaration will not avoid the doctrine of res judicata where it is apparent that the declaration in the previous case and the declaration in the case at bar in substance and in effect are concerned with the same cause of action. Franklin v. North Weymouth Coop. Bank, 283 Mass. 275, 280.
"The statement of a different form of liability is not a different cause of action, provided it grows out of the same transaction, act, or agreement, and seeks redress for the same wrong.... The effect of a former judgment, if admissible, depends not upon the form of the pleadings but upon the essence of the violation of legal right on which pleadings are founded." Mackintosh v. Chambers, 285 Mass. 594, 596-597. Restatement: Judgments, § 63. Here, the conduct of the defendant, relied upon as actionable, is the same as in the earlier action. Those acts relied upon to prove liability are essentially the same as to both cases. Where the plaintiff has his option at the outset to sue in tort or contract to recover damages for the same alleged wrong, upon a state of facts which will support either, an adjudication in an earlier case is a bar to a subsequent action. Forman v. Wolfson, 327 Mass. 341.
Exceptions overruled.
NOTES
[1]  The following appeared in the auditor's report: The fire in November, 1952, started in the rear portion of the first floor of the premises. There was testimony that there was "fire ... running along the rear wall on the first floor ... [and] that no water was pouring from the sprinklers in that portion of the building." "After the fire had been completely extinguished, an examination of the sprinkler system in the rear portion of the first floor disclosed an empty bottle protruding from one of the broken pipes. There was no explanation as to how or when the bottle was lodged there. There was testimony that this bottle, located toward the rear of the building, was sufficient to block the flow of water to the sprinkler heads in the last two sections leading off the main running down the center of the building. The area covered by the two sections was approximately one-eighth of the area on the first floor." REPORTER.
